Commit Graph

20763 Commits

Author SHA1 Message Date
Simon Hafner
a9d421e40f Merge pull request #1358 from def-/db_mysql-sql
Add missing sql proc for db_mysql
2014-07-14 14:03:10 -05:00
Andreas Rumpf
a271a07b64 resolved conflict 2014-04-10 01:47:20 +02:00
Araq
81dcfba125 Merge branch 'master' of github.com:Araq/Nimrod 2013-03-17 16:44:31 +01:00
Araq
cc4073fa60 Merge branch 'master' of github.com:Araq/Nimrod 2012-11-25 11:03:27 +01:00
Araq
5e801014fa fixes #250 2012-11-19 00:16:25 +01:00
Araq
0c583a38b4 'assert' hides EAssertionFailsure; stdlib makes use of 'tags' 2012-11-18 01:36:20 +01:00
Araq
e922895883 Merge branch 'master' of github.com:Araq/Nimrod 2012-10-20 18:48:49 +02:00
Araq
1b4db44660 openarray/varargs split; breaks bootstrapping 2012-08-16 08:34:33 +02:00
Araq
acadc5f5eb small bugfixes; documentation generator supports smilies for the forum 2012-05-01 11:14:29 +02:00
Araq
bc84a6e7ce added db_*.getRow 2012-04-24 08:44:36 +02:00
Araq
e8442eaf11 year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Andreas Rumpf
5bd3fbb2d6 bugfix: return type of gtk2.check_menu_item_new* 2010-03-17 18:58:34 +01:00
Andreas Rumpf
20de1a342e examples/lib use the new wrappers 2010-02-28 23:04:18 +01:00
Andreas Rumpf
8f0e58819e fixed pango/pangoutils new wrappers 2010-02-26 01:26:16 +01:00
Andreas Rumpf
1b686605d1 SQLite wrapper 2010-02-24 01:04:39 +01:00
rumpf_a@web.de
1a05787855 continued work on html/xmlparser 2010-02-14 00:29:35 +01:00
Andreas Rumpf
a04fc1c0f3 httpserver supports a fixed port number 2010-02-06 12:24:54 +01:00
Andreas Rumpf
1518052813 cleanup of library docs 2010-02-04 00:47:59 +01:00
Andreas Rumpf
b8296988d0 db_mysql.nim added 2010-01-29 08:09:23 +01:00
Andrey Makarov
1b5c7a6941 Markdown code blocks migration part 7 (#20547) 2022-10-12 17:13:43 +03:00
ringabout
70a19c8db8 make more standard libraries work with nimPreviewSlimSystem (#20343)
* make more standard libraries work with `nimPreviewSlimSystem`

* typo

* part two

* Delete specutils.nim

* fixes more tests

* more fixes

* fixes tests

* fixes three more tests

* add formatfloat import

* fix

* last
2022-09-28 02:06:23 +08:00
ee7
4010ad7229 make implicit cstring conversions explicit (#19488)
The Nim manual says that an implicit conversion to cstring will
eventually not be allowed [1]:

    A Nim `string` is implicitly convertible to `cstring` for convenience.

    [...]

    Even though the conversion is implicit, it is not *safe*: The garbage collector
    does not consider a `cstring` to be a root and may collect the underlying
    memory. For this reason, the implicit conversion will be removed in future
    releases of the Nim compiler. Certain idioms like conversion of a `const` string
    to `cstring` are safe and will remain to be allowed.

And from Nim 1.6.0, such a conversion triggers a warning [2]:

    A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning.
    This warning will become an error in future versions! Use an explicit conversion
    like `cstring(x)` in order to silence the warning.

However, some files in this repo produced such a warning. For example,
before this commit, compiling `parsejson.nim` would produce:

    /foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv]
    /foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv]

This commit resolves the most visible `CStringConv` warnings, making the
cstring conversions explicit.

[1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type
[2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
2022-08-19 21:40:53 +02:00
Andreas Rumpf
14c6c1c695 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
33f668caaf fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 (#19744) 2022-04-25 02:20:18 +08:00
Araq
c699f4b5ab db_sqlite: added a space 2022-03-18 14:17:54 +01:00
flywind
eaad754508 fix a sqlite bug (#18669) 2021-08-13 00:21:01 +08:00
Andrey Makarov
f3c0728405 docs: make inline markup more compatible with Markdown (#18053)
fixes https://github.com/timotheecour/Nim/issues/739
2021-05-21 07:54:20 +03:00
Andrey Makarov
b2d26fa9ca fix RST parsing when no indent after enum.item (fix #17249) (#17257) 2021-03-12 10:33:21 +03:00
Danil Yarantsev
89fe268007 Change stdlib imports to use std prefix in most examples (#17202) 2021-03-01 00:17:19 +03:00
flywind
fbb62a6c32 use single backtick (#17100) 2021-02-19 00:47:21 -06:00
RokkuCode
5b8ae3cbf4 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
42a503b069 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
d078a65a4d 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 src/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 13:44:47 +08:00
Bung
69b6a2dc3a 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 src/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-23 01:24:52 +08:00
Bung
2bfe76908d add SqlPrepared api fix #13559 (#14365)
Co-authored-by: bung87 <crc32@qq.com>
2020-05-16 21:50:04 +08:00
itsumura-h
0ac0f2e2c4 fix #7241 (#13779)
finalize() should run in insert()
2020-04-03 16:38:05 +09:00
Juan Carlos
90fe5e03af Deprecate DCE:on (#13839) 2020-04-01 21:58:43 -03:00
Ray Imber
8a40b19273 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 02:24:06 -07:00
Andreas Rumpf
f20f3269fc removed unused imports [refactoring] 2019-08-08 16:51:41 +02:00
Andreas Rumpf
d11230ea13 makes the -d:nimIncremental compiler mode compile again 2019-07-21 16:41:46 +02:00
Huy
79654a8191 add unsafeColumnAt procs, that return unsafe cstring from InstantRow (#11647) 2019-07-10 19:56:09 +07:00
jiro
e02ee2c195 db_sqlite: Update documentation (#10330) (#11266) 2019-05-20 03:27:12 +09:00
Zed
fb481c0df8 Fix header inconsistencies in documentation (#11071) 2019-04-23 08:40:20 +02:00
Andreas Rumpf
ad45dcd223 Merge branch 'devel' into araq-quirky-exceptions 2019-02-08 17:18:17 +01:00
Araq
8c15451400 removes deprecated T/P types 2018-11-16 13:27:46 +01:00
Federico Ceratto
ed588265ca Update example (#9395) 2018-10-16 23:17:37 +01:00
Andreas Rumpf
ebdbdb0ca5 fixes merge conflict 2018-08-19 15:14:03 +02:00
Andreas Rumpf
f503ef5fd9 fixed merge conflict 2018-06-04 16:16:50 +02:00
Araq
e1b3dc208a fixes testament compilation 2018-05-14 17:45:44 +02:00
Jacek Sieka
870869d081 remove dead code elimination option (#7669) 2018-04-23 17:02:38 +08:00