class CRM_Utils_SQL_TempTable

Constants

UTF8

CATEGORY_LENGTH

CATEGORY_REGEXP

ID_LENGTH

ID_REGEXP

INNODB

MEMORY

Properties

protected bool $durable
protected bool $utf8
protected $category
protected $id
protected $autodrop
protected $memory
protected $createSql

Methods

build()

No description

__destruct()

No description

string
getName()

Determine the full table name.

createWithQuery(string|CRM_Utils_SQL_Select $selectQuery)

Create the table using results from a SELECT query.

createWithColumns($columns)

Create the empty table.

drop()

Drop the table.

string|NULL
getCategory()

No description

string|NULL
getId()

No description

string|NULL
getCreateSql()

No description

bool
isAutodrop()

No description

bool
isDurable()

No description

bool
isMemory()

No description

bool
isUtf8()

No description

setAutodrop(bool $autodrop = TRUE)

No description

setCategory(string|NULL $category)

No description

setDurable(bool $durable = TRUE)

Set whether the table should be durable.

setId(mixed $id)

Setter for id

$this
setMemory(bool $value = TRUE)

Set table engine to MEMORY.

$this
setUtf8(bool $value = TRUE) deprecated

Set table collation to UTF8.

Details

at line 102
static CRM_Utils_SQL_TempTable build()

at line 114
__destruct()

at line 126
string getName()

Determine the full table name.

Return Value

string Ex: 'civicrm_tmp_d_foo_abcd1234abcd1234'

at line 140
CRM_Utils_SQL_TempTable createWithQuery(string|CRM_Utils_SQL_Select $selectQuery)

Create the table using results from a SELECT query.

Parameters

string|CRM_Utils_SQL_Select $selectQuery

Return Value

CRM_Utils_SQL_TempTable

at line 160
CRM_Utils_SQL_TempTable createWithColumns($columns)

Create the empty table.

Parameters

$columns

Return Value

CRM_Utils_SQL_TempTable

at line 177
CRM_Utils_SQL_TempTable drop()

Drop the table.

at line 209
string|NULL getCategory()

Return Value

string|NULL

at line 216
string|NULL getId()

Return Value

string|NULL

at line 223
string|NULL getCreateSql()

Return Value

string|NULL

at line 230
bool isAutodrop()

Return Value

bool

at line 237
bool isDurable()

Return Value

bool

at line 244
bool isMemory()

Return Value

bool

at line 251
bool isUtf8()

Return Value

bool

at line 259
CRM_Utils_SQL_TempTable setAutodrop(bool $autodrop = TRUE)

Parameters

bool $autodrop

Return Value

CRM_Utils_SQL_TempTable

at line 269
CRM_Utils_SQL_TempTable setCategory(string|NULL $category)

Parameters

string|NULL $category

Return Value

CRM_Utils_SQL_TempTable

at line 286
CRM_Utils_SQL_TempTable setDurable(bool $durable = TRUE)

Set whether the table should be durable.

Durable tables are not TEMPORARY in the mysql sense.

Parameters

bool $durable

Return Value

CRM_Utils_SQL_TempTable

at line 298
CRM_Utils_SQL_TempTable setId(mixed $id)

Setter for id

Parameters

mixed $id

Return Value

CRM_Utils_SQL_TempTable

at line 313
$this setMemory(bool $value = TRUE)

Set table engine to MEMORY.

Parameters

bool $value

Return Value

$this

at line 329
$this setUtf8(bool $value = TRUE) deprecated

deprecated This method is deprecated as tables should be assumed to have UTF-8 as the default character set and collation; some other character set or collation may be specified in the column definition.

Set table collation to UTF8.

Parameters

bool $value

Return Value

$this