| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove db stuffs
* remove punycode
* remove
* fixes script
* add cloner
* patches
* disable
* patch
* fixes external packages
* disable two packages
* preview documentation build
* try again
* fixes URL
* fixes a bug
* simplify
* fixes documentaion
* fixes
* Apply suggestions from code review
|
| |
|
| |
|
|
|
|
|
| |
* refactor dbFormat
* add simple tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix pqSetSingleRowMode case. Add links to the docs
* Add missing PGContextVisibility enum
* Remove unused PGContextVisibility enum
* Improve db_postgres iterators
* Fix instantRows with DbColumns. Cosmetics.
* Reduce copy&paste in db_postgres
* Move pqclear inside loop
|
|
|
| |
Fix https://github.com/nim-lang/Nim/issues/17925
|
|
|
|
| |
The `insert` method is calling `tryInsertID`, which ignores the `pkName` parameter.
Calling `tryInsert` instead should be correct.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
|
|
|
| |
Fixes nim-lang/Nim#11821
|
|
|
|
| |
InstantRow (#11647)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Ref #3569. Ref #3560.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
line up multi-line text
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
add tryExec() with SqlPrepared parameter
exec() with SqlQuery now expects "?" parameter substitution
|
|
|
|
| |
add check to prepare() that parameter substitution has "$1" identifier
|
|
|
|
| |
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/impure/db_postgres.nim
lib/pure/json.nim
lib/pure/math.nim
lib/system/atomics.nim
|
| | |
|
| | |
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/impure/db_postgres.nim
lib/pure/os.nim
lib/wrappers/postgres.nim
|
| |
| |
| |
| | |
for sql parameter passing
|
| | |
|
| | |
|
| | |
|