Overview

Namespaces

  • None
  • RedBeanPHP
    • Adapter
    • BeanHelper
    • Cursor
    • Driver
    • Logger
      • RDefault
    • QueryWriter
    • RedException
    • Repository
    • Util

Classes

  • AQueryWriter
  • CUBRID
  • MySQL
  • PostgreSQL
  • SQLiteT
  • Overview
  • Namespace
  • Class

Class MySQL

RedBeanPHP MySQLWriter. This is a QueryWriter class for RedBeanPHP. This QueryWriter provides support for the MySQL/MariaDB database platform.

RedBeanPHP\QueryWriter\AQueryWriter
Extended by RedBeanPHP\QueryWriter\MySQL implements RedBeanPHP\QueryWriter
Namespace: RedBeanPHP\QueryWriter
Copyright:

(c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community. This source file is subject to the BSD/GPLv2 License that is bundled with this source code in the file license.txt.


License: BSD/GPLv2
Author: Gabor de Mooij and the RedBeanPHP Community
File: RedBeanPHP/QueryWriter/MySQL.php
Located at QueryWriter/MySQL.php
Methods summary
protected array
# getKeyMapForType( string $type )

Parameters

$type
the bean type you wish to obtain a key map of

Returns

array

See

RedBeanPHP\QueryWriter\AQueryWriter::getKeyMapForType()

Overrides

RedBeanPHP\QueryWriter\AQueryWriter::getKeyMapForType()
public
# __construct( RedBeanPHP\Adapter $adapter )

Constructor

Constructor

Parameters

$adapter
Database Adapter
public integer
# getTypeForID( )

This method returns the datatype to be used for primary key IDS and foreign keys. Returns one if the data type constants.

This method returns the datatype to be used for primary key IDS and foreign keys. Returns one if the data type constants.

Returns

integer
public array
# getTables( )

Returns

array

See

QueryWriter::getTables

Implementation of

RedBeanPHP\QueryWriter::getTables()
public
# createTable( string $table )

Parameters

$table
$type type of bean you want to create a table for

See

QueryWriter::createTable

Implementation of

RedBeanPHP\QueryWriter::createTable()
public array
# getColumns( string $table )

Parameters

$table
$type type of bean you want to obtain a column list of

Returns

array

See

QueryWriter::getColumns

Implementation of

RedBeanPHP\QueryWriter::getColumns()
public integer
# scanType( string $value, $flagSpecial = FALSE )

Parameters

$value
value
$flagSpecial

Returns

integer

See

QueryWriter::scanType

Implementation of

RedBeanPHP\QueryWriter::scanType()
public integer
# code( string $typedescription, boolean $includeSpecials = FALSE )

Parameters

$typedescription
description
$includeSpecials
whether you want to get codes for special columns as well

Returns

integer

See

QueryWriter::code

Implementation of

RedBeanPHP\QueryWriter::code()
public
# addUniqueConstraint( string $type, array $properties )

Parameters

$type
target bean type
$properties
$columnsPartOfIndex columns to include in index

See

QueryWriter::addUniqueIndex

Implementation of

RedBeanPHP\QueryWriter::addUniqueConstraint()
public
# addIndex( string $type, string $name, string $property )

Parameters

$type
type to add index to
$name
name of the new index
$property
field to index

See

QueryWriter::addIndex

Implementation of

RedBeanPHP\QueryWriter::addIndex()
public boolean
# addFK( string $type, string $targetType, string $property, string $targetProperty, string $isDependent = FALSE )

Parameters

$type
type that will have a foreign key field
$targetType
points to this type
$property
field that contains the foreign key value
$targetProperty
field where the fk points to
$isDependent
$isDep whether target is dependent and should cascade on update/delete

Returns

boolean

See

QueryWriter::addFK

Implementation of

RedBeanPHP\QueryWriter::addFK()
public boolean
# sqlStateIn( string $state, array $list )

Parameters

$state
SQL state to consider
$list
list of standardized SQL state constants to check against

Returns

boolean

See

QueryWriter::sqlStateIn

Implementation of

RedBeanPHP\QueryWriter::sqlStateIn()
public
# wipeAll( )

See

QueryWriter::wipeAll

Implementation of

RedBeanPHP\QueryWriter::wipeAll()
Methods inherited from RedBeanPHP\QueryWriter\AQueryWriter
addColumn(), addDataType(), addUniqueIndex(), camelsSnake(), canBeTreatedAsInt(), check(), clearRenames(), deleteRecord(), deleteRelations(), esc(), flushCache(), getAssocTable(), getAssocTableFormat(), getForeignKeyForTypeProperty(), getInsertSuffix(), getParametersForInClause(), getSQLFilterSnippet(), getSQLFilters(), glueLimitOne(), glueSQLCondition(), inferFetchType(), insertRecord(), makeFKLabel(), queryRecord(), queryRecordCount(), queryRecordCountRelated(), queryRecordLink(), queryRecordRelated(), queryRecordWithCursor(), queryTagged(), renameAssocTable(), renameAssociation(), safeColumn(), safeTable(), setNarrowFieldMode(), setSQLFilters(), setUseCache(), startsWithZeros(), tableExists(), updateRecord(), widenColumn(), wipe(), writeJoin()
Constants summary
integer C_DATATYPE_BOOL

Data types

Data types

# 0
integer C_DATATYPE_UINT32
# 2
integer C_DATATYPE_DOUBLE
# 3
integer C_DATATYPE_TEXT7
# 4
integer C_DATATYPE_TEXT8
# 5
integer C_DATATYPE_TEXT16
# 6
integer C_DATATYPE_TEXT32
# 7
integer C_DATATYPE_SPECIAL_DATE
# 80
integer C_DATATYPE_SPECIAL_DATETIME
# 81
integer C_DATATYPE_SPECIAL_POINT
# 90
integer C_DATATYPE_SPECIAL_LINESTRING
# 91
integer C_DATATYPE_SPECIAL_POLYGON
# 92
integer C_DATATYPE_SPECIAL_MONEY
# 93
integer C_DATATYPE_SPECIFIED
# 99
Constants inherited from RedBeanPHP\QueryWriter
C_DATATYPE_RANGE_SPECIAL, C_DATATYPE_RANGE_SPECIFIED, C_GLUE_AND, C_GLUE_WHERE, C_SQLFILTER_READ, C_SQLFILTER_WRITE, C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION, C_SQLSTATE_NO_SUCH_COLUMN, C_SQLSTATE_NO_SUCH_TABLE
Properties summary
protected RedBeanPHP\Adapter\DBAdapter $adapter
#
protected string $quoteCharacter
# '`'
Properties inherited from RedBeanPHP\QueryWriter\AQueryWriter
$cache, $defaultValue, $flagUseCache, $maxCacheSizePerType, $renames, $typeno_sqltype
API documentation generated by ApiGen