sqlsrvDaoBuilder

Extends \jDaoGenerator

driver for jDaoCompiler

It is called by jDaoCompiler

package

jelix

Methods

constructor

__construct(\jSelectorDao $selector, \jDbTools $tools, \jDaoParser $daoParser) 
inherited

Arguments

$selector

\jSelectorDao

$tools

\jDbTools

$daoParser

\jDaoParser

_captureAll

_captureAll( &$field) 
inherited

Arguments

$field

_captureBinaryField

_captureBinaryField( &$field) 
inherited

Arguments

$field

_captureFieldToUpdate

_captureFieldToUpdate( &$field) 
inherited

Arguments

$field

_captureFieldToUpdateOnUpdate

_captureFieldToUpdateOnUpdate( &$field) 
inherited

Arguments

$field

_capturePrimaryFieldsExcludeAutoIncrement

_capturePrimaryFieldsExcludeAutoIncrement( &$field) 
inherited

Arguments

$field

_capturePrimaryFieldsExcludePk

_capturePrimaryFieldsExcludePk( &$field) 
inherited

Arguments

$field

_capturePrimaryTable

_capturePrimaryTable( &$field) 
inherited

Arguments

$field

_encloseName

_encloseName( $name) 
inherited

Arguments

$name

get autoincrement PK field

_getAutoIncrementPKField( $using = null) 

Arguments

$using

_getPrimaryFieldsList

_getPrimaryFieldsList() 
inherited

_preparePHPCallbackExpr

_preparePHPCallbackExpr( $field) 
inherited

Arguments

$field

_preparePHPExpr

_preparePHPExpr( $expr,  $field,  $checknull = true,  $forCondition = '') 
inherited

Arguments

$expr

$field

$checknull

$forCondition

_prepareValues

_prepareValues( $fieldList,  $pattern = '',  $prefixfield = '') 
inherited

Arguments

$fieldList

$pattern

$prefixfield

format field names with start, end and between strings.

_writeFieldNamesWith( $start = '',  $end = '',  $beetween = '',  $using = null) 
inherited

Arguments

$start

$end

$beetween

$using

format field names with a start, an end and a between strings.

_writeFieldsInfoWith(string $info, string $start = '', string $end = '', string $beetween = '', array<mixed,\jDaoProperty> $using = null) : string
inherited

ex: give 'name' as $info, it will output the result of $field->name

see \jDaoProperty

Arguments

$info

string

property to get from objects in $using

$start

string

string to add before the info

$end

string

string to add after the info

$beetween

string

string to add between each info

$using

array<mixed,\jDaoProperty>

list of jDaoProperty object. if null, get default fields list

Response

string

list of field names seperated by the $between character

build all classes

buildClasses() 
inherited

buildCountUserQuery

buildCountUserQuery( $method,  &$src,  &$allField) 
inherited

Arguments

$method

$src

$allField

buildDeleteUserQuery

buildDeleteUserQuery( $method,  &$src,  &$primaryFields) 
inherited

Arguments

$method

$src

$primaryFields

buildEndOfClass

buildEndOfClass() 
inherited

create FROM clause and WHERE clause for all SELECT query

buildFromWhereClause() 
inherited

build the insert() method in the final class

buildInsertMethod( $pkFields) : string
inherited

Arguments

$pkFields

Response

string

the source of the method

generates the part of the FROM clause for outer joins

buildOuterJoins( &$tables,  $primaryTableName) : array
inherited

Arguments

$tables

$primaryTableName

Response

array

[0]=> the part of the FROM clause, [1]=> the part to add to the WHERE clause when needed

build a SELECT clause for all SELECT queries

buildSelectClause( $distinct = false) : string
inherited

Arguments

$distinct

Response

string

the select clause.

build an item for the select clause

buildSelectPattern( $pattern,  $table,  $fieldname,  $propname) 
inherited

Arguments

$pattern

$table

$fieldname

$propname

buildSelectUserQuery

buildSelectUserQuery( $method,  &$src,  &$allField) 
inherited

Arguments

$method

$src

$allField

buildUpdateAutoIncrementPK

buildUpdateAutoIncrementPK( $pkai) 
inherited

Arguments

$pkai

build the update() method for the final class

buildUpdateMethod( $pkFields) : string
inherited

Arguments

$pkFields

Response

string

the source of the method

buildUpdateUserQuery

buildUpdateUserQuery( $method,  &$src,  &$primaryFields) 
inherited

Arguments

$method

$src

$primaryFields

build all methods defined by the developer in the dao file

buildUserMethods() : string
inherited

Response

string

the source of the methods

genUpdateAutoIncrementPK

genUpdateAutoIncrementPK( $pkai,  $pTableRealName) 

Arguments

$pkai

$pTableRealName

get autoincrement PK field

getAutoIncrementPKField( $using = null) 
inherited

Arguments

$using

parseSQLFunction

parseSQLFunction( $expression) 
inherited

Arguments

$expression

Properties

propertiesListForInsert

propertiesListForInsert : 
inherited

Type(s)

the dao definition.

_dataParser : \jDaoParser
inherited
var

Type(s)

\jDaoParser

The DaoRecord ClassName

_DaoRecordClassName : string
inherited
var

Type(s)

string

the DAO classname

_DaoClassName : string
inherited
var

Type(s)

string

aliasWord

aliasWord : 
inherited

Type(s)

tools

tools : \jDbTools
inherited
var

Type(s)

\jDbTools

_daoId

_daoId : 
inherited

Type(s)

_daoPath

_daoPath : 
inherited

Type(s)

_dbType

_dbType : 
inherited

Type(s)

the real name of the main table

tableRealName : 
inherited

Type(s)

the real name of the main table, escaped in SQL so it is ready to include into a SQL query.

tableRealNameEsc : 
inherited

Type(s)

sqlWhereClause

sqlWhereClause : 
inherited

Type(s)

sqlFromClause

sqlFromClause : 
inherited

Type(s)

sqlSelectClause

sqlSelectClause : 
inherited

Type(s)