JsonColumn
class JsonColumn
This class provides static functions to update the definition of columns in a JsonSQL database
Methods
Changes whether a column is marked to allow null values or to reject null values
Set or remove the default value for a column.
Set or remove primary key for a column.
Set or remove autoincrement for a column.
Set or remove the description of a column.
Details
at line 50
static void
add(Engine $engine, string $table, string $column, stdClass $columnDef, array $required = array())
Adds a column in a table of the database
at line 82
static void
rename(Engine $engine, string $table, string $column, string $newname)
Renames a column
at line 112
static void
drop(Engine $engine, string $table, string $column, bool $ifexists = false)
Drops a column
at line 150
static void
setType(Engine $engine, string $table, string $column, string $type, string $format = '', string $datatype = '')
Changes the type of a column
at line 376
static void
setNotNull(Engine $engine, string $table, string $column, bool $allownull = false)
Changes whether a column is marked to allow null values or to reject null values
at line 407
static void
setDefault(Engine $engine, string $table, string $column, string|bool $default = false)
Set or remove the default value for a column.
at line 434
static void
setPrimaryKey(Engine $engine, string $table, string $column, bool $remove = false)
Set or remove primary key for a column.
at line 490
static void
setAutoincrement(Engine $engine, string $table, string $column, bool $remove = false)
Set or remove autoincrement for a column.
at line 544
static void
setTitle(Engine $engine, string $table, string $column, string|bool $title = false)
Set or remove the title of a column.
at line 574
static void
setDescription(Engine $engine, string $table, string $column, string|bool $description = false)
Set or remove the description of a column.
at line 604
static private void
checkColumn(Engine $engine, string $table, string $column)
Checks the existence of a column