Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
e47a72d3
Commit
e47a72d3
authored
Jul 09, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
c67cd122
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
34 deletions
+8
-34
Table.php
lib/Doctrine/Table.php
+8
-34
No files found.
lib/Doctrine/Table.php
View file @
e47a72d3
...
...
@@ -50,10 +50,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
* @var integer $identifierType the type of identifier this table uses
*/
private
$identifierType
;
/**
* @var string $query cached simple query
*/
private
$query
;
/**
* @var Doctrine_Connection $conn Doctrine_Connection object that created this table
*/
...
...
@@ -70,17 +66,16 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
* @var array $columns an array of column definitions,
* keys as column names and values as column definitions
*
* the
value array has three
values:
* the
definition array has atleast the following
values:
*
* the column type, eg. 'integer'
* the column length, eg. 11
* the column options/constraints/validators. eg array('notnull' => true)
* -- type the column type, eg. 'integer'
* -- length the column length, eg. 11
*
*
so the full columns array might look something like the following
:
*
array(
*
'name' => array('string', 20, array('notnull' => true, 'default' => 'someone')),
*
'age' => array('integer', 11, array('notnull' => true))
*
)
*
additional keys
:
*
-- notnull whether or not the column is marked as notnull
*
-- values enum values
*
-- notblank notblank validator + notnull constraint
*
... many more
*/
protected
$columns
=
array
();
/**
...
...
@@ -1133,27 +1128,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
{
$this
->
data
=
$data
;
}
/**
* returns the maximum primary key value
*
* @return integer
*/
final
public
function
getMaxIdentifier
()
{
$sql
=
"SELECT MAX("
.
$this
->
getIdentifier
()
.
") FROM "
.
$this
->
getTableName
();
$stmt
=
$this
->
conn
->
getDBH
()
->
query
(
$sql
);
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_NUM
);
return
isset
(
$data
[
0
])
?
$data
[
0
]
:
1
;
}
/**
* returns simple cached query
*
* @return string
*/
public
function
getQuery
()
{
return
$this
->
query
;
}
/**
* returns internal data, used by Doctrine_Record instances
* when retrieving data from database
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment