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
- Create a table from a jDao file.
- insertDaoData() : int
- createColumnFromProperty() : mixed
- getParser() : mixed
Properties
$connection
protected
jDbConnection
$connection
Tags
$profile
protected
mixed
$profile
Tags
Methods
__construct()
jDaoDbMapper constructor.
public
__construct([string $profile = '' ]) : mixed
Parameters
- $profile : string = ''
-
the jdb profile
Tags
Return values
mixed —createTableFromDao()
Create a table from a jDao file.
public
createTableFromDao(mixed $selectorStr) : jDbTable
Parameters
- $selectorStr : mixed
Tags
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
Tags
Return values
int —number of records inserted/updated
createColumnFromProperty()
protected
createColumnFromProperty(jDaoProperty $property) : mixed
Parameters
- $property : jDaoProperty
Tags
Return values
mixed —getParser()
protected
getParser(jSelectorDao $selector) : mixed
Parameters
- $selector : jSelectorDao