Databases

This package describes the database API for Bob. Database APIs establish how your programs can query for file lists using known pre-coded protocols that assure reproducibility. This package contains only the base API for you to create and distribute new databases and a single, very simple example using the publicly available Iris Flower Dataset.

Build a database package for Bob goes pretty much like building a satellite package. For examples and details, have a look at our satellite package portal.

Core Utilities

apsw_is_available() Checks lock-ability for SQLite on the current file system
connection_string(dbtype, dbfile[, opts]) Returns a connection string for supported platforms
create_engine_try_nolock(dbtype, dbfile[, echo]) Creates an engine connected to an SQLite database with no locks.
makedirs_safe(directory[, dryrun]) Creates a directory if it does not exists, with concurrent access support.
session(dbtype, dbfile[, echo]) Creates a session to an SQLite database
session_try_nolock(dbtype, dbfile[, echo]) Creates a session to an SQLite database with no locks.
session_try_readonly(dbtype, dbfile[, echo]) Creates a read-only session to an SQLite database.

Classes

SQLiteConnector(filename[, readonly, lock]) An object that handles the connection to SQLite databases.
null A look-alike stream that discards the input

Database Driver API

Interface Base manager for Bob databases
dbshell(arguments) Drops you into a database shell
dbshell_command(subparsers) Adds a new dbshell subcommand to your subparser
files_command(subparsers) Adds a new ‘files’ subcommand to your parser
makedirs_safe(directory[, dryrun]) Creates a directory if it does not exists, with concurrent access support.
print_files(arguments) Prints the current location of raw database files.
version(arguments) Outputs the database version
version_command(subparsers)

The (Fisher) Iris Flower Dataset

data() Loads from (text) file and returns Fisher’s Iris Dataset.