module

Artistry

Constants

VERSION = "0.13.0"

Class methods

close
Source
conn
Source
db_path
Source
db_path=(db_path : String)
Source
next_kind_seq(code : String) : Int64

Atomically allocate the next kind_seq for a given artifact code.

Inserts or increments the counter in kind_counter, then returns the new sequence number. Thread-safe via SQLite's write lock.

Source
open(path : String = db_path) : DB::Database

Open a new connection by path (Artistry owns and will close it)

Source
open(db : DB::Database) : DB::Database

Use an existing connection (caller owns it, Artistry won't close it)

Source
open(path : String = db_path, &) : Nil
Source
open(db : DB::Database, &) : Nil
Source
optimize

Let SQLite refresh the statistics its query planner chooses indexes by (PRAGMA optimize, which analyzes a table only when it has none or has changed a lot, so it's quick otherwise). Without them it can pass over an index. Runs on open and on close; a long-running process can call it now and then too.

Source
transaction
Source

Nested types