diff --git a/allographer.nimble b/allographer.nimble index ad58e3fc..8eac6d3f 100644 --- a/allographer.nimble +++ b/allographer.nimble @@ -1,6 +1,6 @@ # Package -version = "0.23.4" +version = "0.24.0" author = "Hidenobu Itsumura @dumblepytech1 as 'medy'" description = "A Nim query builder library inspired by Laravel/PHP and Orator/Python" license = "MIT" diff --git a/docs/async/async_db.html b/docs/async/async_db.html index ddd9dcc3..bc9e52fb 100644 --- a/docs/async/async_db.html +++ b/docs/async/async_db.html @@ -218,7 +218,7 @@

Procs

proc exec(self: Connections; driver: Driver; query: string;
           args: seq[string] = @[]; specifiedConnI = false; connI = 0): owned(
-    Future[void]) {....raises: [Exception], tags: [RootEffect, TimeEffect].}
+ Future[void]) {....raises: [Exception], tags: [TimeEffect, RootEffect].}
@@ -247,7 +247,7 @@

Procs

proc open(driver: Driver; database: string = ""; user: string = "";
           password: string = ""; host: string = ""; port = 0;
-          maxConnections = 1; timeout = 30): Connections {....raises: [],
+          maxConnections = 1; timeout = 30): Connections {....raises: [DbError],
     tags: [TimeEffect].}
@@ -268,7 +268,7 @@

Procs

proc query(self: Connections; driver: Driver; query: string;
            args: seq[string] = @[]; specifiedConnI = false; connI = 0): Future[
     (seq[Row], DbRows)] {....raises: [Exception, ValueError],
-                          tags: [RootEffect, TimeEffect, ReadDbEffect].}
+ tags: [TimeEffect, RootEffect, ReadDbEffect].}
@@ -278,7 +278,7 @@

Procs

proc query(self: Prepared; driver: Driver; args: seq[string] = @[]): Future[
     (seq[Row], DbRows)] {....raises: [Exception, ValueError], tags: [RootEffect,
-    ReadDbEffect, WriteDbEffect, TimeEffect].}
+ TimeEffect, ReadDbEffect, WriteDbEffect].}
@@ -289,7 +289,7 @@

Procs

proc queryPlain(self: Connections; driver: Driver; query: string;
                 args: seq[string] = @[]; specifiedConnI = false; connI = 0): Future[
     seq[Row]] {....raises: [Exception, ValueError],
-                tags: [RootEffect, TimeEffect, ReadDbEffect].}
+ tags: [TimeEffect, RootEffect, ReadDbEffect].}
@@ -298,7 +298,7 @@

Procs

proc transactionEnd(self: Connections; driver: Driver; connI: int; query: string): owned(
-    Future[void]) {....raises: [Exception], tags: [RootEffect].}
+ Future[void]) {....raises: [Exception], tags: [RootEffect, TimeEffect].}
@@ -329,7 +329,7 @@

Exports

diff --git a/docs/async/database/base.html b/docs/async/database/base.html index 9ac92f6b..ba5e5d16 100644 --- a/docs/async/database/base.html +++ b/docs/async/database/base.html @@ -494,7 +494,7 @@

Procs

diff --git a/docs/async/database/impls/mariadb.html b/docs/async/database/impls/mariadb.html index 4d977346..78731e67 100644 --- a/docs/async/database/impls/mariadb.html +++ b/docs/async/database/impls/mariadb.html @@ -204,7 +204,7 @@

Procs

diff --git a/docs/async/database/impls/mysql.html b/docs/async/database/impls/mysql.html index fa817271..4e7fe21d 100644 --- a/docs/async/database/impls/mysql.html +++ b/docs/async/database/impls/mysql.html @@ -204,7 +204,7 @@

Procs

diff --git a/docs/async/database/impls/postgres.html b/docs/async/database/impls/postgres.html index 63d2c161..1e3e485b 100644 --- a/docs/async/database/impls/postgres.html +++ b/docs/async/database/impls/postgres.html @@ -251,7 +251,7 @@

Procs

diff --git a/docs/async/database/impls/sqlite.html b/docs/async/database/impls/sqlite.html index 07e8b4ee..9f226f55 100644 --- a/docs/async/database/impls/sqlite.html +++ b/docs/async/database/impls/sqlite.html @@ -267,7 +267,7 @@

Procs

diff --git a/docs/async/database/libs/lib_mariadb.html b/docs/async/database/libs/lib_mariadb.html index 5ff14e85..8617aa9b 100644 --- a/docs/async/database/libs/lib_mariadb.html +++ b/docs/async/database/libs/lib_mariadb.html @@ -323,7 +323,7 @@

