https://surrealdb.com/docs/surrealql/operators
Procs
proc `distinct`(self: SurrealQuery): SurrealQuery {....raises: [], tags: [], forbids: [].}
proc fetch(self: SurrealQuery; columnsArg: varargs[string]): SurrealQuery {. ...raises: [], tags: [], forbids: [].}
proc groupBy(self: SurrealQuery; column: string): SurrealQuery {. ...raises: [KeyError], tags: [], forbids: [].}
proc having(self: SurrealQuery; column: string; symbol: string; value: bool | int | float | string): SurrealQuery
proc having(self: SurrealQuery; column: string; symbol: string; value: nil.type): SurrealQuery {. ...raises: [CatchableError, KeyError], tags: [], forbids: [].}
proc limit(self: SurrealQuery; num: int): SurrealQuery {....raises: [], tags: [], forbids: [].}
proc orderBy(self: SurrealQuery; column: string; collation: Collation; order: Order): SurrealQuery {....raises: [KeyError], tags: [], forbids: [].}
proc orderBy(self: SurrealQuery; column: string; order: Order): SurrealQuery {. ...raises: [KeyError], tags: [], forbids: [].}
proc orWhere(self: SurrealQuery; column: string; symbol: string; value: bool | int | float | string | SurrealId): SurrealQuery
proc orWhere(self: SurrealQuery; column: string; symbol: string; value: nil.type): SurrealQuery {. ...raises: [CatchableError, KeyError], tags: [], forbids: [].}
proc parallel(self: SurrealQuery): SurrealQuery {....raises: [], tags: [], forbids: [].}
proc raw(self: SurrealConnections; sql: string; arges = newJArray()): RawSurrealQuery {. ...raises: [], tags: [], forbids: [].}
-
arges is JArray
can't use BLOB data.
proc select(self: SurrealConnections; columnsArg: varargs[string]): SurrealQuery {. ...raises: [], tags: [], forbids: [].}
proc start(self: SurrealQuery; num: int): SurrealQuery {....raises: [], tags: [], forbids: [].}
proc table(self: SurrealConnections; tableArg: string): SurrealQuery {. ...raises: [], tags: [], forbids: [].}
proc table(self: SurrealQuery; tableArg: string): SurrealQuery {....raises: [], tags: [], forbids: [].}
proc where(self: SurrealQuery; column: string; symbol: string; value: bool | int | float | string | SurrealId): SurrealQuery
proc where(self: SurrealQuery; column: string; symbol: string; value: nil.type): SurrealQuery {. ...raises: [CatchableError, KeyError], tags: [], forbids: [].}
proc whereBetween(self: SurrealQuery; column: string; width: array[2, int | float]): SurrealQuery
-
rdb.table("user").whereBetween("index", [1, 3]).get()
SELECT * FROM user WHERE 1 <= index AND index <= 3
https://surrealdb.com/docs/surrealql/operators#lessthanorequal
proc whereIn(self: SurrealQuery; column: string; width: seq[int | float | string]): SurrealQuery
-
rdb.table("user").whereIn("index", [2, 3]).get()
SELECT * FROM user WHERE [2, 3] CONTAINS index
proc whereNotBetween(self: SurrealQuery; column: string; width: array[2, int | float]): SurrealQuery
-
rdb.table("user").whereNotBetween("index", [1, 3]).get()
SELECT * FROM user WHERE index > 1 AND 3 < index
proc whereNotIn(self: SurrealQuery; column: string; width: seq[int | float | string]): SurrealQuery
-
rdb.table("user").whereNotIn("index", [2, 3]).get()
SELECT * FROM user WHERE [2, 3] CONTAINSNOT index
proc whereNull(self: SurrealQuery; column: string): SurrealQuery {. ...raises: [KeyError], tags: [], forbids: [].}
- https://surrealdb.com/docs/surrealql/operators#equal