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
8ee01ce3
Commit
8ee01ce3
authored
Jun 11, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
8eef3f44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
Connection.php
lib/Doctrine/Connection.php
+16
-0
Formatter.php
lib/Doctrine/Formatter.php
+2
-0
Pgsql.php
lib/Doctrine/Sequence/Pgsql.php
+3
-0
No files found.
lib/Doctrine/Connection.php
View file @
8ee01ce3
...
...
@@ -902,6 +902,22 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
{
return
$this
->
transaction
->
getTransactionLevel
();
}
/**
* lastInsertId
*
* Returns the ID of the last inserted row, or the last value from a sequence object,
* depending on the underlying driver.
*
* Note: This method may not return a meaningful or consistent result across different drivers,
* because the underlying database may not even support the notion of auto-increment fields or sequences.
*
* @param string $table name of the table into which a new row was inserted
* @param string $field name of the field into which a new row was inserted
*/
public
function
lastInsertId
(
$table
=
null
,
$field
=
null
)
{
return
$this
->
sequence
->
lastInsertId
(
$table
,
$field
);
}
/**
* beginTransaction
* Start a transaction or set a savepoint.
...
...
lib/Doctrine/Formatter.php
View file @
8ee01ce3
...
...
@@ -158,6 +158,8 @@ class Doctrine_Formatter extends Doctrine_Connection_Module
case
'gzip'
:
case
'blob'
:
case
'clob'
:
$this
->
conn
->
connect
();
return
$this
->
conn
->
getDbh
()
->
quote
(
$input
);
}
}
...
...
lib/Doctrine/Sequence/Pgsql.php
View file @
8ee01ce3
...
...
@@ -61,11 +61,14 @@ class Doctrine_Sequence_Pgsql extends Doctrine_Sequence
return
$result
;
}
/**
* lastInsertId
*
* Returns the autoincrement ID if supported or $id or fetches the current
* ID in a sequence called: $table.(empty($field) ? '' : '_'.$field)
*
* @param string name of the table into which a new row was inserted
* @param string name of the field into which a new row was inserted
* @return integer the autoincremented id
*/
public
function
lastInsertId
(
$table
=
null
,
$field
=
null
)
{
...
...
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