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
703ba51f
Commit
703ba51f
authored
Jul 05, 2006
by
doctrine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sqlite datadict: composite primary key support
parent
ff504050
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
DataDict.php
Doctrine/DataDict.php
+2
-1
Pessimistic.php
Doctrine/Locking/Manager/Pessimistic.php
+1
-1
datadict-sqlite.inc.php
Doctrine/adodb-hack/drivers/datadict-sqlite.inc.php
+4
-3
No files found.
Doctrine/DataDict.php
View file @
703ba51f
...
...
@@ -40,7 +40,8 @@ class Doctrine_DataDict {
try
{
$this
->
dbh
->
query
(
$sql
);
}
catch
(
PDOException
$e
)
{
$return
=
false
;
$return
=
$e
;
}
}
...
...
Doctrine/Locking/Manager/Pessimistic.php
View file @
703ba51f
...
...
@@ -237,4 +237,4 @@ class Doctrine_Locking_Manager_Pessimistic
}
?>
\ No newline at end of file
?>
Doctrine/adodb-hack/drivers/datadict-sqlite.inc.php
View file @
703ba51f
...
...
@@ -56,6 +56,7 @@ class ADODB2_sqlite extends ADODB_DataDict {
if
(
$funsigned
)
$suffix
.=
' UNSIGNED'
;
if
(
$fnotnull
)
$suffix
.=
' NOT NULL'
;
if
(
strlen
(
$fdefault
))
$suffix
.=
" DEFAULT
$fdefault
"
;
if
(
$fautoinc
)
$suffix
.=
' PRIMARY KEY AUTOINCREMENT'
;
if
(
$fconstraint
)
$suffix
.=
' '
.
$fconstraint
;
return
$suffix
;
...
...
@@ -77,12 +78,12 @@ class ADODB2_sqlite extends ADODB_DataDict {
}
$s
=
"CREATE TABLE
$tabname
(
\n
"
;
$s
.=
implode
(
",
\n
"
,
$lines
);
/**
if (sizeof($pkey)>0) {
if
(
sizeof
(
$pkey
)
>
0
&&
!
$this
->
autoIncrement
)
{
$s
.=
",
\n
PRIMARY KEY ("
;
$s
.=
implode
(
", "
,
$pkey
)
.
")"
;
}
*/
if
(
isset
(
$tableoptions
[
'CONSTRAINTS'
]))
$s
.=
"
\n
"
.
$tableoptions
[
'CONSTRAINTS'
];
...
...
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