jDaoDbMapper
in package
It allows to create tables corresponding to a dao file.
Tags
Table of Contents
- $connection : jDbConnection
- $profile : mixed
- __construct() : mixed
- jDaoDbMapper constructor.
- createTableFromDao() : jDbTable
- insertDaoData() : int
- createColumnFromProperty() : mixed
- getParser() : mixed
Properties
$connection
protected
jDbConnection
$connection
$profile
protected
mixed
$profile
Methods
__construct()
jDaoDbMapper constructor.
public
__construct([string $profile = '' ]) : mixed
Parameters
- $profile : string = ''
-
the jdb profile
Return values
mixed —createTableFromDao()
public
createTableFromDao(mixed $selectorStr) : jDbTable
Parameters
- $selectorStr : mixed
Return values
jDbTable —insertDaoData()
public
insertDaoData(string $selectorStr, array<string|int, string> $properties, array<string|int, array<string|int, mixed>> $data, int $option) : int
Parameters
- $selectorStr : string
-
the dao for which we want to insert data
- $properties : array<string|int, string>
-
list of properties for which data are given
- $data : array<string|int, array<string|int, mixed>>
-
the data. each row is an array of values. Values are in the same order as $properties
- $option : int
-
one of jDbTools::IBD_* const
Return values
int —number of records inserted/updated
createColumnFromProperty()
protected
createColumnFromProperty(jDaoProperty $property) : mixed
Parameters
- $property : jDaoProperty
Return values
mixed —getParser()
protected
getParser(jSelectorDao $selector) : mixed
Parameters
- $selector : jSelectorDao