class

Prostore::TUI::Browser

Inherits Reference < Object

Constructors

new(conn : Connection)
Source

Instance methods

count(table : String, filter : Filter | Nil = nil) : Int64
Source
delete_row(table : String, pk_col : String, pk_val : String) : Nil
Source
enum_columns(table : String) : Hash(String, EnumColumn)

Returns enum metadata keyed by column name, for columns whose portable type is enum_string or enum_int. Columns without enum metadata are omitted. Returns an empty hash if the bookkeeping table doesn't exist (database not managed by prostore). Reuses the typed SchemaTable reader so the JSON-decoded enum_members array is honoured exactly as written by the migration runner.

Source
fetch_row(table : String, pk_col : String, pk_val : String) : Hash(String, RowVal) | Nil

Fetch a single row by its primary key value.

Source
fetch_rows(table : String, limit : Int32, offset : Int32, filter : Filter | Nil = nil) : Tuple(Array(String), Array(Row))

Returns column names and rows. Values are String or nil.

Source
insert_row(table : String, data : Hash(String, String | Nil)) : Nil

data values may be nil to bind explicit NULL. Columns the caller wants the database default for should simply be omitted from data.

Source
pk_col(table : String) : String | Nil

Returns the primary key column name, or nil if none found.

Source
portable_types(table : String) : Hash(String, String)

Returns prostore portable type tags keyed by column name, read from the prostore_schema bookkeeping table. Returns an empty hash if the table doesn't exist (database not managed by prostore — caller should fall back to SQL type_text inference).

Source
schema(table : String) : Adapter::LiveTable
Source
tables
Source
update_cell(table : String, pk_col : String, pk_val : String, column : String, value : String | Nil) : Nil
Source