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
f5f3b0d2
Commit
f5f3b0d2
authored
Jun 05, 2006
by
doctrine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for uppercase columns
parent
bcf9ca78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
10 deletions
+32
-10
Query.php
Doctrine/Query.php
+3
-7
Record.php
Doctrine/Record.php
+1
-1
Session.php
Doctrine/Session.php
+2
-2
classes.php
tests/classes.php
+26
-0
No files found.
Doctrine/Query.php
View file @
f5f3b0d2
...
@@ -422,7 +422,7 @@ class Doctrine_Query extends Doctrine_Access {
...
@@ -422,7 +422,7 @@ class Doctrine_Query extends Doctrine_Access {
$array
=
$this
->
parseData
(
$stmt
);
$array
=
$this
->
parseData
(
$stmt
);
$colls
=
array
();
$colls
=
array
();
foreach
(
$array
as
$data
)
{
foreach
(
$array
as
$data
)
{
/**
/**
...
@@ -509,11 +509,7 @@ class Doctrine_Query extends Doctrine_Access {
...
@@ -509,11 +509,7 @@ class Doctrine_Query extends Doctrine_Access {
*/
*/
public
function
parseData
(
PDOStatement
$stmt
)
{
public
function
parseData
(
PDOStatement
$stmt
)
{
$array
=
array
();
$array
=
array
();
$keys
=
array
();
foreach
(
array_keys
(
$this
->
tables
)
as
$key
)
{
$k
=
strtolower
(
$key
);
$keys
[
$k
]
=
$key
;
}
while
(
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_ASSOC
))
:
while
(
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_ASSOC
))
:
/**
/**
* parse the data into two-dimensional array
* parse the data into two-dimensional array
...
@@ -522,7 +518,7 @@ class Doctrine_Query extends Doctrine_Access {
...
@@ -522,7 +518,7 @@ class Doctrine_Query extends Doctrine_Access {
$e
=
explode
(
"__"
,
$key
);
$e
=
explode
(
"__"
,
$key
);
if
(
count
(
$e
)
>
1
)
{
if
(
count
(
$e
)
>
1
)
{
$data
[
$
keys
[
$e
[
0
]
]][
$e
[
1
]]
=
$value
;
$data
[
$
e
[
0
]][
$e
[
1
]]
=
$value
;
}
else
{
}
else
{
$data
[
0
][
$e
[
0
]]
=
$value
;
$data
[
0
][
$e
[
0
]]
=
$value
;
}
}
...
...
Doctrine/Record.php
View file @
f5f3b0d2
...
@@ -143,7 +143,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
...
@@ -143,7 +143,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
}
}
// get the data array
// get the data array
$this
->
data
=
$this
->
table
->
getData
();
$this
->
data
=
$this
->
table
->
getData
();
// get the column count
// get the column count
$count
=
count
(
$this
->
data
);
$count
=
count
(
$this
->
data
);
...
...
Doctrine/Session.php
View file @
f5f3b0d2
...
@@ -80,9 +80,9 @@ abstract class Doctrine_Session extends Doctrine_Configurable implements Countab
...
@@ -80,9 +80,9 @@ abstract class Doctrine_Session extends Doctrine_Configurable implements Countab
$this
->
dbh
=
$pdo
;
$this
->
dbh
=
$pdo
;
$this
->
state
=
Doctrine_Session
::
STATE_OPEN
;
$this
->
state
=
Doctrine_Session
::
STATE_OPEN
;
$this
->
setParent
(
$manager
);
$this
->
setParent
(
$manager
);
$this
->
dbh
->
setAttribute
(
PDO
::
ATTR_CASE
,
PDO
::
CASE_
LOWER
);
$this
->
dbh
->
setAttribute
(
PDO
::
ATTR_CASE
,
PDO
::
CASE_
NATURAL
);
$this
->
dbh
->
setAttribute
(
PDO
::
ATTR_ERRMODE
,
PDO
::
ERRMODE_EXCEPTION
);
$this
->
dbh
->
setAttribute
(
PDO
::
ATTR_ERRMODE
,
PDO
::
ERRMODE_EXCEPTION
);
switch
(
$this
->
getAttribute
(
Doctrine
::
ATTR_CACHE
))
:
switch
(
$this
->
getAttribute
(
Doctrine
::
ATTR_CACHE
))
:
...
...
tests/classes.php
View file @
f5f3b0d2
...
@@ -272,6 +272,32 @@ class ORM_TestItem extends Doctrine_Record {
...
@@ -272,6 +272,32 @@ class ORM_TestItem extends Doctrine_Record {
$this
->
hasOne
(
"ORM_TestEntry"
,
"ORM_TestEntry.itemID"
);
$this
->
hasOne
(
"ORM_TestEntry"
,
"ORM_TestEntry.itemID"
);
}
}
}
}
class
ORM_AccessControl
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
"name"
,
"string"
,
255
);
}
public
function
setUp
()
{
$this
->
hasMany
(
"ORM_AccessGroup as accessGroups"
,
"ORM_AccessControlsGroups.accessGroupID"
);
}
}
class
ORM_AccessGroup
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
"name"
,
"string"
,
255
);
}
public
function
setUp
()
{
$this
->
hasMany
(
"ORM_AccessControl as accessControls"
,
"ORM_AccessControlsGroups.accessControlID"
);
}
}
class
ORM_AccessControlsGroups
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
"accessControlID"
,
"integer"
,
11
);
$this
->
hasColumn
(
"accessGroupID"
,
"integer"
,
11
);
$this
->
setPrimaryKey
(
array
(
"accessControlID"
,
"accessGroupID"
));
}
}
class
Log_Entry
extends
Doctrine_Record
{
class
Log_Entry
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
"stamp"
,
"timestamp"
);
$this
->
hasColumn
(
"stamp"
,
"timestamp"
);
...
...
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