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 @@
proc exec(self: Connections; driver: Driver; query: string; args: seq[string] = @[]; specifiedConnI = false; connI = 0): owned( - Future[void]) {....raises: [Exception], tags: [RootEffect, TimeEffect].}
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].}
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].}
proc query(self: Prepared; driver: Driver; args: seq[string] = @[]): Future[ (seq[Row], DbRows)] {....raises: [Exception, ValueError], tags: [RootEffect, - ReadDbEffect, WriteDbEffect, TimeEffect].}
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].}
proc transactionEnd(self: Connections; driver: Driver; connI: int; query: string): owned( - Future[void]) {....raises: [Exception], tags: [RootEffect].}
RawQueryRdb = ref object + driver*: Driver + conn*: Connections + log*: LogSetting + query*: JsonNode + sqlString*: string + placeHolder*: seq[string] + isInTransaction*: bool + transactionConn*: int +
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].}
proc commit(self: Rdb; connI: int): owned(Future[void]) {....raises: [Exception], tags: [ - RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect].}
proc exec(self: Rdb): owned(Future[void]) {....raises: [Exception], tags: [ ++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 @@ proc exec(self: RawQueryRdb): owned(Future[void]) {....raises: [Exception], tags: [ RootEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}- @@ -410,7 +414,7 @@
Procs
proc fastPaginateBack(self: Rdb; display, id: int; key = "id"; order: Order = Asc): Future[JsonNode] {. - ...raises: [Exception, ValueError], tags: [RootEffect, TimeEffect, + ...raises: [Exception, ValueError], tags: [TimeEffect, RootEffect, ReadDbEffect, WriteIOEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect].}- @@ -421,7 +425,7 @@
Procs
+ proc fastPaginateNext(self: Rdb; display, id: int; key = "id"; order: Order = Asc): Future[JsonNode] {. - ...raises: [Exception, ValueError], tags: [RootEffect, TimeEffect, + ...raises: [Exception, ValueError], tags: [TimeEffect, RootEffect, ReadDbEffect, WriteIOEffect, WriteDirEffect, ReadDirEffect, ReadIOEffect].}- @@ -465,6 +469,16 @@
+Procs
++- +
proc first(self: RawQueryRdb): Future[Option[JsonNode]] {. + ...raises: [Exception, ValueError], tags: [RootEffect, WriteDirEffect, + ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect, ReadDbEffect].}- + + +
@@ -483,6 +497,16 @@+Procs
+ ++- +
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
-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 @@ 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].}+- @@ -642,7 +676,8 @@ 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() - -
-Procs
Procs
src/allographer/query_builder/grammars
raw
- raw(self: Rdb; sql: string; arges: varargs[string]): Rdb
+ title="raw(self: Rdb; sql: string; arges: varargs[string]): RawQueryRdb">raw(self: Rdb; sql: string; arges: varargs[string]): RawQueryRdbselect @@ -380,8 +380,8 @@
Procs
proc raw(self: Rdb; sql: string; arges: varargs[string]): Rdb {....raises: [], - tags: [].}
proc raw(self: Rdb; sql: string; arges: varargs[string]): RawQueryRdb {. + ...raises: [], tags: [].}