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
1a21a43e
Commit
1a21a43e
authored
Jan 05, 2007
by
lsmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- s/\$db/\$this->conn
- turned raiseError() calls into throw Exception
parent
260558e0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1527 additions
and
1528 deletions
+1527
-1528
DataDict.php
lib/Doctrine/DataDict.php
+76
-77
Firebird.php
lib/Doctrine/DataDict/Firebird.php
+205
-205
Mssql.php
lib/Doctrine/DataDict/Mssql.php
+180
-180
Oracle.php
lib/Doctrine/DataDict/Oracle.php
+182
-182
Pgsql.php
lib/Doctrine/DataDict/Pgsql.php
+598
-598
Sqlite.php
lib/Doctrine/DataDict/Sqlite.php
+286
-286
No files found.
lib/Doctrine/DataDict.php
View file @
1a21a43e
...
...
@@ -44,8 +44,7 @@ class Doctrine_DataDict extends Doctrine_Connection_Module
$type
=
!
empty
(
$current
[
'type'
])
?
$current
[
'type'
]
:
null
;
if
(
!
method_exists
(
$this
,
"_compare
{
$type
}
Definition"
))
{
return
$db
->
raiseError
(
MDB2_ERROR_UNSUPPORTED
,
null
,
null
,
'type "'
.
$current
[
'type'
]
.
'" is not yet supported'
,
__FUNCTION__
);
throw
new
Doctrine_DataDict_Exception
(
'type "'
.
$current
[
'type'
]
.
'" is not yet supported'
);
}
if
(
empty
(
$previous
[
'type'
])
||
$previous
[
'type'
]
!=
$type
)
{
...
...
lib/Doctrine/DataDict/Firebird.php
View file @
1a21a43e
...
...
@@ -64,7 +64,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
case
'char'
:
case
'text'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
16777215
;
// TODO: $
db->options['default_text_field_length'];
?
$field
[
'length'
]
:
16777215
;
// TODO: $
this->conn->options['default_text_field_length'];
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
...
...
@@ -88,7 +88,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
return
'DOUBLE PRECISION'
;
case
'decimal'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
return
'DECIMAL('
.
$length
.
','
.
$
db
->
options
[
'decimal_places'
]
.
')'
;
return
'DECIMAL('
.
$length
.
','
.
$
this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
}
return
''
;
}
...
...
lib/Doctrine/DataDict/Mssql.php
View file @
1a21a43e
...
...
@@ -70,7 +70,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR('
.
$
db
->
options
[
'default_text_field_length'
]
.
')'
)
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR('
.
$
this
->
conn
->
options
[
'default_text_field_length'
]
.
')'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'TEXT'
);
case
'clob'
:
if
(
!
empty
(
$field
[
'length'
]))
{
...
...
@@ -103,7 +103,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
return
'FLOAT'
;
case
'decimal'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
return
'DECIMAL('
.
$length
.
','
.
$
db
->
options
[
'decimal_places'
]
.
')'
;
return
'DECIMAL('
.
$length
.
','
.
$
this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
}
return
''
;
}
...
...
lib/Doctrine/DataDict/Oracle.php
View file @
1a21a43e
...
...
@@ -61,7 +61,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
case
'char'
:
case
'varchar'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
16777215
;
// TODO: $
db->options['default_text_field_length'];
?
$field
[
'length'
]
:
16777215
;
// TODO: $
this->conn->options['default_text_field_length'];
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
...
...
@@ -85,7 +85,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
case
'float'
:
return
'NUMBER'
;
case
'decimal'
:
return
'NUMBER(*,'
.
$
db
->
options
[
'decimal_places'
]
.
')'
;
return
'NUMBER(*,'
.
$
this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
}
}
/**
...
...
lib/Doctrine/DataDict/Pgsql.php
View file @
1a21a43e
...
...
@@ -365,11 +365,11 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
case
'object'
:
case
'varchar'
:
$length
=
(
isset
(
$field
[
'length'
])
&&
$field
[
'length'
])
?
$field
[
'length'
]
:
null
;
// TODO: $
db->options['default_text_field_length'];
// TODO: $
this->conn->options['default_text_field_length'];
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR('
.
$
db
->
options
[
'default_text_field_length'
]
.
')'
)
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR('
.
$
this
->
conn
->
options
[
'default_text_field_length'
]
.
')'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'TEXT'
);
case
'clob'
:
...
...
@@ -568,7 +568,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
{
/**
if (!empty($field['unsigned'])) {
$
db->warnings[] = "unsigned integer field \"$name\" is being declared as signed integer";
$
this->conn->warnings[] = "unsigned integer field \"$name\" is being declared as signed integer";
}
*/
...
...
lib/Doctrine/DataDict/Sqlite.php
View file @
1a21a43e
...
...
@@ -106,11 +106,11 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
return
'DATETIME'
;
case
'float'
:
case
'double'
:
return
'DOUBLE'
;
//($
db->options['fixed_float'] ? '('.
//($
db->options['fixed_float']+2).','.$db->options['fixed_float'].')' : '');
return
'DOUBLE'
;
//($
this->conn->options['fixed_float'] ? '('.
//($
this->conn->options['fixed_float']+2).','.$this->conn->options['fixed_float'].')' : '');
case
'decimal'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
return
'DECIMAL('
.
$length
.
','
.
$
db
->
options
[
'decimal_places'
]
.
')'
;
return
'DECIMAL('
.
$length
.
','
.
$
this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
}
throw
new
Doctrine_DataDict_Sqlite_Exception
(
'Unknown datatype '
.
$field
[
'type'
]);
}
...
...
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