{"id":26601413,"url":"https://github.com/philippmdoerner/lowdb","last_synced_at":"2025-04-09T16:34:12.393Z","repository":{"id":109539017,"uuid":"556190940","full_name":"PhilippMDoerner/lowdb","owner":"PhilippMDoerner","description":"A fork of nim's db_sqlite library based on ndb with proper typing","archived":false,"fork":false,"pushed_at":"2023-08-06T10:49:37.000Z","size":221,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T18:50:51.736Z","etag":null,"topics":["database","nim","nim-lang","postgres","sql","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhilippMDoerner.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-23T09:17:42.000Z","updated_at":"2024-11-09T18:41:36.000Z","dependencies_parsed_at":"2025-03-23T18:40:07.985Z","dependency_job_id":"3f0aee5c-1715-4d73-91d6-5d9a4f6076c7","html_url":"https://github.com/PhilippMDoerner/lowdb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippMDoerner%2Flowdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippMDoerner%2Flowdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippMDoerner%2Flowdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhilippMDoerner%2Flowdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhilippMDoerner","download_url":"https://codeload.github.com/PhilippMDoerner/lowdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067785,"owners_count":21042357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","nim","nim-lang","postgres","sql","sqlite"],"created_at":"2025-03-23T18:39:53.584Z","updated_at":"2025-04-09T16:34:12.386Z","avatar_url":"https://github.com/PhilippMDoerner.png","language":"Nim","readme":"# lowdb\n\n_An ndb fork capable of working with nim 2.0_\n\nA fork of [db_sqlite](https://nim-lang.org/docs/db_sqlite.html) and [db_postgres](https://nim-lang.org/docs/db_postgres.html), Nim's database libraries for Sqlite and Postgres, based on [ndb](https://github.com/xzfc/ndb.nim).\n\nWarning: work in progress, API is a subject of change.\n\n- [API index](https://philippmdoerner.github.io/lowdb/lowdb.html)\n\n# Installation\nInstall lowdb with [Nimble](https://github.com/nim-lang/nimble):\n\n    $ nimble install -y lowdb\n\nAdd lowdb to your .nimble file:\n\n    requires \"lowdb\"\n\n# Features\n### General\n  * No more empty strings as a default placeholder value.\n    Empty string, ``NULL``, and an absence of a row are distinguished.\n\n### SQLite:\n  * Binding ``?`` parameters is done with native SQlite [`sqlite3_bind_*`](https://www.sqlite.org/c3ref/bind_blob.html)functions instead of stringifying and then escaping every parameter.\n    As a result:\n    * In addition to ``?``, the ``?NNN`` syntax is supported. See [sqlite3_varparam](https://www.sqlite.org/lang_expr.html#varparam).\n    * Inserting binary blobs is handled in a proper way. See [Nim#5768](https://github.com/nim-lang/Nim/issues/5768).\n    * It is possible to insert the `NULL` value.\n\n# Example\n\n```nim\nimport lowdb/sqlite\nlet db = open(\":memory:\", \"\", \"\", \"\")\n\n# Insert NULL\ndb.exec(sql\"CREATE TABLE foo (a, b)\")\ndb.exec(sql\"INSERT INTO foo VALUES (?, ?)\", 1, DbNull())\n\n# Insert binary blob\ndb.exec(sql\"CREATE TABLE blobs (a BLOB)\")\ndb.exec(sql\"INSERT INTO blobs VALUES (?)\", DbBlob \"\\x00\\x01\\x02\\x03\")\nlet blobValue = db.getAllRows(sql\"SELECT * FROM BLOBS\")[0][0].b\n\ndb.close()\n```\n\n# lowdb/postgres\n\nInitial PostgreSQL support is provided. It is not complete yet.\n\n# Why Fork ndb?\nFirst up, we want to give a huge shoutout to the original author of the package, Albert Safin, who made this possible. We are thankful for the effort that went into this package and that has served us well over the years. \n\nNow why did we decide to fork?\nWe, the developers of norm, depend on this package and it staying up to date as well as adding more support of postgres features. This is particularly relevant for the (as of 09.02.2023 still upcoming) release of nim 2.0, which break this package and subsequently norm. Sadly, ndb appears to no longer be actively maintained and has become a bottleneck for developing norm.\n\nAs such we have decided to maintain our own fork of it, to be able to prepare norm for the upgrade to nim 2.0, the addition of asynchronous usage of postgres and maybe more in the future.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippmdoerner%2Flowdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilippmdoerner%2Flowdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippmdoerner%2Flowdb/lists"}