Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Database returns a Database interface for the provided // database name. // // TODO: Return bool/error if the database exists or not // or should the client just get the error when they // try to use it? Latter is more performant. Database(name string) Database // CreateDatabaseIfNotExist creates a database if it doesn't // already exist. CreateDatabaseIfNotExist( ctx context.Context, db string, options ...*driver.DatabaseOptions, ) error }
Client is the interface for a Tigris client.
type Database ¶
type Database interface { // Transact runs the provided TranactionFunc in a transaction. If the // function returns an error then the transaction will be aborted, // otherwise it will be comitted. Transact(ctx context.Context, fn TxFunc) (interface{}, error) // ApplySchemasFromDirectory reads all the files in the provided // directory and attempts to apply any files with the .json // extension to the database as collection schemas in a single // transaction. ApplySchemasFromDirectory(ctx context.Context, path string) error }
Database is the interface for interacting with a specific database in Tigris.
Click to show internal directories.
Click to hide internal directories.