Overview

Namespaces

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

Classes

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

Class CUBRID

RedBeanPHP CUBRID Writer. This is a QueryWriter class for RedBeanPHP. This QueryWriter provides support for the CUBRID database platform.

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

(c) copyright 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/CUBRID.php
Located at QueryWriter/CUBRID.php
Methods summary
protected boolean
# buildFK( string $type, string $targetType, string $property, string $targetProperty, boolean $isDep = FALSE )

This method adds a foreign key from type and field to target type and target field. The foreign key is created without an action. On delete/update no action will be triggered. The FK is only used to allow database tools to generate pretty diagrams and to make it easy to add actions later on. This methods accepts a type and infers the corresponding table name.

This method adds a foreign key from type and field to target type and target field. The foreign key is created without an action. On delete/update no action will be triggered. The FK is only used to allow database tools to generate pretty diagrams and to make it easy to add actions later on. This methods accepts a type and infers the corresponding table name.

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
$isDep

Returns

boolean
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
# addColumn( string $type, string $column, integer $field )

Parameters

$type
name of the table
$column
name of the column
$field
data type for field

See

QueryWriter::addColumn

Overrides

RedBeanPHP\QueryWriter\AQueryWriter::addColumn()

Implementation of

RedBeanPHP\QueryWriter::addColumn()
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 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
# addIndex( string $type, string $name, string $column )

Parameters

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

See

QueryWriter::addIndex

Implementation of

RedBeanPHP\QueryWriter::addIndex()
public
# 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

See

QueryWriter::addFK

Implementation of

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

See

QueryWriter::wipeAll

Implementation of

RedBeanPHP\QueryWriter::wipeAll()
public string
# esc( string $dbStructure, boolean $noQuotes = FALSE )

Parameters

$dbStructure
$databaseStructure name of the column/table to check
$noQuotes
TRUE to NOT put backticks or quotes around the string

Returns

string

See

QueryWriter::esc

Overrides

RedBeanPHP\QueryWriter\AQueryWriter::esc()

Implementation of

RedBeanPHP\QueryWriter::esc()
public string|null
# inferFetchType( $type, $property )

Parameters

$type
source type to fetch a target type for
$property
property to fetch the type of

Returns

string|null

See

QueryWriter::inferFetchType

Overrides

RedBeanPHP\QueryWriter\AQueryWriter::inferFetchType()

Implementation of

RedBeanPHP\QueryWriter::inferFetchType()
Methods inherited from RedBeanPHP\QueryWriter\AQueryWriter
addDataType(), addUniqueIndex(), camelsSnake(), canBeTreatedAsInt(), check(), clearRenames(), deleteRecord(), deleteRelations(), flushCache(), getAssocTable(), getAssocTableFormat(), getForeignKeyForTypeProperty(), getInsertSuffix(), getParametersForInClause(), getSQLFilterSnippet(), getSQLFilters(), glueLimitOne(), glueSQLCondition(), 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_INTEGER

Data types

Data types

# 0
integer C_DATATYPE_DOUBLE
# 1
integer C_DATATYPE_STRING
# 2
integer C_DATATYPE_SPECIAL_DATE
# 80
integer C_DATATYPE_SPECIAL_DATETIME
# 81
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