mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-26 15:00:26 +01:00
optimized search count queries to use rowid by default
This commit is contained in:
1 parent
1679c88e6d
commit
9ec01d74d8
37 files changed
+88
-45
No files matched your search
@@ -190,7 +190,7 @@ func (f SchemaField) Validate() error {
|
||||
|
||||
excludeNames := BaseModelFieldNames()
|
||||
// exclude special filter literals
|
||||
excludeNames = append(excludeNames, "null", "true", "false")
|
||||
excludeNames = append(excludeNames, "null", "true", "false", "_rowid_")
|
||||
// exclude system literals
|
||||
excludeNames = append(excludeNames, SystemFieldNames()...)
|
||||
|
||||
|
||||
@@ -313,6 +313,15 @@ func TestSchemaFieldValidate(t *testing.T) {
|
||||
},
|
||||
[]string{"name"},
|
||||
},
|
||||
{
|
||||
"reserved name (_rowid_)",
|
||||
schema.SchemaField{
|
||||
Type: schema.FieldTypeText,
|
||||
Id: "1234567890",
|
||||
Name: "_rowid_",
|
||||
},
|
||||
[]string{"name"},
|
||||
},
|
||||
{
|
||||
"reserved name (id)",
|
||||
schema.SchemaField{
|
||||
|
||||
Reference in new issue
Block a user