Commit Graph

411 Commits

Author SHA1 Message Date
jfilby
d2de2e7be1 Fix several memory leaks in the Postgres wrapper. (#20940)
(cherry picked from commit 5a848a0707)
2022-11-28 14:29:36 +01:00
ringabout
dd80e968e8 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>
(cherry picked from commit 06cd15663d)
2022-11-16 16:16:26 +01:00
ringabout
d79f61e54d fixes #20153; do not escape _ for mysql [backport] (#20164)
* 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>
(cherry picked from commit 3bd935f331)
2022-08-23 13:31:33 +02:00
flywind
0b44840299 enable style:usages for stdlib tests [backport: 1.6] (#19715)
* enable style:usages for stdlib tests

* freeAddrInfo

* more tests

* importc

* bufSize

* fix more

* => parseSql and renderSql

(cherry picked from commit 98cebad7de)
2022-05-22 18:20:25 +02:00
flywind
d38177b11f stylecheck usages part two: stdlib cleanup (#19338)
* stylecheck usages part two: stdlib cleanup

typeinfo.nim: importCompilerProc => importcompilerproc

nre.nim: newLineFlags => newlineFlags

system.nim: JSRoot => JsRoot

ref #19319

* prefer importCompilerProc

(cherry picked from commit ae92eac060)
2022-04-08 12:07:58 +02:00
Hamid Bluri
ec9e51abe6 fix not flushing stdout in MSYS (#19584)
discussed here https://forum.nim-lang.org/t/8975
2022-03-06 18:03:01 +01:00
Carlo Capocasa
f2e7e5d899 fix bug #14468 zero-width split (#19248) (#19269) 2021-12-20 13:10:51 +01:00
flywind
f559319a68 fix a sqlite bug (#18669) 2021-08-12 09:21:01 -07:00
flywind
9269a72f6f [nre]fix #17129 (#18632)
* fix #17129

* correct

* give reference implementaion links

* add comment

* typo

* I'm conservative

* change
2021-08-08 19:27:43 +02:00
Timothee Cour
c0abdaa2b4 improve runnableExamples and docs for std/nre (#18634)
* improve runnableExamples and docs for std/nre

* avoid too long lines in example
2021-08-02 22:22:47 -07:00
sivchari
980a9ed523 fix comment (#18473) 2021-07-11 02:19:20 -04:00
Timothee Cour
6387e28963 simplify rdstdin (#18382) 2021-06-28 13:09:14 -07:00
Andrey Makarov
969cb97c0a PCRE, nimgrep: add limit for buffer size (#18280) 2021-06-17 08:19:52 +02:00
flywind
6b97889f44 fix #9437(fix re.replace wrong behaviour) (#17546)
* fix nim js cmp fails at CT

* fix
2021-06-10 18:26:58 +02:00
Artem Klevtsov
3e57c2f780 Improve db_postgres iterators (#18144)
* 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
2021-06-03 14:41:57 +02:00
flywind
c0e8199acc [std/re] fix findBounds and find procs (#18028)
* [std/re] make interface consistent

* tiny

* revert
2021-05-31 23:28:22 +02:00
Andrey Makarov
9f7e2e3057 docs: make inline markup more compatible with Markdown (#18053)
fixes https://github.com/timotheecour/Nim/issues/739
2021-05-21 06:54:20 +02:00
flywind
65f6b66820 Revert "[std/re]fix terrible and strange interface" (#18027)
This reverts commit c218f2ba0b.
2021-05-16 11:10:41 +08:00
flywind
c218f2ba0b [std/re]fix terrible and strange interface 2021-05-16 10:39:52 +08:00
Thomas T. Jarløv
99788ee504 Escape %00 / \0 in dbQuote (#18015) [backport:1.4]
Fix https://github.com/nim-lang/Nim/issues/17925
2021-05-15 21:26:15 +02:00
Fröhlich A
5439cfc317 Fix insert calling wrong function (#17856)
The `insert` method is calling `tryInsertID`, which ignores the `pkName` parameter.
Calling `tryInsert` instead should be correct.
2021-04-29 14:11:05 +02:00
Andrey Makarov
d97bf4f1c8 fix RST parsing when no indent after enum.item (fix #17249) (#17257) 2021-03-12 08:33:21 +01:00
Timothee Cour
dd6b0f81ef use -r:off for runnableExamples that should compile but not run (#17203)
* use -r:off for runnableExamples that should compile but not run

* use -r:off in other RT disabled tests
2021-03-01 14:26:39 +01:00
Danil Yarantsev
56461c280f Change stdlib imports to use std prefix in most examples (#17202) 2021-02-28 13:17:19 -08:00
flywind
70ec17eede use single backtick (#17133) 2021-02-21 00:27:39 -08:00
flywind
a1a18cfe66 use single backtick (#17115) 2021-02-20 03:20:29 -08:00
flywind
9450bf6c08 use single backtick (#17100) 2021-02-18 22:47:21 -08:00
Timothee Cour
b9994925f5 remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 (#16918)
* nimNoArrayToCstringConversion deadcode
* nimbabel deadcode
* nimHasalignOf deadcode
* nimvarargstyped deadcode
* nimhygiene deadcode
* nimNewTypedesc deadcode
* nimlocks deadcode
* nimHasCppDefine deadcode
* nimHasRunnableExamples deadcode
* nimHasNilChecks deadcode
* nimSymKind deadcode
* minor macros refactoring
* nimVmEqIdent deadcode
* nimNoNil deadcode
* nimNoZeroTerminator deadcode
* nimHasSymOwnerInMacro deadcode
* nimVmExportFixed deadcode
* nimNewRuntime deadcode
* nimAshr deadcode
* nimUncheckedArrayTyp deadcode
* nimHasTypeof deadcode
* nimErrorProcCanHaveBody deadcode
* nimHasHotCodeReloading deadcode
* nimHasSignatureHashInMacro deadcode
* nimHasDefault deadcode
* nimMacrosSizealignof deadcode
2021-02-17 09:32:36 +01:00
Timothee Cour
630f867bd7 add linenoise.readLineStatus to get status (eg: ctrl-D or ctrl-C) (#16977)
* add linenoise.readLineStatus to get status (eg: ctrl-D or ctrl-C)

* changelog
2021-02-09 14:25:38 +01:00
flywind
f140c92409 fix some warnings (#16952) 2021-02-08 13:50:15 +01:00
Juan Carlos
78a99587a4 Deprecate TaintedString (#15423)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-01-15 18:56:38 -08:00
flywind
823a71380d fix #16103 (#16109) [backport:1.0]
* fix #16103

* docs
2020-11-24 12:37:41 +01:00
RokkuCode
ffccdf3c1a fixes #16080 (#16091) [backport:1.2]
* fixes #16080

db_sqlite: Error: undeclared field: 'untypedLen'

* redacting fix
2020-11-23 15:15:55 +01:00
Andreas Rumpf
2773efa034 fixes db_mysql broken quoting; refs c16ee37a71 (r44209990) [backport:1.4] (#16035) 2020-11-18 23:06:16 +01:00
Regis Caillaud
6fa82a5b3a 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
Andreas Rumpf
a43202ea57 fixes #15560 (#15587) 2020-10-15 15:49:00 +02:00
Miran
eb2a4961c7 various documentation fixes [backport] (#15422) 2020-09-29 23:43:12 +02:00
shirleyquirk
f8866598e7 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 17:08:24 +02:00
Andreas Rumpf
50b6f6996a .noalias annotation; frontend support (#15419)
* .noalias annotation; frontend support

* added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
2020-09-28 13:51:39 +02:00
Bung
c16ee37a71 Fix #15219 SQL escape in db_mysql is not enough (#15234) 2020-09-04 11:04:27 +02:00
Andreas Rumpf
ccccd30cf6 fixes #15221 (#15230) 2020-08-27 11:25:20 +02:00
Andreas Rumpf
ddff13f01b better strict funcs, WIP (#15199)
* better strict funcs, WIP

* progress
2020-08-18 12:45:22 +02:00
Juan Carlos
c9fdad2c21 db_postgres document how to use it with unix socket (#15187) 2020-08-17 08:39:58 +02:00
cooldome
a528382e05 fix sqlgetdata regression in odbc (#15161)
* fix sqlgetdata import

* fix db_odbc

* more fixes

* fix style
2020-08-07 22:37:54 +02:00
Andreas Rumpf
c5358b0d4b An optimizer for ARC (#14962)
* WIP: an optimizer for ARC
* do not optimize away destructors in 'finally' if unstructured control flow is involved
* optimized the optimizer
* minor code cleanup
* first steps to .cursor inference
* cursor inference: big steps to a working solution
* baby steps
* better .cursor inference
* new feature: expandArc for easy inspection of the AST after ARC transformations
* added topt_cursor test
* adapt tests
* cleanups, make tests green
* optimize common traversal patterns
* moved test case
* fixes .cursor inference so that npeg compiles once again
* cursor inference: more bugfixes

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-07-15 23:00:06 +02:00
narimiran
46aacf917f Fix style inconsistencies due to the previous commit 2020-07-06 11:24:43 +02:00
narimiran
ebaf603c84 revert 0944b0f4 2020-07-06 10:55:51 +02:00
Juan Carlos
4f6acf24ff Add jsre (#14870) 2020-07-03 20:13:10 +02:00
Miran
e7f280bd26 Remove deprecated stuff from stdlib (#14699)
* update to the latest Jester

* remove deprecated procs from some stdlib modules

* 'criterion' is not maintained anymore and relies on obsolete stuff
2020-06-17 15:25:02 +02:00
Timothee Cour
17d08ff71c close #14284 document semantics for start for re,nre; improve examples (#14483) 2020-05-28 20:43:36 +02:00