fluentsqlite 0.1.3

A wrapper for SQLite to use a fluent interface for creating SQL queries.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

FluentSQLite

An implementation of SQLite Query Builder in D Lang, originally ported from fluks in Kotlin.

Usage

import taskdesigns.sqlite;

// Define a table
auto users = new Table("users");

// Creating a table example
users.create( (it) {
    auto id = new Column!int("id");
    auto name = new Column!string("name");
    auto email = new Column!string("email");
    it.column(id, true, false, true);
    it.column(name);
    it.column(email);
}).asSQL();

// Insert statement example
users.insert( (it) {
    auto name = new Column!string("name");
    auto email = new Column!string("email");
    it[name] = "John Smith";
    it[email] = "[email protected]";
}).asSQL();

// Select query example
auto email = new Column!string("email");
users.select().where(email.eq("[email protected]")).asSQL();

Installation

Dub Manually:

dub add fluentsqlite

Dub SDL:

dependency "fluentsqlite" version="~>0.1.1"

Dub JSON:

"fluentsqlite": "~>0.1.1"
Authors:
  • Salman T. Khan
Dependencies:
none
Versions:
0.1.5 2021-May-29
0.1.4 2021-May-26
0.1.3 2021-May-26
0.1.2 2021-May-26
0.1.1 2021-May-17
Show all 7 versions
Download Stats:
  • 1 downloads today

  • 3 downloads this week

  • 6 downloads this month

  • 35 downloads total

Score:
1.0
Short URL:
fluentsqlite.dub.pm