Documentation

Base3 extends Base
in package

Class that imports base database.

Tags
copyright

YetiForce S.A.

license

YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com)

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

Table of Contents

$data  : array<string|int, mixed>
$db  : Db
$dbType  : string
$dropColumns  : array<string|int, mixed>
$dropIndexes  : array<string|int, mixed>
$dropTables  : array<string|int, mixed>
$foreignKey  : array<string|int, mixed>
$tables  : array<string|int, mixed>
$schema  : Schema
__construct()  : mixed
Construct.
bigInteger()  : ColumnSchemaBuilder
Creates a bigint column.
bigPrimaryKey()  : ColumnSchemaBuilder
Creates a big primary key column.
bigPrimaryKeyUnsigned()  : ColumnSchemaBuilder
Creates a big primary unsigned key column.
binary()  : ColumnSchemaBuilder
Creates a binary column.
boolean()  : ColumnSchemaBuilder
Creates a boolean column.
char()  : ColumnSchemaBuilder
Creates a char column.
data()  : mixed
date()  : ColumnSchemaBuilder
Creates a date column.
dateTime()  : ColumnSchemaBuilder
Creates a datetime column.
decimal()  : ColumnSchemaBuilder
Creates a decimal column.
double()  : ColumnSchemaBuilder
Creates a double column.
floatType()  : ColumnSchemaBuilder
Creates a float column.
getSchema()  : Schema
Returns the schema information for the database opened by this connection.
integer()  : ColumnSchemaBuilder
Creates an integer column.
mediumText()  : ColumnSchemaBuilder
Creates a medium text column.
money()  : ColumnSchemaBuilder
Creates a money column.
primaryKey()  : ColumnSchemaBuilder
Creates a primary key column.
primaryKeyUnsigned()  : ColumnSchemaBuilder
Creates a primary unsigned key column.
scheme()  : mixed
smallInteger()  : ColumnSchemaBuilder
Creates a smallint column.
stringType()  : ColumnSchemaBuilder
Creates a string column.
text()  : ColumnSchemaBuilder
Creates a text column.
time()  : ColumnSchemaBuilder
Creates a time column.
timestamp()  : ColumnSchemaBuilder
Creates a timestamp column.
tinyInteger()  : ColumnSchemaBuilder
Creates a tiny int column. Available only in MySql.
varbinary()  : ColumnSchemaBuilder
Creates a varbinary column. Available only in MySql.

Properties

$data

public array<string|int, mixed> $data = []

Data to import.

$db

public Db $db

Database connection instance

$dbType

public string $dbType = 'base'

Database section.

$dropColumns

public array<string|int, mixed> $dropColumns = []

Drop columns.

$dropIndexes

public array<string|int, mixed> $dropIndexes = []

Drop indexes.

$dropTables

public array<string|int, mixed> $dropTables = []

Drop tables.

$foreignKey

public array<string|int, mixed> $foreignKey = []

Foreign keys.

$tables

public array<string|int, mixed> $tables = []

Table structure.

$schema

protected Schema $schema

Database schema information.

Methods

__construct()

Construct.

public __construct() : mixed
Return values
mixed

bigInteger()

Creates a bigint column.

public bigInteger([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

bigPrimaryKey()

Creates a big primary key column.

public bigPrimaryKey([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

bigPrimaryKeyUnsigned()

Creates a big primary unsigned key column.

public bigPrimaryKeyUnsigned([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

binary()

Creates a binary column.

public binary([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

boolean()

Creates a boolean column.

public boolean() : ColumnSchemaBuilder
Return values
ColumnSchemaBuilder

the column instance which can be further customized

char()

Creates a char column.

public char([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size definition i.e. the maximum string length. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

data()

public data() : mixed
Return values
mixed

date()

Creates a date column.

public date() : ColumnSchemaBuilder
Return values
ColumnSchemaBuilder

the column instance which can be further customized

dateTime()

Creates a datetime column.

public dateTime([int $precision = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision. First parameter passed to the column type, e.g. DATETIME(precision). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

decimal()

Creates a decimal column.

public decimal([int $precision = null ][, int $scale = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision, which is usually the total number of digits. First parameter passed to the column type, e.g. DECIMAL(precision, scale). This parameter will be ignored if not supported by the DBMS

$scale : int = null

column value scale, which is usually the number of digits after the decimal point. Second parameter passed to the column type, e.g. DECIMAL(precision, scale). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

double()

Creates a double column.

public double([int $precision = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision. First parameter passed to the column type, e.g. DOUBLE(precision). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

floatType()

Creates a float column.

public floatType([int $precision = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision. First parameter passed to the column type, e.g. FLOAT(precision). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

getSchema()

Returns the schema information for the database opened by this connection.

public getSchema() : Schema
Return values
Schema

the schema information for the database opened by this connection.

integer()

Creates an integer column.

public integer([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

mediumText()

Creates a medium text column.

public mediumText([string|null $length = null ]) : ColumnSchemaBuilder
Parameters
$length : string|null = null
Return values
ColumnSchemaBuilder

the column instance which can be further customized

money()

Creates a money column.

public money([int $precision = null ][, int $scale = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision, which is usually the total number of digits. First parameter passed to the column type, e.g. DECIMAL(precision, scale). This parameter will be ignored if not supported by the DBMS

$scale : int = null

column value scale, which is usually the number of digits after the decimal point. Second parameter passed to the column type, e.g. DECIMAL(precision, scale). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

primaryKey()

Creates a primary key column.

public primaryKey([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

primaryKeyUnsigned()

Creates a primary unsigned key column.

public primaryKeyUnsigned([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

scheme()

public scheme() : mixed
Return values
mixed

smallInteger()

Creates a smallint column.

public smallInteger([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size or precision definition. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

stringType()

Creates a string column.

public stringType([int $length = null ]) : ColumnSchemaBuilder
Parameters
$length : int = null

column size definition i.e. the maximum string length. This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

text()

Creates a text column.

public text([string|null $length = null ]) : ColumnSchemaBuilder
Parameters
$length : string|null = null
Return values
ColumnSchemaBuilder

the column instance which can be further customized

time()

Creates a time column.

public time([int $precision = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision. First parameter passed to the column type, e.g. TIME(precision). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

timestamp()

Creates a timestamp column.

public timestamp([int $precision = null ]) : ColumnSchemaBuilder
Parameters
$precision : int = null

column value precision. First parameter passed to the column type, e.g. TIMESTAMP(precision). This parameter will be ignored if not supported by the DBMS

Return values
ColumnSchemaBuilder

the column instance which can be further customized

tinyInteger()

Creates a tiny int column. Available only in MySql.

public tinyInteger([int $length = 5 ]) : ColumnSchemaBuilder
Parameters
$length : int = 5

column size or precision definition

Return values
ColumnSchemaBuilder

the column instance which can be further customized

varbinary()

Creates a varbinary column. Available only in MySql.

public varbinary([int $length = 255 ]) : ColumnSchemaBuilder
Parameters
$length : int = 255

column size or precision definition

Return values
ColumnSchemaBuilder

the column instance which can be further customized


        

Search results