-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
204 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...hots/surreal_query_builder__statements__for_loop__tests__for_macro_and_block_macro-2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
source: query-builder/src/statements/for_loop.rs | ||
expression: for_loop.to_raw().build() | ||
--- | ||
FOR $__name IN ['Oyelowo', 'Oyedayo'] { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
FOR $__moniker IN (SELECT VALUE user_name FROM person) { | ||
SELECT * FROM person WHERE user_name = $__moniker; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
|
||
FOR $__name IN ['Oyelowo', 'Oyedayo'] { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
}; | ||
|
||
FOR $__name IN ['Oyelowo', 'Oyedayo'] { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
|
||
FOR $__name IN ['Oyelowo', 'Oyedayo'] { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
|
||
IF $__name = 'Oyelowo' THEN | ||
6 | ||
END |
35 changes: 35 additions & 0 deletions
35
...pshots/surreal_query_builder__statements__for_loop__tests__for_macro_and_block_macro.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
source: query-builder/src/statements/for_loop.rs | ||
expression: for_loop.fine_tune_params() | ||
--- | ||
FOR $__name IN $_param_00000001 { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
FOR $__moniker IN $_param_00000002 { | ||
SELECT * FROM person WHERE user_name = $__moniker; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
|
||
FOR $__name IN $_param_00000003 { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
}; | ||
|
||
FOR $__name IN $_param_00000004 { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
|
||
FOR $__name IN $_param_00000005 { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
|
||
IF $__name = $_param_00000006 THEN | ||
$_param_00000007 | ||
END |
11 changes: 11 additions & 0 deletions
11
...nts/snapshots/surreal_query_builder__statements__for_loop__tests__for_macro_nested-2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: query-builder/src/statements/for_loop.rs | ||
expression: for_loop.to_raw().build() | ||
--- | ||
FOR $__name IN ['Oyelowo', 'Oyedayo'] { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
FOR $__name IN ['Oyelowo', 'Oyedayo'] { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
}; |
11 changes: 11 additions & 0 deletions
11
...ments/snapshots/surreal_query_builder__statements__for_loop__tests__for_macro_nested.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: query-builder/src/statements/for_loop.rs | ||
expression: for_loop.fine_tune_params() | ||
--- | ||
FOR $__name IN $_param_00000001 { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
|
||
FOR $__name IN $_param_00000002 { | ||
SELECT * FROM person WHERE user_name = $__name; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters