sebastianwessel / surrealdb-client-generator

Tool which generates a typescript client for SurrealDB and zod schema of a given database
MIT License
76 stars 12 forks source link

Does not support for "IF NOT EXISTS" syntax for DEFINE statements #7

Closed lylejohnson closed 5 months ago

lylejohnson commented 5 months ago

Version 1.1.3 of surql-gen does not support the "IF NOT EXISTS" syntax for DEFINE statements, introduced in SurrealDB version 1.3.0. It errors out as follows:


[Error: Parse error: Failed to parse query at line 5 column 16 expected ON
  |
5 | DEFINE USER IF NOT EXISTS myusername ON DATABASE PASSWORD 'secret' ROLES EDITOR;
  |
] {
  code: 'GenericFailure'
}
sebastianwessel commented 5 months ago

The issue should now be resolved. See Version 2 Release Note.