Procs
proc `distinct`(self: MysqlQuery): MysqlQuery {....raises: [], tags: [].}
proc avg(self: MysqlQuery; column: string): Future[Option[float]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc begin(self: MysqlConnections): owned(Future[void]) {....raises: [Exception], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc columns(self: MysqlQuery): Future[seq[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- get columns sequence from table
proc commit(self: MysqlConnections): owned(Future[void]) {....raises: [Exception], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect].}
proc count(self: MysqlQuery): Future[int] {....raises: [Exception, ValueError], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc delete(self: MysqlQuery): owned(Future[void]) {....raises: [Exception], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc delete(self: MysqlQuery; id: int; key = "id"): owned(Future[void]) {. ...raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc exec(self: RawMysqlQuery): owned(Future[void]) {....raises: [Exception], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- It is only used with raw()
proc find(self: MysqlQuery; id: int; key = "id"): Future[Option[JsonNode]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc find(self: MysqlQuery; id: string; key = "id"): Future[Option[JsonNode]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc find[T](self: MysqlQuery; id: int; typ: typedesc[T]; key = "id"): Future[ Option[T]]
proc find[T](self: MysqlQuery; id: string; typ: typedesc[T]; key = "id"): Future[ Option[T]]
proc findPlain(self: MysqlQuery; id: int; key = "id"): Future[seq[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc findPlain(self: MysqlQuery; id: string; key = "id"): Future[seq[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc first(self: MysqlQuery): Future[Option[JsonNode]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc first(self: RawMysqlQuery): Future[Option[JsonNode]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- It is only used with raw()
proc first[T](self: MysqlQuery; typ: typedesc[T]): Future[Option[T]]
proc firstPlain(self: MysqlQuery): Future[seq[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc firstPlain(self: RawMysqlQuery): Future[seq[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- It is only used with raw()
proc get(self: MysqlQuery): Future[seq[JsonNode]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc get(self: RawMysqlQuery): Future[seq[JsonNode]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- It is only used with raw()
proc get[T](self: MysqlQuery; typ: typedesc[T]): Future[seq[T]]
proc getPlain(self: MysqlQuery): Future[seq[seq[string]]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc getPlain(self: RawMysqlQuery): Future[seq[seq[string]]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- It is only used with raw()
proc groupBy(self: MysqlQuery; column: string): MysqlQuery {....raises: [KeyError], tags: [].}
proc having(self: MysqlQuery; column: string; symbol: string; value: string | int | float | bool): MysqlQuery
proc having(self: MysqlQuery; column: string; symbol: string; value: nil.type): MysqlQuery {. ...raises: [Exception, KeyError], tags: [].}
proc insert(self: MysqlQuery; items: JsonNode): owned(Future[void]) {. ...raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
- items is JObject
proc insert(self: MysqlQuery; items: seq[JsonNode]): owned(Future[void]) {. ...raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc insertId(self: MysqlQuery; items: JsonNode; key = "id"): Future[string] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc insertId(self: MysqlQuery; items: seq[JsonNode]; key = "id"): Future[ seq[string]] {....raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc join(self: MysqlQuery; table: string; column1: string; symbol: string; column2: string): MysqlQuery {....raises: [KeyError], tags: [].}
proc leftJoin(self: MysqlQuery; table: string; column1: string; symbol: string; column2: string): MysqlQuery {....raises: [KeyError], tags: [].}
proc limit(self: MysqlQuery; num: int): MysqlQuery {....raises: [], tags: [].}
proc max(self: MysqlQuery; column: string): Future[Option[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc min(self: MysqlQuery; column: string): Future[Option[string]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc offset(self: MysqlQuery; num: int): MysqlQuery {....raises: [], tags: [].}
proc orderBy(self: MysqlQuery; column: string; order: Order): MysqlQuery {. ...raises: [KeyError], tags: [].}
proc orWhere(self: MysqlQuery; column: string; symbol: string; value: string | int | float | bool): MysqlQuery
proc orWhere(self: MysqlQuery; column: string; symbol: string; value: nil.type): MysqlQuery {. ...raises: [Exception, KeyError], tags: [].}
proc rollback(self: MysqlConnections): owned(Future[void]) {. ...raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect].}
proc sum(self: MysqlQuery; column: string): Future[Option[float]] {. ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc table(self: MysqlQuery; tableArg: string): MysqlQuery {....raises: [], tags: [].}
proc update(self: MysqlQuery; items: JsonNode): owned(Future[void]) {. ...raises: [Exception], tags: [RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
proc where(self: MysqlQuery; column: string; symbol: string; value: string | int | float): MysqlQuery
proc where(self: MysqlQuery; column: string; symbol: string; value: bool): MysqlQuery {. ...raises: [Exception, KeyError], tags: [].}
proc where(self: MysqlQuery; column: string; symbol: string; value: nil.type): MysqlQuery {. ...raises: [Exception, KeyError], tags: [].}
proc whereBetween(self: MysqlQuery; column: string; width: array[2, int | float]): MysqlQuery
proc whereBetween(self: MysqlQuery; column: string; width: array[2, string]): MysqlQuery {. ...raises: [KeyError], tags: [].}
proc whereIn(self: MysqlQuery; column: string; width: seq[int | float | string]): MysqlQuery
proc whereNotBetween(self: MysqlQuery; column: string; width: array[2, int | float]): MysqlQuery
proc whereNotBetween(self: MysqlQuery; column: string; width: array[2, string]): MysqlQuery {. ...raises: [KeyError], tags: [].}
proc whereNotIn(self: MysqlQuery; column: string; width: seq[int | float | string]): MysqlQuery
proc whereNull(self: MysqlQuery; column: string): MysqlQuery {. ...raises: [KeyError], tags: [].}
Templates
template seeder(rdb: MysqlConnections; 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: MysqlConnections; tableName: string; body: untyped): untyped
- The seeder block allows the code in the block to work only when the table is empty.