summary refs log tree commit diff stats
path: root/lib/impure/db_mysql.nim
Commit message (Collapse)AuthorAgeFilesLines
* refactor dbFormat (#19746)ringabout2022-09-291-11/+4
| | | | | * refactor dbFormat * add simple tests
* Implement Pandoc Markdown concise link extension (#20304)Andrey Makarov2022-09-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement Pandoc Markdown concise link extension This implements https://github.com/nim-lang/Nim/issues/20127. Besides reference to headings we also support doing references to Nim symbols inside Nim modules. Markdown: ``` Some heading ------------ Ref. [Some heading]. ``` Nim: ``` proc someFunction*() ... ... ## Ref. [someFunction] ``` This is substitution for RST syntax like `` `target`_ ``. All 3 syntax variants of extension from Pandoc Markdown are supported: `[target]`, `[target][]`, `[description][target]`. This PR also fixes clashes in existing files, particularly conflicts with RST footnote feature, which does not work with this PR (but there is a plan to adopt a popular [Markdown footnote extension](https://pandoc.org/MANUAL.html#footnotes) to make footnotes work). Also the PR fixes a bug that Markdown links did not work when `[...]` section had a line break. The implementation is straightforward since link resolution did not change w.r.t. RST implementation, it's almost only about new syntax addition. The only essential difference is a possibility to add a custom link description: form `[description][target]` which does not have an RST equivalent. * fix nim 1.0 gotcha
* Markdown code blocks part 6 (#20292)Andrey Makarov2022-08-311-37/+39
|
* make implicit cstring conversions explicit (#19488)ee72022-08-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fixes #20153; do not escape `_` for mysql [backport] (#20164)ringabout2022-08-051-2/+1
| | | | | | | | | | | * fixes #20153; do not escape `_` for mysql * add a test * Update db_mysql.nim * Update tdb_mysql.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* enable style:usages for stdlib tests [backport: 1.6] (#19715)flywind2022-04-131-10/+10
| | | | | | | | | | | | | | | * enable style:usages for stdlib tests * freeAddrInfo * more tests * importc * bufSize * fix more * => parseSql and renderSql
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-2/+2
|
* use single backtick (#17100)flywind2021-02-181-3/+3
|
* fixes db_mysql broken quoting; refs ↵Andreas Rumpf2020-11-181-1/+0
| | | | https://github.com/nim-lang/Nim/commit/c16ee37a7106c645a0d17cc6bd8d399e20f61d96#r44209990 [backport:1.4] (#16035)
* fixes #15560 (#15587)Andreas Rumpf2020-10-151-2/+1
|
* Fix #15219 SQL escape in db_mysql is not enough (#15234)Bung2020-09-041-3/+17
|
* add insert,tryInsert unify for postgres that need pk name (#14416)Bung2020-05-221-0/+15
| | | | | | | | | | | * 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>
* use system.move instead of system.shallowCopy if the GC mode requires itAndreas Rumpf2019-10-041-1/+1
|
* [feature] add `unsafeColumnAt` procs, that return unsafe cstring from ↵Huy2019-07-101-0/+4
| | | | InstantRow (#11647)
* Fix header inconsistencies in documentation (#11071)Zed2019-04-231-6/+6
|
* removes deprecated T/P typesAraq2018-11-161-1/+0
|
* make more tests greenAndreas Rumpf2018-08-141-30/+5
|
* db_mysql.nim: Work around string nil comparison logicAndreas Rumpf2018-06-041-1/+1
|
* fixes #7200Andreas Rumpf2018-02-101-20/+21
|
* Fix segfault in db_mysql fastRows (#5605)pgkos2017-03-261-4/+20
|
* Improved documentation for all db modules.Dominik Picheta2016-01-181-1/+43
|
* fixes InstantRow decl; implements column information retrival for db_mysqlAndreas Rumpf2015-12-171-5/+88
|
* updated db*.nim modulesAndreas Rumpf2015-12-161-1/+1
|
* big update for the db*.nim modules; uses new db_common.nimAndreas Rumpf2015-12-161-47/+27
|
* Bold emphasis and fix typo.Dominik Picheta2015-09-051-2/+2
|
* Cleanup of line endingsJamesP2015-09-051-34/+34
|
* instantRows doco updated with "the" to improve readabilityJamesP2015-09-051-1/+1
|
* fastRows iterator doco updated to clarify what happensJamesP2015-09-051-3/+7
| | | | when break a fastRows loop
* lib/impure/db_mysql add example code-blockJamesP2015-08-291-0/+31
|
* fixes #3220 lib/impure/db_mysql.nim getValue()JamesP2015-08-281-4/+1
| | | | | mysql connector command out of sync error due to breaking the fastRows iterator loop
* db: InstantRow and instantRowsAdam Strzelecki2015-06-091-0/+27
| | | | | | | | | | | 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.
* lib/impure - Dropped 'T' from typespdw2015-06-041-30/+31
|
* move database encoding options to setEncoding(), leave open() as it isKeMeGe2015-03-161-6/+8
|
* Add character set options when opening DB connectionKeMeGe2015-03-141-2/+6
|
* Corrected warnings about deprecated namesHans Raaf2015-02-111-2/+2
| | | | I got warning about deprecated names here. I also know that other names probably need to change (T/P prefixes) but I am unsure about the exact rules. I may do that later if you like.
* changed formatingAraq2014-12-081-4/+3
|
* Merge branch 'devel' into bigbreakAraq2014-11-031-5/+19
|\ | | | | | | | | | | | | | | Conflicts: lib/impure/db_postgres.nim lib/pure/json.nim lib/pure/math.nim lib/system/atomics.nim
| * Add comment.Milos Negovanovic2014-10-211-0/+1
| |
| * Preserve nil <-> NULL between Nimrod and database.Milos Negovanovic2014-08-201-5/+18
| |
* | More docgen fixes.Dominik Picheta2014-09-131-25/+25
| |
* | Nimrod renamed to NimAraq2014-08-281-1/+1
|/
* Add missing sql proc for db_mysqldef2014-07-141-0/+9
|
* Fix for db_mysql.Open. 'Connection' argument in 'Open' was not used, so ↵Miguel2014-02-101-8/+8
| | | | MySQL host and port were always default ones. Now 'Connection' is treated as 'host:port'.
* Merge branch 'devel' of git://github.com/Araq/NimrodMiguel2014-01-261-12/+12
|\
| * case consistency improvementsAraq2014-01-111-12/+12
| |
* | 'Connection' argument in 'Open' was not used, so MySQL host and port were ↵Miguel2013-12-221-3/+9
|/ | | | always default ones. Now 'Connection' is treated as 'host:port'.
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
|
* Merge pull request #262 from gradha/pr_adds_some_documentation_to_db_modulesAraq2012-11-241-5/+7
|\ | | | | Documents NULL to "" db_* transformation and return values.
| * Documents NULL to "" db_* transformation and return values.Grzegorz Adam Hankiewicz2012-11-241-5/+7
| |
* | fixes #250Araq2012-11-191-2/+2
|/