Skip to main content
Version: 1.x

Known Issues

Here are some known bugs and issues with SurrealDB:

SDKs

  • Some query functionality is not yet available in the SDKs. Such as IF EXISTS and IF NOT EXISTS clauses in the DEFINE statement. This means that if you used these clauses in your query method(as seen in the example below), the SDK would not be able to parse the query correctly.
await db.query(
'DEFINE FIELD IF NOT EXISTS email ON TABLE user TYPE string;'
);

SurrealQL

  • In the DELETE statement the ONLY clause doesn't work as expected because it checks for a length of 1 and DELETE doesn't return anything by default at this time. So it always gives an error. However, adding RETURN $before will force DELETE to return the deleted record, which will be the expected length of 1.
CREATE person:one;

// Currently fails
DELETE ONLY person:one;

// Workaround: add RETURN $before
DELETE ONLY person:one RETURN $before;