ICanBoogie
  • Documentation
  • API Reference
  • ActiveRecord 3.0.x
Namespaces
  • ICanBoogie
    • ActiveRecord
      • ActiveRecordCache
      • Driver
      • Property
      • Validate
        • Reader
        • Validator
        • ValidatorProvider
Classes
  • BasicDriver
  • MySQLDriver
  • SQLiteDriver

Class MySQLDriver

Connection driver for MySQL.

ICanBoogie\ActiveRecord\Driver\BasicDriver implements ICanBoogie\ActiveRecord\Driver uses ICanBoogie\Accessor\AccessorTrait (not available)
┗ ICanBoogie\ActiveRecord\Driver\MySQLDriver

Direct known subclasses

ICanBoogie\ActiveRecord\Driver\SQLiteDriver

Namespace: ICanBoogie\ActiveRecord\Driver
Located at ActiveRecord/Driver/MySQLDriver.php

Methods summary

public render_column( ICanBoogie\ActiveRecord\SchemaColumn $column ) : string

Parameters

$column

Returns

string

Inheritdoc

public create_table( string $unprefixed_table_name, ICanBoogie\ActiveRecord\Schema $schema ) : ICanBoogie\ActiveRecord\Driver\MySQLDriver

Parameters

$unprefixed_table_name
$schema

Returns

ICanBoogie\ActiveRecord\Driver\MySQLDriver
$this

Throws

Exception

Inheritdoc

public create_indexes( string $unprefixed_table_name, ICanBoogie\ActiveRecord\Schema $schema ) : ICanBoogie\ActiveRecord\Driver\MySQLDriver

Parameters

$unprefixed_table_name
$schema

Returns

ICanBoogie\ActiveRecord\Driver\MySQLDriver
$this

Throws

Exception

Inheritdoc

public create_unique_indexes( string $unprefixed_table_name, ICanBoogie\ActiveRecord\Schema $schema ) : ICanBoogie\ActiveRecord\Driver\MySQLDriver

Parameters

$unprefixed_table_name
$schema

Returns

ICanBoogie\ActiveRecord\Driver\MySQLDriver
$this

Throws

Exception

Inheritdoc

public table_exists( string $unprefixed_name ) : boolean

Parameters

$unprefixed_name
The unprefixed name of the table.

Returns

boolean
true if the table exists, false otherwise.

Inheritdoc

public optimize( void )

Inheritdoc

protected render_create_table( string $unprefixed_table_name, ICanBoogie\ActiveRecord\Schema $schema ) : string

Renders create table statement.

Renders create table statement.

Parameters

$unprefixed_table_name
$schema

Returns

string
protected render_create_table_lines( ICanBoogie\ActiveRecord\Schema $schema ) : array

Renders the lines used to create a table.

Renders the lines used to create a table.

Parameters

$schema

Returns

array
protected render_create_table_line( ICanBoogie\ActiveRecord\Schema $schema, string $column_id, ICanBoogie\ActiveRecord\SchemaColumn $column ) : string

Renders a line used to create a table.

Renders a line used to create a table.

Parameters

$schema
$column_id
$column

Returns

string
protected render_create_table_primary_key( ICanBoogie\ActiveRecord\Schema $schema ) : string

Renders primary key clause to create table.

Renders primary key clause to create table.

Parameters

$schema

Returns

string
protected create_indexes_of( string $type, string $unprefixed_table_name, array $indexes )

Creates indexes of a give type.

Creates indexes of a give type.

Parameters

$type
e.g. "UNIQUE".
$unprefixed_table_name
$indexes

Methods inherited from ICanBoogie\ActiveRecord\Driver\BasicDriver

__construct(), cast_value(), get_connection(), quote_identifier(), quote_string(), resolve_index_name(), resolve_quoted_table_name(), resolve_table_name()

Properties summary

Magic properties inherited from ICanBoogie\ActiveRecord\Driver\BasicDriver

$connection

ActiveRecord 3.0.x – Check on GitHub – API documentation generated by ApiGen