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] = "john.smith@example.com";
}).asSQL();

// Select query example
auto email = new Column!string("email");
users.select().where(email.eq("john.smith@example.com")).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:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 18 downloads total

Score:
0.8
Short URL:
fluentsqlite.dub.pm