summary refs log tree commit diff stats
path: root/lib/impure/db_odbc.nim
Commit message (Collapse)AuthorAgeFilesLines
* Implement Pandoc Markdown concise link extension (#20304)Andrey Makarov2022-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* make implicit cstring conversions explicit (#19488)ee72022-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-2/+2
|
* use single backtick (#17100)flywind2021-02-181-5/+5
|
* odbc regression from #14357 (#15417)shirleyquirk2020-09-291-1/+1
| | | | #14357 changed from sending 'val', an int, to a pointer to int, which is understandable, but not how SQLSetEnvAttr works. "Depending on the value of Attribute, ValuePtr will be a 32-bit integer value or point to a null-terminated character string"
* fix sqlgetdata regression in odbc (#15161)cooldome2020-08-071-12/+8
| | | | | | | | | * fix sqlgetdata import * fix db_odbc * more fixes * fix style
* 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>
* fix #9771 (#14357)Bung2020-05-151-5/+5
| | | | | | | * fix #9771 * map SQLLEN SQLULEN * fix proc params take TSqlLen Co-authored-by: bung87 <crc32@qq.com>
* [backport] Fix typo in docs (#12356) [ci skip]Andrew Owen2019-10-041-1/+1
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* [feature] add `unsafeColumnAt` procs, that return unsafe cstring from ↵Huy2019-07-101-1/+5
| | | | InstantRow (#11647)
* Fix header inconsistencies in documentation (#11071)Zed2019-04-231-6/+6
|
* Fix wrong integer types in odbcsql and db_odbc (#10419)pgkos2019-01-221-46/+18
| | | | | * Fix wrong parameter type in SQLErr * Fix wrong types of integers passed to SQLGetData
* Restrict ptr/ref to ptr/ref implicit conversion (#10411)LemonBoy2019-01-221-5/+9
| | | | | | | | * Restrict ptr/ref to ptr/ref implicit conversion Fixes #10409 * Make the ptr conversions explicit in db_odbc
* Fix ODBC SQL Error string decoding (#10207) [backport]Leonardo Cecchi2019-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ODBC Errors were presented to the users as a sequence of characters. I.e.: >test_oracle.exe Error: ['H', 'Y', '0', '0', '0', '\x00', '\x00', ...] test_oracle.nim(15) test_oracle test_oracle.nim(8) test_oracle db_odbc.nim(534) open db_odbc.nim(168) dbError Error: unhandled exception: ODBC Error [DbError] This patch fix the string decoding, creating a real string: >test_oracle.exe Error: HY000 [Oracle][ODBC][Ora]ORA-12541: TNS:no listener test_oracle.nim(15) test_oracle test_oracle.nim(8) test_oracle db_odbc.nim(534) open db_odbc.nim(168) dbError Error: unhandled exception: ODBC Error [DbError]
* removes deprecated T/P typesAraq2018-11-161-2/+0
|
* docs: remove most stale links; refs #9109Araq2018-09-291-9/+6
|
* Merge branch 'db_odbc2' of https://github.com/jlp765/Nim into jlp765-db_odbc2Andreas Rumpf2016-05-281-23/+22
|\
| * Fix row reading procs to not use SQLRowCount, but SQLFetch until returns ↵JamesP2016-01-241-54/+49
| | | | | | | | | | | | SQL_NO_DATA change SqlCheck() and SqlGetDBMS() to sqlCheck() and sqlGetDBMS() (camelCase consistency)
* | Repair using the db_odbc module to query the Oracle database, the program ↵lihf85152016-03-211-80/+122
|/ | | | compiled in the release mode, the return of the field value is null.
* Improved documentation for all db modules.Dominik Picheta2016-01-181-3/+45
|
* updated db*.nim modulesAndreas Rumpf2015-12-161-50/+33
|
* add db_odbc library moduleJamesP2015-12-091-0/+480