Iterators

diff --git a/docs/async/database/libs/lib_mysql.html b/docs/async/database/libs/lib_mysql.html index 156bccd8..70da7c7c 100644 --- a/docs/async/database/libs/lib_mysql.html +++ b/docs/async/database/libs/lib_mysql.html @@ -217,7 +217,7 @@

Procs

diff --git a/docs/async/database/libs/lib_postgres.html b/docs/async/database/libs/lib_postgres.html index b17db5f8..e275ba7b 100644 --- a/docs/async/database/libs/lib_postgres.html +++ b/docs/async/database/libs/lib_postgres.html @@ -218,7 +218,7 @@

Procs

diff --git a/docs/async/database/libs/lib_sqlite.html b/docs/async/database/libs/lib_sqlite.html index 3e663c15..f9eb1009 100644 --- a/docs/async/database/libs/lib_sqlite.html +++ b/docs/async/database/libs/lib_sqlite.html @@ -330,7 +330,7 @@

Templates

diff --git a/docs/async/database/rdb/mariadb.html b/docs/async/database/rdb/mariadb.html index 4741c2eb..5d744de5 100644 --- a/docs/async/database/rdb/mariadb.html +++ b/docs/async/database/rdb/mariadb.html @@ -5746,7 +5746,7 @@

Procs

diff --git a/docs/async/database/rdb/mysql.html b/docs/async/database/rdb/mysql.html index f806b3b1..534cc6df 100644 --- a/docs/async/database/rdb/mysql.html +++ b/docs/async/database/rdb/mysql.html @@ -5733,7 +5733,7 @@

Procs

diff --git a/docs/async/database/rdb/postgres.html b/docs/async/database/rdb/postgres.html index b5d13979..eb3057fa 100644 --- a/docs/async/database/rdb/postgres.html +++ b/docs/async/database/rdb/postgres.html @@ -2281,7 +2281,7 @@

Procs

diff --git a/docs/async/database/rdb/sqlite.html b/docs/async/database/rdb/sqlite.html index eb83b91b..d19b60d0 100644 --- a/docs/async/database/rdb/sqlite.html +++ b/docs/async/database/rdb/sqlite.html @@ -2608,7 +2608,7 @@

Procs

diff --git a/docs/base.html b/docs/base.html index c94f9a25..4a162020 100644 --- a/docs/base.html +++ b/docs/base.html @@ -115,6 +115,16 @@

src/allographer/base

