Commit Graph

20857 Commits

Author SHA1 Message Date
Dominik Picheta
043d77d2bc Improved postgres docs and added untestable tests. 2015-10-26 21:10:21 +01:00
JamesP
24c0887f54 fix doco by removing extra ` chars, change a word and line up multi-line text 2015-10-13 07:34:32 +10:00
JamesP
8fb1a0fa9e add doco outlining the two SQL parameter substitution mechanisms for the db_postgres module
adjust doco note: indent by one space

shorten doco example lines, by splitting across multiple lines

shorten doco line widths by splitting long lines into multi-lines

fix to prepare() example in doco "Note:" section
2015-09-17 14:15:33 +10:00
JamesP
a69826615a setupQuery() with SqlQuery take parameter substitution with "?"
add instantRows() with SqlPrepared parameter

fix setupQuery() for SqlQuery to produce a unique identiying query name

add rows() iterator with SqlPrepared parameter

add execAffectedRows for SqlPrepared
2015-09-17 13:08:24 +10:00
JamesP
f9f73aed79 tryExec() with SqlQuery now takes "?" substitution parameters
add tryExec() with SqlPrepared parameter

exec() with SqlQuery now expects "?" parameter substitution
2015-09-17 09:46:41 +10:00
JamesP
2179f45be2 add check to dbFormat() to verify parameter substitution has "?" identifier
add check to prepare() that parameter substitution has "$1" identifier
2015-09-17 09:42:40 +10:00
Andreas Rumpf
2157ebc536 Merge pull request #3289 from nanoant/patch/fix-whitespace
Patch/fix whitespace
2015-09-04 23:37:59 +02:00
Andreas Rumpf
8023c2c851 Merge pull request #2866 from nanoant/patch/db-deffered-rows
db: InstantRow and instantRows
2015-06-10 11:06:36 +02:00
pdw
7240056537 lib/impure - Dropped 'T' from types 2015-05-24 22:24:07 -05:00
Andreas Rumpf
88791d9a9e Merge pull request #2337 from kemege/db_charset
Add character set options when opening DB connection, default to UTF-8
2015-03-17 01:32:26 +01:00
Andreas Rumpf
01648fead0 Merge pull request #1889 from ramnes/devel
Happy new year!
2015-01-07 14:14:43 +01:00
Araq
c71afbcd53 Merge branch 'devel' into bigbreak
Conflicts:
	src/db_postgres.nim
	lib/pure/json.nim
	lib/pure/math.nim
	lib/system/atomics.nim
2014-11-03 11:42:36 +01:00
Araq
b984992511 docgen should work again 2014-10-05 03:06:19 +02:00
Araq
b612c42e1c Merge branch 'devel' of https://github.com/Araq/Nimrod into bigbreak
Conflicts:
	src/db_postgres.nim
	lib/pure/os.nim
	lib/wrappers/postgres.nim
2014-10-04 19:40:23 +02:00
Araq
1bb90ad3ae cleaned up various modules 2014-09-19 00:54:01 +02:00
Araq
0e5874a93a resolved conflict 2014-09-13 17:59:37 +02:00
Araq
00e4d53100 Nimrod renamed to Nim 2014-08-28 09:59:26 +02:00
Araq
76ae6168d8 Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
Andreas Rumpf
4eb3dda5e4 resolved conflict 2014-04-10 01:47:20 +02:00
Zahary Karadjov
f882499ca2 Merge branch 'master' of github.com:Araq/Nimrod into upstream 2013-12-09 00:26:04 +02:00
Araq
657f3bdfd0 Merge branch 'master' of github.com:Araq/Nimrod 2013-03-17 16:44:31 +01:00
Araq
3e4072c6ea Merge branch 'master' of github.com:Araq/Nimrod 2012-11-25 11:03:27 +01:00
Araq
f1a64fdb1c fixes #250 2012-11-19 00:16:25 +01:00
Araq
4ade87d840 'assert' hides EAssertionFailsure; stdlib makes use of 'tags' 2012-11-18 01:36:20 +01:00
Araq
593b731002 Merge branch 'master' of github.com:Araq/Nimrod 2012-10-20 18:48:49 +02:00
Araq
9a99aeac00 openarray/varargs split; breaks bootstrapping 2012-08-16 08:34:33 +02:00
Araq
d34c093f8d changed integer promotion rules; breaks bootstrapping and lots of code 2012-07-08 21:03:47 +02:00
Araq
32c87721a7 small bugfixes; documentation generator supports smilies for the forum 2012-05-01 11:14:29 +02:00
Araq
512d1d0bb2 added db_*.getRow 2012-04-24 08:44:36 +02:00
Araq
910dd6bcc9 year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Andreas Rumpf
c49e9ff84b fixed pango/pangoutils new wrappers 2010-02-26 01:26:16 +01:00
Andreas Rumpf
8ce203abe0 SQLite wrapper 2010-02-24 01:04:39 +01:00
rumpf_a@web.de
9743e567ae continued work on html/xmlparser 2010-02-14 00:29:35 +01:00
Andreas Rumpf
1c8496a3ad cleanup of library docs 2010-02-04 00:47:59 +01:00
Andreas Rumpf
af073ad381 bugfixes for the high-level postgreSQL wrapper 2010-01-29 01:50:39 +01:00
Andreas Rumpf
9e21f3aa24 bugfix: fd_set mustn't be prefixed with struct 2010-01-14 00:05:02 +01:00
Andreas Rumpf
1c2b176d62 bugfix: inconsequent tuple usage 2009-12-09 00:41:55 +01:00
Andreas Rumpf
7c01f52e92 bug concerning constant evaluation fixed 2009-11-26 00:32:07 +01:00
rumpf_a@web.de
20cd512457 version 0.8.2 2009-10-21 10:20:15 +02:00
ringabout
a6997fb8eb fixes ptr to cstring warnings[backport] (#20848)
* fix =#13790 ptr char (+friends) should not implicitly convert to cstring

* Apply suggestions from code review

* first round; compiles on windows

* nimPreviewSlimSystem

* conversion is unsafe, cast needed

* fixes more tests

* fixes asyncnet

* another try another error

* last one

* true

* one more

* why bugs didn't show at once

* add `nimPreviewCstringConversion` switch

* typo

* fixes ptr to cstring warnings[backport]

* add fixes

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-11-16 17:22:51 +08:00
Andrey Makarov
d0cc21e322 Markdown code blocks migration part 7 (#20547) 2022-10-12 17:13:43 +03:00
ringabout
769869c699 refactor dbFormat (#19746)
* refactor dbFormat

* add simple tests
2022-09-29 18:16:42 +08:00
Andrey Makarov
344d861247 Implement Pandoc Markdown concise link extension (#20304)
* 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
2022-09-04 21:52:21 +03:00
ee7
a3eb2381f2 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
Danil Yarantsev
2834588250 Change stdlib imports to use std prefix in most examples (#17202) 2021-03-01 00:17:19 +03:00
flywind
05f1ddc34c use single backtick (#17100) 2021-02-19 00:47:21 -06:00
shirleyquirk
234ecc42fa odbc regression from #14357 (#15417)
#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"
2020-09-29 16:08:24 +01:00
cooldome
36a191c9e6 fix sqlgetdata regression in odbc (#15161)
* fix sqlgetdata import

* fix db_odbc

* more fixes

* fix style
2020-08-07 21:37:54 +01:00
Bung
246b6e3ae0 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
53836903d3 fix #9771 (#14357)
* fix #9771
* map SQLLEN SQLULEN
* fix proc params take TSqlLen

Co-authored-by: bung87 <crc32@qq.com>
2020-05-16 03:00:06 +08:00