Skip to content

Commit d893646

Browse files
committed
fix readme
1 parent 96ebb57 commit d893646

1 file changed

Lines changed: 42 additions & 42 deletions

File tree

NewReadMe.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
* New Update and UpdateAsync upgrade: CASE
1+
# New Update and UpdateAsync upgrade: CASE
22

3-
** A new feature added to allow developers to programmatically set CASE WHEN when assigning values. Feature includes grouping in sub statements () or
4-
** to allow condition to point to a column variable instead of a direct paramater value. SQL injection friendly
3+
## A new feature added to allow developers to programmatically set CASE WHEN when assigning values. Feature includes grouping in sub statements () or
4+
## to allow condition to point to a column variable instead of a direct paramater value. SQL injection friendly
55

6-
** Original Update Statement for multiple records using anonymous objects:
6+
## Original Update Statement for multiple records using anonymous objects:
77

8-
*** foreach (var item in data)
8+
### foreach (var item in data)
99

10-
*** {
10+
### {
1111

12-
*** object obj = new
12+
### object obj = new
1313

14-
*** {
14+
### {
1515

16-
*** MyField = item.Value
16+
### MyField = item.Value
1717

18-
*** };
18+
### };
1919

20-
*** cnt += await QueryFactory.Query(tableName).Where("Id", item.Id).UpdateAsync(value);
20+
### cnt += await QueryFactory.Query(tableName).Where("Id", item.Id).UpdateAsync(value);
2121
2222

23-
*** }
23+
### }
2424

25-
*** return cnt;
25+
### return cnt;
2626

2727

2828

2929

3030

31-
** New Update with select case using multi-level array systems
32-
** version 1 : allows is equal condition only for now
33-
** For the Else it will always fill with name of field itself , self assigning.
34-
** This happens if format is wrong as well.
35-
** The else protects you fro your field to be set back to NULL
31+
## New Update with select case using multi-level array systems
32+
## version 1 : allows is equal condition only for now
33+
## For the Else it will always fill with name of field itself , self assigning.
34+
## This happens if format is wrong as well.
35+
## The else protects you fro your field to be set back to NULL
3636
37-
*** Warning: Limitation is requires , Suggest 200 rows for low number columns,
38-
*** 25 for higher number columns or clauses.
37+
### Warning: Limitation is requires , Suggest 200 rows for low number columns,
38+
### 25 for higher number columns or clauses.
3939

4040

4141
var datac = data.Chunk(200); // breaking data up to 200 rows
@@ -73,40 +73,40 @@
7373

7474

7575

76-
**standard: Case WHEN x = A then Y... END:
77-
*** In your cases array the flow is [x,A,Y].
78-
*** Assignmet value is always last.
76+
##standard: Case WHEN x = A then Y... END:
77+
### In your cases array the flow is [x,A,Y].
78+
### Assignmet value is always last.
7979

8080

8181

8282

8383

84-
** Available Feaure 1 : While its common to do 3 items for basic, when can extend the criteria with AND and OR
85-
** It combine, the array column after the orevioud criteria field must be an AND or OR, unless using , () or * explained later
84+
## Available Feaure 1 : While its common to do 3 items for basic, when can extend the criteria with AND and OR
85+
## It combine, the array column after the orevioud criteria field must be an AND or OR, unless using , () or * explained later
8686

87-
*** Note: Assignmet value is always last. you can use AND,&&,& or OR,||,|, <>. Not case sensitive.
87+
### Note: Assignmet value is always last. you can use AND,&&,& or OR,||,|, <>. Not case sensitive.
8888

89-
*** Case WHEN x = A AND z = B then Y ... END:
90-
*** In your cases array the flow is [x,A,"AND",z,B,Y]
91-
*** Case WHEN x = A OR z = B then Y ... END:
92-
*** Array the flow is [x,A,"OR",z,B,Y]
89+
### Case WHEN x = A AND z = B then Y ... END:
90+
### In your cases array the flow is [x,A,"AND",z,B,Y]
91+
### Case WHEN x = A OR z = B then Y ... END:
92+
### Array the flow is [x,A,"OR",z,B,Y]
9393

9494

9595

9696

9797

98-
** Available Feaure 2 : Subset (). This allows seperating your "And" & "Or" blocks
99-
*** ex: case when (a = 1 or a = 5) and (b = 7 and c = 2)
100-
*** This can be placed anywhere before the assignment column or * assignment column,
101-
*** if you forget to add the ) to close, the engine
102-
*** will compensate.
98+
## Available Feaure 2 : Subset (). This allows seperating your "And" & "Or" blocks
99+
### ex: case when (a = 1 or a = 5) and (b = 7 and c = 2)
100+
### This can be placed anywhere before the assignment column or * assignment column,
101+
### if you forget to add the ) to close, the engine
102+
### will compensate.
103103

104-
*** Case WHEN (x = A AND z = B) OR J = C then Y ... END:
105-
*** Array the flow is ["(",x,A,"AND",z,B,")","OR",j,c,Y]
106-
*** Case WHEN (x = A OR z = B) AND (J = C AND K = D) then Y ... END:
107-
*** Array the flow is ["(",x,A,"OR",z,B,")","AND","(",j,c,"AND",k,d,")" Y]
104+
### Case WHEN (x = A AND z = B) OR J = C then Y ... END:
105+
### Array the flow is ["(",x,A,"AND",z,B,")","OR",j,c,Y]
106+
### Case WHEN (x = A OR z = B) AND (J = C AND K = D) then Y ... END:
107+
### Array the flow is ["(",x,A,"OR",z,B,")","AND","(",j,c,"AND",k,d,")" Y]
108108

109109

110-
** Available Feaure 3 : To Another Column Field (*). This allows criteria to check if column equals another column (field)
111-
*** Case WHEN (colx = colb AND colz = colx) then Y ... END:
112-
*** Array the flow is [,colx,*',colb,"AND",colz,colx, Y]
110+
## Available Feaure 3 : To Another Column Field (*). This allows criteria to check if column equals another column (field)
111+
### Case WHEN (colx = colb AND colz = colx) then Y ... END:
112+
### Array the flow is [,colx,*',colb,"AND",colz,colx, Y]

0 commit comments

Comments
 (0)