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
c38137d5
Commit
c38137d5
authored
Feb 04, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
int alias added
parent
f2e19fd9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
6 deletions
+14
-6
Firebird.php
lib/Doctrine/DataDict/Firebird.php
+3
-1
Mssql.php
lib/Doctrine/DataDict/Mssql.php
+3
-2
Oracle.php
lib/Doctrine/DataDict/Oracle.php
+6
-3
Pgsql.php
lib/Doctrine/DataDict/Pgsql.php
+1
-0
Sqlite.php
lib/Doctrine/DataDict/Sqlite.php
+1
-0
No files found.
lib/Doctrine/DataDict/Firebird.php
View file @
c38137d5
...
@@ -75,6 +75,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
...
@@ -75,6 +75,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
return
'BLOB SUB_TYPE 0'
;
return
'BLOB SUB_TYPE 0'
;
case
'integer'
:
case
'integer'
:
case
'enum'
:
case
'enum'
:
case
'int'
:
return
'INT'
;
return
'INT'
;
case
'boolean'
:
case
'boolean'
:
return
'SMALLINT'
;
return
'SMALLINT'
;
...
@@ -89,8 +90,9 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
...
@@ -89,8 +90,9 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
case
'decimal'
:
case
'decimal'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
return
'DECIMAL('
.
$length
.
','
.
$this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
return
'DECIMAL('
.
$length
.
','
.
$this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
default
:
throw
new
Doctrine_DataDict_Exception
(
'Unknown field type '
.
$field
[
'type'
]);
}
}
return
''
;
}
}
/**
/**
* Maps a native array description of a field to a Doctrine datatype and length
* Maps a native array description of a field to a Doctrine datatype and length
...
...
lib/Doctrine/DataDict/Mssql.php
View file @
c38137d5
...
@@ -90,6 +90,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
...
@@ -90,6 +90,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
return
'IMAGE'
;
return
'IMAGE'
;
case
'integer'
:
case
'integer'
:
case
'enum'
:
case
'enum'
:
case
'int'
:
return
'INT'
;
return
'INT'
;
case
'boolean'
:
case
'boolean'
:
return
'BIT'
;
return
'BIT'
;
...
@@ -105,7 +106,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
...
@@ -105,7 +106,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
18
;
return
'DECIMAL('
.
$length
.
','
.
$this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
return
'DECIMAL('
.
$length
.
','
.
$this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
}
}
return
''
;
throw
new
Doctrine_DataDict_Exception
(
'Unknown column type.'
)
;
}
}
/**
/**
* Maps a native array description of a field to a MDB2 datatype and length
* Maps a native array description of a field to a MDB2 datatype and length
...
...
lib/Doctrine/DataDict/Oracle.php
View file @
c38137d5
...
@@ -72,6 +72,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
...
@@ -72,6 +72,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
return
'BLOB'
;
return
'BLOB'
;
case
'integer'
:
case
'integer'
:
case
'enum'
:
case
'enum'
:
case
'int'
:
if
(
!
empty
(
$field
[
'length'
]))
{
if
(
!
empty
(
$field
[
'length'
]))
{
return
'NUMBER('
.
$field
[
'length'
]
.
')'
;
return
'NUMBER('
.
$field
[
'length'
]
.
')'
;
}
}
...
@@ -86,6 +87,8 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
...
@@ -86,6 +87,8 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
return
'NUMBER'
;
return
'NUMBER'
;
case
'decimal'
:
case
'decimal'
:
return
'NUMBER(*,'
.
$this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
return
'NUMBER(*,'
.
$this
->
conn
->
options
[
'decimal_places'
]
.
')'
;
default
:
throw
new
Doctrine_DataDict_Exception
(
'Unknown field type '
.
$field
[
'type'
]);
}
}
}
}
/**
/**
...
@@ -97,7 +100,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
...
@@ -97,7 +100,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
*/
*/
public
function
getPortableDeclaration
(
array
$field
)
public
function
getPortableDeclaration
(
array
$field
)
{
{
$db
_t
ype
=
strtolower
(
$field
[
'type'
]);
$db
T
ype
=
strtolower
(
$field
[
'type'
]);
$type
=
array
();
$type
=
array
();
$length
=
$unsigned
=
$fixed
=
null
;
$length
=
$unsigned
=
$fixed
=
null
;
if
(
!
empty
(
$field
[
'length'
]))
{
if
(
!
empty
(
$field
[
'length'
]))
{
...
@@ -108,7 +111,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
...
@@ -108,7 +111,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
$field
[
'name'
]
=
''
;
$field
[
'name'
]
=
''
;
}
}
switch
(
$db
_t
ype
)
{
switch
(
$db
T
ype
)
{
case
'integer'
:
case
'integer'
:
case
'pls_integer'
:
case
'pls_integer'
:
case
'binary_integer'
:
case
'binary_integer'
:
...
@@ -174,7 +177,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
...
@@ -174,7 +177,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
case
'rowid'
:
case
'rowid'
:
case
'urowid'
:
case
'urowid'
:
default
:
default
:
throw
new
Doctrine_DataDict_Exception
(
'unknown database attribute type: '
.
$db_t
ype
);
throw
new
Doctrine_DataDict_Exception
(
'unknown database attribute type: '
.
$dbT
ype
);
}
}
return
array
(
$type
,
$length
,
$unsigned
,
$fixed
);
return
array
(
$type
,
$length
,
$unsigned
,
$fixed
);
...
...
lib/Doctrine/DataDict/Pgsql.php
View file @
c38137d5
...
@@ -378,6 +378,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
...
@@ -378,6 +378,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
return
'BYTEA'
;
return
'BYTEA'
;
case
'enum'
:
case
'enum'
:
case
'integer'
:
case
'integer'
:
case
'int'
:
if
(
!
empty
(
$field
[
'autoincrement'
]))
{
if
(
!
empty
(
$field
[
'autoincrement'
]))
{
if
(
!
empty
(
$field
[
'length'
]))
{
if
(
!
empty
(
$field
[
'length'
]))
{
$length
=
$field
[
'length'
];
$length
=
$field
[
'length'
];
...
...
lib/Doctrine/DataDict/Sqlite.php
View file @
c38137d5
...
@@ -97,6 +97,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
...
@@ -97,6 +97,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
case
'enum'
:
case
'enum'
:
case
'integer'
:
case
'integer'
:
case
'boolean'
:
case
'boolean'
:
case
'int'
:
return
'INTEGER'
;
return
'INTEGER'
;
case
'date'
:
case
'date'
:
return
'DATE'
;
return
'DATE'
;
...
...
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