shouldDisplayLog*: bool shouldOutputLogFile*: bool logDir*: string">LogSetting +
  • RawQueryRdb
  • Types + + +
    +
    RawQueryRdb = ref object
    +  driver*: Driver
    +  conn*: Connections
    +  log*: LogSetting
    +  query*: JsonNode
    +  sqlString*: string
    +  placeHolder*: seq[string]
    +  isInTransaction*: bool
    +  transactionConn*: int
    +
    +
    + + +
    @@ -193,7 +220,7 @@

    Types

    diff --git a/docs/base.idx b/docs/base.idx index 858c3c84..c1b7a6c0 100644 --- a/docs/base.idx +++ b/docs/base.idx @@ -5,3 +5,4 @@ PostgreSQL base.html#PostgreSQL Driver.PostgreSQL SQLite3 base.html#SQLite3 Driver.SQLite3 Driver base.html#Driver base: Driver Rdb base.html#Rdb base: Rdb +RawQueryRdb base.html#RawQueryRdb base: RawQueryRdb diff --git a/docs/baseEnv.html b/docs/baseEnv.html index 28d2879b..039cc5ca 100644 --- a/docs/baseEnv.html +++ b/docs/baseEnv.html @@ -106,7 +106,7 @@

    src/allographer/baseEnv

  • isExistsMysql
  • isExistsPostgres
  • + title="isExistsPostgres = true">isExistsPostgres
  • isExistsSqlite
  • @@ -141,7 +141,7 @@

    Consts

    -
    isExistsPostgres = false
    +
    isExistsPostgres = true
    @@ -166,7 +166,7 @@

    Consts

    diff --git a/docs/connection.html b/docs/connection.html index 7e691f65..be078e23 100644 --- a/docs/connection.html +++ b/docs/connection.html @@ -148,7 +148,7 @@

    Procs

    proc dbOpen(driver: Driver; database: string = ""; user: string = "";
                 password: string = ""; host: string = ""; port = 0;
                 maxConnections = 1; timeout = 30; shouldDisplayLog = false;
    -            shouldOutputLogFile = false; logDir = ""): Rdb {....raises: [],
    +            shouldOutputLogFile = false; logDir = ""): Rdb {....raises: [DbError],
         tags: [TimeEffect].}
    @@ -171,7 +171,7 @@

    Exports

    diff --git a/docs/query_builder.html b/docs/query_builder.html index f81ae41b..8942df9a 100644 --- a/docs/query_builder.html +++ b/docs/query_builder.html @@ -127,7 +127,7 @@

    Imports

    Exports

    -Rdb, Driver, LogSetting, whereNotIn, distinct, leftJoin, whereBetween, having, Desc, table, whereNull, orderBy, groupBy, join, select, limit, whereBetween, whereNotBetween, freeTransactionConn, inTransaction, Asc, whereIn, where, whereNotBetween, orWhere, Order, having, orWhere, where, offset, raw, avg, max, delete, first, deleteSql, fastPaginate, sum, exec, count, rollback, toSql, paginate, update, findPlain, find, fastPaginateBack, updateSql, get, begin, insertsID, getPlain, insertId, commit, columns, insert, fastPaginateNext, insertId, get, firstPlain, first, insertSql, getRaw, min, delete, inserts, find, selectSql, insert, getRaw, find, transaction, seeder, seeder +Rdb, Driver, LogSetting, RawQueryRdb, whereNotIn, distinct, leftJoin, whereBetween, having, Desc, table, whereNull, orderBy, groupBy, join, select, limit, whereBetween, whereNotBetween, freeTransactionConn, inTransaction, Asc, whereIn, where, whereNotBetween, orWhere, Order, having, orWhere, where, offset, raw, avg, begin, max, delete, first, deleteSql, fastPaginate, sum, exec, fastPaginateBack, count, get, rollback, toSql, paginate, update, findPlain, find, delete, get, updateSql, get, insertId, insertsID, getPlain, firstPlain, commit, columns, getPlain, first, fastPaginateNext, insert, get, firstPlain, first, insertSql, min, insertId, inserts, find, selectSql, insert, find, transaction, seeder, seeder
    @@ -137,7 +137,7 @@

    Exports

    diff --git a/docs/query_builder/builders.html b/docs/query_builder/builders.html index 45d4a0a2..5db8d642 100644 --- a/docs/query_builder/builders.html +++ b/docs/query_builder/builders.html @@ -329,7 +329,7 @@

    Procs

    diff --git a/docs/query_builder/exec.html b/docs/query_builder/exec.html index 73e2e316..6b28c7e9 100644 --- a/docs/query_builder/exec.html +++ b/docs/query_builder/exec.html @@ -145,8 +145,8 @@

    src/allographer/query_builder/exec

    -
    + +
    +
    proc firstPlain(self: RawQueryRdb): Future[seq[string]] {.
    +    ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect,
    +    ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect, ReadDbEffect].}
    +
    + + +
    @@ -493,6 +517,16 @@

    Procs

    + +
    +
    +
    proc get(self: RawQueryRdb): Future[seq[JsonNode]] {.
    +    ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect,
    +    ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect, ReadDbEffect].}
    +
    + +It is only used with raw() +
    @@ -503,6 +537,14 @@

    Procs

    + +
    +
    +
    proc get[T](self: RawQueryRdb; typ: typedesc[T]): Future[seq[T]]
    +
    + +It is only used with raw() +
    @@ -513,8 +555,8 @@

    Procs

    -
    -
    proc getPlain(self: Rdb): Future[seq[seq[string]]] {.
    +
    +
    proc getPlain(self: RawQueryRdb): Future[seq[seq[string]]] {.
         ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect,
         ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect, ReadDbEffect].}
    @@ -523,21 +565,13 @@

    Procs

    -
    -
    proc getRaw(self: Rdb): Future[seq[JsonNode]] {....raises: [Exception, ValueError], tags: [
    -    RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect,
    -    TimeEffect, ReadDbEffect].}
    +
    +
    proc getPlain(self: Rdb): Future[seq[seq[string]]] {.
    +    ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect,
    +    ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect, ReadDbEffect].}
    -It is only used with raw() - -
    -
    -
    -
    proc getRaw[T](self: Rdb; typ: typedesc[T]): Future[seq[T]]
    -
    -It is only used with raw()
    @@ -642,7 +676,8 @@

    Procs

    proc rollback(self: Rdb; connI: int): owned(Future[void]) {....raises: [Exception], tags: [
    -    RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect].}
    + RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, + TimeEffect].}
    @@ -704,7 +739,7 @@

    Procs

    diff --git a/docs/query_builder/exec.idx b/docs/query_builder/exec.idx index 892b604a..b7d14f75 100644 --- a/docs/query_builder/exec.idx +++ b/docs/query_builder/exec.idx @@ -4,11 +4,14 @@ columns query_builder/exec.html#columns,Rdb exec: columns(self: Rdb): Future[seq get query_builder/exec.html#get,Rdb exec: get(self: Rdb): Future[seq[JsonNode]] get query_builder/exec.html#get,Rdb,typedesc[T] exec: get[T](self: Rdb; typ: typedesc[T]): Future[seq[T]] getPlain query_builder/exec.html#getPlain,Rdb exec: getPlain(self: Rdb): Future[seq[seq[string]]] -getRaw query_builder/exec.html#getRaw,Rdb exec: getRaw(self: Rdb): Future[seq[JsonNode]] -getRaw query_builder/exec.html#getRaw,Rdb,typedesc[T] exec: getRaw[T](self: Rdb; typ: typedesc[T]): Future[seq[T]] +get query_builder/exec.html#get,RawQueryRdb exec: get(self: RawQueryRdb): Future[seq[JsonNode]] +getPlain query_builder/exec.html#getPlain,RawQueryRdb exec: getPlain(self: RawQueryRdb): Future[seq[seq[string]]] +get query_builder/exec.html#get,RawQueryRdb,typedesc[T] exec: get[T](self: RawQueryRdb; typ: typedesc[T]): Future[seq[T]] first query_builder/exec.html#first,Rdb exec: first(self: Rdb): Future[Option[JsonNode]] +first query_builder/exec.html#first,RawQueryRdb exec: first(self: RawQueryRdb): Future[Option[JsonNode]] first query_builder/exec.html#first,Rdb,typedesc[T] exec: first[T](self: Rdb; typ: typedesc[T]): Future[Option[T]] firstPlain query_builder/exec.html#firstPlain,Rdb exec: firstPlain(self: Rdb): Future[seq[string]] +firstPlain query_builder/exec.html#firstPlain,RawQueryRdb exec: firstPlain(self: RawQueryRdb): Future[seq[string]] find query_builder/exec.html#find,Rdb,string,string exec: find(self: Rdb; id: string; key = "id"): Future[Option[JsonNode]] find query_builder/exec.html#find,Rdb,int,string exec: find(self: Rdb; id: int; key = "id"): Future[Option[JsonNode]] find query_builder/exec.html#find,Rdb,int,typedesc[T],string exec: find[T](self: Rdb; id: int; typ: typedesc[T]; key = "id"): Future[Option[T]] @@ -25,7 +28,7 @@ update query_builder/exec.html#update,Rdb,JsonNode exec: update(self: Rdb; items deleteSql query_builder/exec.html#deleteSql,Rdb exec: deleteSql(self: Rdb): string delete query_builder/exec.html#delete,Rdb exec: delete(self: Rdb): owned(Future[void]) delete query_builder/exec.html#delete,Rdb,int,string exec: delete(self: Rdb; id: int; key = "id"): owned(Future[void]) -exec query_builder/exec.html#exec,Rdb exec: exec(self: Rdb): owned(Future[void]) +exec query_builder/exec.html#exec,RawQueryRdb exec: exec(self: RawQueryRdb): owned(Future[void]) begin query_builder/exec.html#begin,Rdb exec: begin(self: Rdb): Future[int] rollback query_builder/exec.html#rollback,Rdb,int exec: rollback(self: Rdb; connI: int): owned(Future[void]) commit query_builder/exec.html#commit,Rdb,int exec: commit(self: Rdb; connI: int): owned(Future[void]) diff --git a/docs/query_builder/generators.html b/docs/query_builder/generators.html index fcb4b608..270535f6 100644 --- a/docs/query_builder/generators.html +++ b/docs/query_builder/generators.html @@ -564,7 +564,7 @@

    Procs

    diff --git a/docs/query_builder/grammars.html b/docs/query_builder/grammars.html index 7a4ebf89..1bd189e3 100644 --- a/docs/query_builder/grammars.html +++ b/docs/query_builder/grammars.html @@ -183,7 +183,7 @@

    src/allographer/query_builder/grammars

    ExecStatusType:
    first:
    firstPlain:
    float:
    get:
    getPlain:
    get_proto_info:
    -
    getRaw:
    get_salt_from_password:
    raw:
    rawExec:
    +
    RawQueryRdb:
    Rdb: