Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It matches all records. It's fast rather than "true" literal because all_records() doesn't evaluate on each record. It just copies all record IDs to result set table. Note that getting all records is heavy process. You should use it only when you need it.
- Loading branch information
Showing
6 changed files
with
174 additions
and
0 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
47 changes: 47 additions & 0 deletions
47
test/function/suite/select/function/all_records/function.expected
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,47 @@ | ||
| table_create Softwares TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| load --table Softwares | ||
| [ | ||
| ["_key"], | ||
| ["groonga"], | ||
| ["mroonga"], | ||
| ["rroonga"] | ||
| ] | ||
| [[0,0.0,0.0],3] | ||
| select Softwares --filter 'all_records() == true' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 3 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "groonga" | ||
| ], | ||
| [ | ||
| 2, | ||
| "mroonga" | ||
| ], | ||
| [ | ||
| 3, | ||
| "rroonga" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
11 changes: 11 additions & 0 deletions
11
test/function/suite/select/function/all_records/function.test
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 @@ | ||
| table_create Softwares TABLE_HASH_KEY ShortText | ||
|
|
||
| load --table Softwares | ||
| [ | ||
| ["_key"], | ||
| ["groonga"], | ||
| ["mroonga"], | ||
| ["rroonga"] | ||
| ] | ||
|
|
||
| select Softwares --filter 'all_records() == true' |
47 changes: 47 additions & 0 deletions
47
test/function/suite/select/function/all_records/selector.expected
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,47 @@ | ||
| table_create Softwares TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| load --table Softwares | ||
| [ | ||
| ["_key"], | ||
| ["groonga"], | ||
| ["mroonga"], | ||
| ["rroonga"] | ||
| ] | ||
| [[0,0.0,0.0],3] | ||
| select Softwares --filter 'all_records()' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 3 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "groonga" | ||
| ], | ||
| [ | ||
| 2, | ||
| "mroonga" | ||
| ], | ||
| [ | ||
| 3, | ||
| "rroonga" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
11 changes: 11 additions & 0 deletions
11
test/function/suite/select/function/all_records/selector.test
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 @@ | ||
| table_create Softwares TABLE_HASH_KEY ShortText | ||
|
|
||
| load --table Softwares | ||
| [ | ||
| ["_key"], | ||
| ["groonga"], | ||
| ["mroonga"], | ||
| ["rroonga"] | ||
| ] | ||
|
|
||
| select Softwares --filter 'all_records()' |