Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • JqControlGen
  • QCodeGen
  • QCodeGenBase
  • QConvertNotation
  • QConvertNotationBase
  • QDatabaseCodeGen
  • QIndex
  • QManyToManyReference
  • QReference
  • QRestServiceCodeGen
  • QReverseReference
  • QSqlColumn
  • QSqlTable
  • QTypeTable
  • Overview
  • Package
  • Class

Class QSqlColumn

A helper class used by the QCubed Code Generator to describe a table's column

QBaseClass
Extended by QSqlColumn
Package: Codegen
Located at includes/codegen/QSqlColumn.class.php
Methods summary
public mixed
# __get( string $strName )

Override method to perform a property "Get" This will get the value of $strName

Override method to perform a property "Get" This will get the value of $strName

Parameters

$strName
Name of the property to get

Returns

mixed

Throws

Exception
QCallerException

Overrides

QBaseClass::__get()
public mixed
# __set( string $strName, string $mixValue )

Override method to perform a property "Set" This will set the property $strName to be $mixValue

Override method to perform a property "Set" This will set the property $strName to be $mixValue

Parameters

$strName
Name of the property to set
$mixValue
New value of the property

Returns

mixed

Throws

Exception
QCallerException

Overrides

QBaseClass::__set()
Methods inherited from QBaseClass
OverrideAttributes(), __call()
Properties summary
protected QSqlTable $objOwnerTable

The table in which this column exists.

The table in which this column exists.

#
protected boolean $blnPrimaryKey

Specifies whether or not the column is a Primary Key

Specifies whether or not the column is a Primary Key

#
protected string $strName

Name of the column as defined in the database So for example, "first_name"

Name of the column as defined in the database So for example, "first_name"

#
protected string $strPropertyName

Name of the column as an object Property So for "first_name", it would be FirstName

Name of the column as an object Property So for "first_name", it would be FirstName

#
protected string $strVariableName

Name of the column as an object protected Member Variable So for "first_name VARCHAR(50)", it would be strFirstName

Name of the column as an object protected Member Variable So for "first_name VARCHAR(50)", it would be strFirstName

#
protected string $strVariableType

The type of the protected member variable (uses one of the string constants from the QType class)

The type of the protected member variable (uses one of the string constants from the QType class)

#
protected string $strVariableTypeAsConstant

The type of the protected member variable (uses the actual constant from the Type class)

The type of the protected member variable (uses the actual constant from the Type class)

#
protected string $strDbType

The actual type of the column in the database (uses one of the string constants from the DatabaseType class)

The actual type of the column in the database (uses one of the string constants from the DatabaseType class)

#
protected integer $intLength

Length of the column as defined in the database

Length of the column as defined in the database

#
protected mixed $mixDefault

The default value for the column as defined in the database

The default value for the column as defined in the database

#
protected boolean $blnNotNull

Specifies whether or not the column is specified as "NOT NULL"

Specifies whether or not the column is specified as "NOT NULL"

#
protected boolean $blnIdentity

Specifies whether or not the column is an identiy column (like auto_increment)

Specifies whether or not the column is an identiy column (like auto_increment)

#
protected boolean $blnIndexed

Specifies whether or not the column is a single-column Index

Specifies whether or not the column is a single-column Index

#
protected boolean $blnUnique

Specifies whether or not the column is a unique

Specifies whether or not the column is a unique

#
protected boolean $blnTimestamp

Specifies whether or not the column is a system-updated "timestamp" column

Specifies whether or not the column is a system-updated "timestamp" column

#
protected QReference $objReference

If the table column is foreign keyed off another column, then this Column instance would be a reference to another object

If the table column is foreign keyed off another column, then this Column instance would be a reference to another object

#
protected string $strComment

The string value of the comment field in the database.

The string value of the comment field in the database.

#
protected array $options

Various overrides and options embedded in the comment for the column as a json object.

Various overrides and options embedded in the comment for the column as a json object.

# array()
protected boolean $blnAutoUpdate

For Timestamp columns, will add to the sql code to set this field to NOW whenever there is a save

For Timestamp columns, will add to the sql code to set this field to NOW whenever there is a save

#
Magic properties summary
public QSqlTable|QTypeTable $OwnerTable

Table in which this column exists

public boolean $PrimaryKey

Is the column a (part of) primary key

public string $Name

Column name

public string $PropertyName

Corresponding property name for the table

public string $VariableName

Corresponding variable name (in ORM class and elsewhere)

public string $VariableType

Type of data this column is supposed to store (constant from QType class)

public string $VariableTypeAsConstant

Variable type expressed as QType casted string (integer column would have this value as: "QType::Integer")

public string $DbType

Type in the database

public integer $Length

If applicable, the length of data to be stored (useful for varchar data types)

public mixed $Default

Default value of the column

public boolean $NotNull

Is this column a "NOT NULL" column?

public boolean $Identity

Is this column an Identity column?

public boolean $Indexed

Is there a single column index on this column?

public boolean $Unique

Does this column have a 'Unique' key defined on it?

public boolean $Timestamp

Can this column contain a timestamp value?

public QReference $Reference

Reference to another column (if this one is a foreign key)

public array $Options

Options for codegen

public string $Comment

Comment on the column

API documentation generated by ApiGen