Procs
proc avg(self: MariadbQuery; column: string): Future[Option[float]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc begin(self: MariadbConnections): owned(Future[void]) {....stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc columns(self: MariadbQuery): Future[seq[string]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- get columns sequence from table
proc commit(self: MariadbConnections): owned(Future[void]) {....stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect], forbids: [].}
proc count(self: MariadbQuery): Future[int] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc delete(self: MariadbQuery): owned(Future[void]) {....stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc delete(self: MariadbQuery; id: int; key = "id"): owned(Future[void]) {. ...stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc exec(self: RawMariadbQuery): owned(Future[void]) {....stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- It is only used with raw()
proc find(self: MariadbQuery; id: int; key = "id"): Future[Option[JsonNode]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc find(self: MariadbQuery; id: string; key = "id"): Future[Option[JsonNode]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc findPlain(self: MariadbQuery; id: int; key = "id"): Future[seq[string]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc findPlain(self: MariadbQuery; id: string; key = "id"): Future[seq[string]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc first(self: MariadbQuery): Future[Option[JsonNode]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc first(self: RawMariadbQuery): Future[Option[JsonNode]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- It is only used with raw()
proc firstPlain(self: MariadbQuery): Future[seq[string]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc firstPlain(self: RawMariadbQuery): Future[seq[string]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- It is only used with raw()
proc get(self: MariadbQuery): Future[seq[JsonNode]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc get(self: RawMariadbQuery): Future[seq[JsonNode]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- It is only used with raw()
proc getPlain(self: MariadbQuery): Future[seq[seq[string]]] {....stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc getPlain(self: RawMariadbQuery): Future[seq[seq[string]]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- It is only used with raw()
proc insert(self: MariadbQuery; items: JsonNode): owned(Future[void]) {. ...stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- items is JObject
proc insert(self: MariadbQuery; items: seq[JsonNode]): owned(Future[void]) {. ...stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc insertId(self: MariadbQuery; items: JsonNode; key = "id"): Future[string] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc insertId(self: MariadbQuery; items: seq[JsonNode]; key = "id"): Future[ seq[string]] {....stackTrace: false, raises: [Exception, ValueError], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc max(self: MariadbQuery; column: string): Future[Option[string]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc min(self: MariadbQuery; column: string): Future[Option[string]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc rollback(self: MariadbConnections): owned(Future[void]) {. ...stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect], forbids: [].}
proc sum(self: MariadbQuery; column: string): Future[Option[float]] {. ...stackTrace: false, raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
proc update(self: MariadbQuery; items: JsonNode): owned(Future[void]) {. ...stackTrace: false, raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
Templates
template seeder(rdb: MariadbConnections; tableName, column: string; body: untyped): untyped
- The seeder block allows the code in the block to work only when the table or specified column is empty.
template seeder(rdb: MariadbConnections; tableName: string; body: untyped): untyped
- The seeder block allows the code in the block to work only when the table is empty.