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
ec39adcd
Commit
ec39adcd
authored
Jul 05, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
378ed91a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Mssql.php
lib/Doctrine/Sequence/Mssql.php
+1
-1
MssqlTestCase.php
tests/Sequence/MssqlTestCase.php
+3
-3
No files found.
lib/Doctrine/Sequence/Mssql.php
View file @
ec39adcd
...
...
@@ -48,7 +48,7 @@ class Doctrine_Sequence_Mssql extends Doctrine_Sequence
if
(
$this
->
checkSequence
(
$sequenceName
))
{
$query
=
'SET IDENTITY_INSERT '
.
$sequenceName
.
' OFF '
.
'INSERT INTO '
.
$sequenceName
.
'DEFAULT VALUES'
;
.
'INSERT INTO '
.
$sequenceName
.
'
DEFAULT VALUES'
;
}
else
{
$query
=
'INSERT INTO '
.
$sequenceName
.
' ('
.
$seqcolName
.
') VALUES (0)'
;
}
...
...
tests/Sequence/MssqlTestCase.php
View file @
ec39adcd
...
...
@@ -40,7 +40,7 @@ class Doctrine_Sequence_Mssql_TestCase extends Doctrine_UnitTestCase
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@IDENTITY'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@VERSION'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id)
VALUES (0)
'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id)
DEFAULT VALUES
'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT COUNT(1) FROM user_seq'
);
}
public
function
testNextIdExecutesSql
()
...
...
@@ -50,8 +50,8 @@ class Doctrine_Sequence_Mssql_TestCase extends Doctrine_UnitTestCase
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'DELETE FROM user_seq WHERE id < 0'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@IDENTITY'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@VERSION'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id)
VALUES (0)
'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@VERSION'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id)
DEFAULT VALUES
'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT COUNT(1) FROM user_seq'
);
}
public
function
testLastInsertIdCallsPdoLevelEquivalent
()
...
...
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