All Projects → xzfc → ndb.nim

xzfc / ndb.nim

Licence: MIT license
A db_sqlite fork with a proper typing

Programming Languages

nim
578 projects
Nix
1067 projects

Labels

Projects that are alternatives of or similar to ndb.nim

Sqleet
SQLite3 encryption that sucks less
Stars: ✭ 244 (+542.11%)
Mutual labels:  sqlite3
usqlite
μSQLite library module for MicroPython
Stars: ✭ 52 (+36.84%)
Mutual labels:  sqlite3
AC Management
A desktop application made with Python/Kivy for managing account related data of college students'
Stars: ✭ 23 (-39.47%)
Mutual labels:  sqlite3
sqllex
The most pythonic ORM (for SQLite and PostgreSQL). Seriously, try it out!
Stars: ✭ 80 (+110.53%)
Mutual labels:  sqlite3
Swift-FFDB
a Object/Relational Mapping (ORM) support to iOS and MacOS .Since SwiftFFDB is build on top of FMDB.
Stars: ✭ 22 (-42.11%)
Mutual labels:  sqlite3
ZXDataHandle
简单易用的数据转换和存储框架,支持一行代码将模型、模型数组、Json字符串、字典互转;支持模型映射到sqlite3数据库,无需书写sql
Stars: ✭ 13 (-65.79%)
Mutual labels:  sqlite3
Knex
A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
Stars: ✭ 15,083 (+39592.11%)
Mutual labels:  sqlite3
sqlite-kit
Non-blocking SQLite client library with SQL builder built on SwiftNIO
Stars: ✭ 51 (+34.21%)
Mutual labels:  sqlite3
xyr
Query any data source using SQL, works with the local filesystem, s3, and more. It should be a very tiny and lightweight alternative to AWS Athena, Presto ... etc.
Stars: ✭ 58 (+52.63%)
Mutual labels:  sqlite3
CMU-15445
https://www.jianshu.com/nb/36265841
Stars: ✭ 220 (+478.95%)
Mutual labels:  sqlite3
HealthApp
A desktop application to fetch Wikipedia,Google,Disease results and save them as text file,in database.Have a Section to search details about doctors in location
Stars: ✭ 23 (-39.47%)
Mutual labels:  sqlite3
Luki
[Deprecated] The official repository for Luki the Discord bot
Stars: ✭ 21 (-44.74%)
Mutual labels:  sqlite3
hybrid-disk-cache
A hybrid disk cache library that utilized both the solid SQLite3 and file system.
Stars: ✭ 19 (-50%)
Mutual labels:  sqlite3
Mikro Orm
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.
Stars: ✭ 3,874 (+10094.74%)
Mutual labels:  sqlite3
SQLiteHelper
🗄 This project comes in handy when you want to write a sql statement easily and smarter.
Stars: ✭ 57 (+50%)
Mutual labels:  sqlite3
Rsqlite
R interface for SQLite
Stars: ✭ 225 (+492.11%)
Mutual labels:  sqlite3
SQLiteReverse
腾讯课堂《SQLite数据库逆向分析》
Stars: ✭ 118 (+210.53%)
Mutual labels:  sqlite3
grafito
Portable, Serverless & Lightweight SQLite-based Graph Database in Arturo
Stars: ✭ 95 (+150%)
Mutual labels:  sqlite3
sqlite-nio
Non-blocking wrapper for libsqlite3-dev using SwiftNIO
Stars: ✭ 33 (-13.16%)
Mutual labels:  sqlite3
ionic2-PreDB
Simple Ionic 2+ with pre-populated database starter project
Stars: ✭ 14 (-63.16%)
Mutual labels:  sqlite3

ndb/sqlite

Documentation Build Status License: MIT Version

A fork of db_sqlite, Nim's standard library higher level SQLite database wrapper. Warning: work in progress, API is a subject of change.

Features

  • Binding ? parameters is done with native SQlite sqlite3_bind_* functions instead of stringifying and then escaping every parameter. As a result:
    • In addition to ?, the ?NNN syntax is supported. See sqlite3_varparam.
    • Inserting binary blobs is handled in a proper way. See Nim#5768.
    • It is possible to insert the NULL value.
  • No more empty strings as a default placeholder value. Empty string, NULL, and an absence of a row are distinguished.

Example

import ndb/sqlite
let db = open(":memory:", "", "", "")

# Insert NULL
db.exec(sql"CREATE TABLE foo (a, b)")
db.exec(sql"INSERT INTO foo VALUES (?, ?)", 1, DbNull())

# Insert binary blob
db.exec(sql"CREATE TABLE blobs (a BLOB)")
db.exec(sql"INSERT INTO blobs VALUES (?)", DbBlob "\x00\x01\x02\x03")
let blobValue = db.getAllRows(sql"SELECT * FROM BLOBS")[0][0].b

db.close()

ndb/postgres

Initial PostgreSQL support is provided. It is not complete yet.

Roadmap

This approach can be extended to other db_* modules in a consistent way:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].