Commit Graph

71 Commits

Author SHA1 Message Date
Andreas Rumpf
ee0a470294 Revert "fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 (#19744)" (#19745)
This reverts commit b10f0e7bca.
2022-04-25 11:59:37 +02:00
flywind
b10f0e7bca fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 (#19744) 2022-04-24 14:20:18 -04:00
Araq
7b811deeff db_sqlite: added a space 2022-03-18 14:18:05 +01:00
flywind
f559319a68 fix a sqlite bug (#18669) 2021-08-12 09:21:01 -07:00
Andrey Makarov
9f7e2e3057 docs: make inline markup more compatible with Markdown (#18053)
fixes https://github.com/timotheecour/Nim/issues/739
2021-05-21 06:54:20 +02:00
Andrey Makarov
d97bf4f1c8 fix RST parsing when no indent after enum.item (fix #17249) (#17257) 2021-03-12 08:33:21 +01:00
Danil Yarantsev
56461c280f Change stdlib imports to use std prefix in most examples (#17202) 2021-02-28 13:17:19 -08:00
flywind
9450bf6c08 use single backtick (#17100) 2021-02-18 22:47:21 -08:00
RokkuCode
ffccdf3c1a fixes #16080 (#16091) [backport:1.2]
* fixes #16080

db_sqlite: Error: undeclared field: 'untypedLen'

* redacting fix
2020-11-23 15:15:55 +01:00
Regis Caillaud
6fa82a5b3a Handle BLOB column type in SQLite as binary data (#15681)
* Fixed not handling blob correctly in sqlite
* Fixed setLen commented by mistake
* Added binary example as db_sqlite doc
* Added tests for sqlite binary data
2020-11-02 13:02:55 +01:00
Bung
2a4a43b05f add bindParams to db_sqlite (#14408)
* add bindParams to db_sqlite
* no need typeinfo
* remove extro spaces
* reduce bindParams to two branches,raise DbError
* Update lib/impure/db_sqlite.nim
* change bindParams to macro,accept varargs[untyped] as params
* change bind blob val to openArray[byte]
* remove unused err type
* explicitly using i32 param
* using import std/private/since
* SQLITE_OK to right hand

* bindParam val int using bindParam overload
* copy data by default
* change exec to template
* remove SqlPrepared procs unused varargs
* fix setupquery for prepared,reset first for exec prepared,add bindNull for literal nil

Co-authored-by: alaviss <leorize+oss@disroot.org>
2020-05-26 07:44:47 +02:00
Bung
6668b43409 add insert,tryInsert unify for postgres that need pk name (#14416)
* add insert,tryInsert unify for postgres that need pk name
* add ReadDbEffect to new procs
* add .since and changelog
* change since to 1.3
* Update lib/impure/db_postgres.nim

Co-authored-by: bung87 <crc32@qq.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: alaviss <leorize+oss@disroot.org>
2020-05-22 19:24:52 +02:00
Bung
390ff428f0 add SqlPrepared api fix #13559 (#14365)
Co-authored-by: bung87 <crc32@qq.com>
2020-05-16 15:50:04 +02:00
itsumura-h
87e6b88f3b fix #7241 (#13779)
finalize() should run in insert()
2020-04-03 09:38:05 +02:00
Juan Carlos
46ca19ff18 Deprecate DCE:on (#13839) 2020-04-02 02:58:43 +02:00
Ray Imber
7c23522b29 Documentation improvements around the db interface (#12362)
Added more details about the limits and reasoning behind the API.
Came about from this discussion on IRC: https://irclogs.nim-lang.org/04-10-2019.html#16:58:04
2019-10-08 11:24:06 +02:00
Andreas Rumpf
0d5bd7e8b5 removed unused imports [refactoring] 2019-08-08 17:03:19 +02:00
Andreas Rumpf
25e6c53bb5 makes the -d:nimIncremental compiler mode compile again 2019-07-27 14:01:28 +02:00
Huy
e5425b5f2f [feature] add unsafeColumnAt procs, that return unsafe cstring from InstantRow (#11647) 2019-07-10 14:56:09 +02:00
jiro
468599c654 db_sqlite: Update documentation (#10330) (#11266) 2019-05-19 20:27:12 +02:00
Zed
3b4952da94 Fix header inconsistencies in documentation (#11071) 2019-04-23 08:40:20 +02:00
Araq
7f0559b93f fixes #7241 2019-01-13 14:09:14 +01:00
Araq
3f6168b337 removes deprecated T/P types 2018-11-16 13:27:56 +01:00
Federico Ceratto
afc453beff Update example (#9395) 2018-10-17 00:17:37 +02:00
Andreas Rumpf
94684488d6 make more tests green 2018-08-14 21:15:03 +02:00
Varriount
381acc09e9 Update sqlite example to use empty strings.
Update sqlite example to use empty strings to use empty strings instead of nil.
2018-06-03 14:37:41 -04:00
Federico Ceratto
cb87bba82f Update example (#7788) 2018-06-01 11:28:20 -04:00
Dominik Picheta
af593c2ef3 Better db_sqlite errors when db_sqlite not connected. 2018-05-13 09:09:20 +02:00
Jacek Sieka
72dfe176f5 remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
Andreas Rumpf
bb5bab1b74 make tests green again 2017-11-07 12:57:32 +01:00
Andreas Rumpf
7083c8df57 minor improvement for the db_sqlite module 2017-09-27 12:00:19 +02:00
Dominik Picheta
6ca9e5cbcc Improved documentation for all db modules. 2016-01-18 13:34:53 +00:00
Andreas Rumpf
255177f7cd new db_sqlite requires deadCodeElim:on because not every sqlite3_column_name 2015-12-29 20:39:52 +01:00
Andreas Rumpf
1386592aab implements column information retrival for db_sqlite 2015-12-17 14:39:40 +01:00
Andreas Rumpf
a3c8bb9376 updated db*.nim modules 2015-12-16 21:24:13 +01:00
Andreas Rumpf
cb10f30656 big update for the db*.nim modules; uses new db_common.nim 2015-12-16 20:56:12 +01:00
JamesP
0edb04288b Clean up a line ending 2015-09-06 23:02:28 +10:00
JamesP
9aa9920602 instantRows doco added "the" to improve readability 2015-09-06 22:40:15 +10:00
JamesP
5ae33434f8 fastRows() iterator doco updated (similar to db_mysql) with sqlite specific
[Edb] error text
2015-09-06 22:39:23 +10:00
JamesP
81e41dc795 Add example (similar to db_mysql) with changes to table definition
and transaction to match sqlite SQL syntax
2015-09-06 22:34:04 +10:00
Adam Strzelecki
43bddf62dd lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
Adam Strzelecki
8742907133 db: InstantRow and instantRows
It is drop-in replacement for Row and fastRows, however instantRows returns a
handle, not seq[string], so no Nim string is created until [] operator is
called on the given handle. Also there is a len() proc returning number of
columns in the handle.

In some situations, when we iterate through many rows, but later we just read
few columns this solution will be quicker than converting all column to Nim
seq[string] on each iteration.
2015-06-09 20:53:03 +02:00
pdw
ea03fc6886 lib/impure - Dropped 'T' from types 2015-06-04 13:17:09 +02:00
Oleh Prypin
32109a7867 Don't run non-test code when defined(testing) 2015-04-21 14:37:29 +03:00
KeMeGe
171d51a08c move database encoding options to setEncoding(), leave open() as it is 2015-03-16 13:53:38 +08:00
KeMeGe
ca8102b96d Add character set options when opening DB connection 2015-03-14 15:21:38 +08:00
Araq
a41b62da97 fixes #1866 2015-01-10 23:52:29 +01:00
Araq
be813d205f updated db_sqlite.nim 2014-08-29 00:16:12 +02:00
Araq
d05df2173b Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
Grzegorz Adam Hankiewicz
d07f86b159 Avoids raising exceptions in tryInsertID. 2014-01-29 23:25:21 +01:00