-
Notifications
You must be signed in to change notification settings - Fork 26
Core Objects
John James Jacoby edited this page May 27, 2026
·
1 revision
This page is a compact API guide for the objects in src/Database/Kern.
Represents one database column.
Responsibilities:
- store column metadata
- infer SQL fragments
- validate values before saving
- cast values after reading
- expose flags used by query parsers
Common methods:
Column::from_mysql()is_json()is_bool()is_date_time()is_int()is_decimal()is_numeric()is_text()is_binary()cast()validate()get_name_sql()get_create_string()
Represents one database index.
Common fields:
nametypecolumnsuniquemethodusingcomment
Common method:
get_create_string()
Stores column and index collections.
Common methods:
Schema::from_table()setup()clear()add_item()get_items()get_item()has_item()remove_item()add_column()get_column()has_column()remove_column()add_index()get_index()has_index()remove_index()get_create_table_string()is_valid()get_validation_errors()
Shapes a database result into an application object.
Common method:
exists()
Common extension point:
$primary_column$casts
Reads, writes, filters, and shapes rows.
Common methods:
query()set_query_var()get_query_var()get_column_names()get_primary_column_name()get_columns()get_parsers()get_table_name()get_table_alias()get_request()get_found_items()get_max_num_pages()get_item()get_item_by()add_item()copy_item()update_item()delete_item()get_meta_type()get_results()
Manages the physical database table.
Common methods:
maybe_upgrade()needs_upgrade()install()uninstall()exists()status()columns()indexes()add_index()drop_index()create()drop()truncate()delete_all()duplicate()copy()count()rename()column_exists()index_exists()analyze()check()checksum()optimize()repair()upgrade()get_pending_upgrades()upgrade_to()