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
9d87bb45
Commit
9d87bb45
authored
Dec 29, 2006
by
lsmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- remove trailing whitespace
parent
3214810e
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1434 additions
and
1434 deletions
+1434
-1434
Collection.php
lib/Doctrine/Collection.php
+4
-4
Batch.php
lib/Doctrine/Collection/Batch.php
+1
-1
Configurable.php
lib/Doctrine/Configurable.php
+4
-4
Firebird.php
lib/Doctrine/DataDict/Firebird.php
+2
-2
Informix.php
lib/Doctrine/DataDict/Informix.php
+2
-2
Mssql.php
lib/Doctrine/DataDict/Mssql.php
+2
-2
Mysql.php
lib/Doctrine/DataDict/Mysql.php
+4
-4
Oracle.php
lib/Doctrine/DataDict/Oracle.php
+2
-2
Pgsql.php
lib/Doctrine/DataDict/Pgsql.php
+3
-3
Sqlite.php
lib/Doctrine/DataDict/Sqlite.php
+2
-2
Db.php
lib/Doctrine/Db.php
+1
-1
Query.php
lib/Doctrine/Query.php
+1388
-1388
Where.php
lib/Doctrine/Query/Where.php
+1
-1
RawSql.php
lib/Doctrine/RawSql.php
+1
-1
Record.php
lib/Doctrine/Record.php
+9
-9
Association.php
lib/Doctrine/Relation/Association.php
+1
-1
Self.php
lib/Doctrine/Relation/Association/Self.php
+1
-1
Table.php
lib/Doctrine/Table.php
+6
-6
No files found.
lib/Doctrine/Collection.php
View file @
9d87bb45
...
...
@@ -321,17 +321,17 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
if
(
!
$this
->
expandable
)
{
return
false
;
}
if
(
!
isset
(
$this
->
reference
))
{
return
false
;
}
$id
=
$this
->
reference
->
obtainIdentifier
();
if
(
empty
(
$id
))
{
return
false
;
}
switch
(
get_class
(
$this
))
{
case
"Doctrine_Collection_Immediate"
:
$fields
=
implode
(
", "
,
$this
->
table
->
getColumnNames
());
...
...
lib/Doctrine/Collection/Batch.php
View file @
9d87bb45
...
...
@@ -159,7 +159,7 @@ class Doctrine_Collection_Batch extends Doctrine_Collection
// Doctrine_Record didn't exist in cache
$this
->
table
->
setData
(
$this
->
data
[
$key
]);
$this
->
data
[
$key
]
=
$this
->
table
->
getProxy
();
$this
->
data
[
$key
]
->
addCollection
(
$this
);
break
;
};
...
...
lib/Doctrine/Configurable.php
View file @
9d87bb45
...
...
@@ -69,7 +69,7 @@ abstract class Doctrine_Configurable
throw
new
Doctrine_Exception
(
"Batch size should be greater than or equal to zero"
);
}
break
;
case
Doctrine
::
ATTR_FETCHMODE
:
if
(
$value
<
0
)
{
throw
new
Doctrine_Exception
(
"Unknown fetchmode. See Doctrine::FETCH_* constants."
);
...
...
@@ -98,11 +98,11 @@ abstract class Doctrine_Configurable
break
;
case
Doctrine
::
ATTR_ACCESSORS
:
$accessors
=
array
(
'none'
,
'get'
,
'set'
,
'both'
);
// if ( ! in_array($value,$accessors)) {
// throw new Doctrine_Exception();
// }
break
;
case
Doctrine
::
ATTR_COLL_LIMIT
:
if
(
$value
<
1
)
{
...
...
@@ -126,7 +126,7 @@ abstract class Doctrine_Configurable
case
Doctrine
::
ATTR_DEFAULT_TABLE_TYPE
:
case
Doctrine
::
ATTR_ACCESSOR_PREFIX_GET
:
case
Doctrine
::
ATTR_ACCESSOR_PREFIX_SET
:
break
;
case
Doctrine
::
ATTR_SEQCOL_NAME
:
if
(
!
is_string
(
$value
))
{
...
...
lib/Doctrine/DataDict/Firebird.php
View file @
9d87bb45
...
...
@@ -65,9 +65,9 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
case
'text'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
16777215
;
// TODO: $db->options['default_text_field_length'];
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
'CHAR('
.
$length
.
')'
:
'VARCHAR('
.
$length
.
')'
;
case
'clob'
:
return
'BLOB SUB_TYPE 1'
;
...
...
lib/Doctrine/DataDict/Informix.php
View file @
9d87bb45
...
...
@@ -65,10 +65,10 @@ class Doctrine_DataDict_Informix extends Doctrine_DataDict
if
(
empty
(
$field
[
'length'
])
&&
array_key_exists
(
'default'
,
$field
))
{
$field
[
'length'
]
=
$this
->
conn
->
varchar_max_length
;
}
$length
=
(
!
empty
(
$field
[
'length'
]))
?
$field
[
'length'
]
:
false
;
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR(255)'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'NVARCHAR'
);
case
'clob'
:
...
...
lib/Doctrine/DataDict/Mssql.php
View file @
9d87bb45
...
...
@@ -67,9 +67,9 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
case
'string'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
false
;
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR('
.
$db
->
options
[
'default_text_field_length'
]
.
')'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'TEXT'
);
case
'clob'
:
...
...
lib/Doctrine/DataDict/Mysql.php
View file @
9d87bb45
...
...
@@ -136,13 +136,13 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
switch
(
$field
[
'type'
])
{
case
'char'
:
$length
=
(
!
empty
(
$field
[
'length'
]))
?
$field
[
'length'
]
:
false
;
return
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR(255)'
;
case
'varchar'
:
case
'array'
:
case
'object'
:
case
'string'
:
if
(
!
isset
(
$field
[
'length'
]))
{
if
(
array_key_exists
(
'default'
,
$field
))
{
$field
[
'length'
]
=
$this
->
conn
->
varchar_max_length
;
...
...
@@ -150,10 +150,10 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
$field
[
'length'
]
=
false
;
}
}
$length
=
(
$field
[
'length'
]
<
$this
->
conn
->
varchar_max_length
)
?
$field
[
'length'
]
:
false
;
$fixed
=
(
isset
(
$field
[
'fixed'
]))
?
$field
[
'fixed'
]
:
false
;
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR(255)'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'TEXT'
);
case
'clob'
:
...
...
lib/Doctrine/DataDict/Oracle.php
View file @
9d87bb45
...
...
@@ -62,9 +62,9 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
case
'varchar'
:
$length
=
!
empty
(
$field
[
'length'
])
?
$field
[
'length'
]
:
16777215
;
// TODO: $db->options['default_text_field_length'];
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
'CHAR('
.
$length
.
')'
:
'VARCHAR2('
.
$length
.
')'
;
case
'clob'
:
return
'CLOB'
;
...
...
lib/Doctrine/DataDict/Pgsql.php
View file @
9d87bb45
...
...
@@ -366,12 +366,12 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
case
'varchar'
:
$length
=
(
isset
(
$field
[
'length'
])
&&
$field
[
'length'
])
?
$field
[
'length'
]
:
null
;
// TODO: $db->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'
]
.
')'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'TEXT'
);
case
'clob'
:
return
'TEXT'
;
case
'blob'
:
...
...
lib/Doctrine/DataDict/Sqlite.php
View file @
9d87bb45
...
...
@@ -65,9 +65,9 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
case
'gzip'
:
case
'varchar'
:
$length
=
(
isset
(
$field
[
'length'
])
&&
$field
[
'length'
])
?
$field
[
'length'
]
:
null
;
$fixed
=
((
isset
(
$field
[
'fixed'
])
&&
$field
[
'fixed'
])
||
$field
[
'type'
]
==
'char'
)
?
true
:
false
;
return
$fixed
?
(
$length
?
'CHAR('
.
$length
.
')'
:
'CHAR('
.
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_DEFAULT_TEXTFLD_LENGTH
)
.
')'
)
:
(
$length
?
'VARCHAR('
.
$length
.
')'
:
'TEXT'
);
case
'clob'
:
...
...
lib/Doctrine/Db.php
View file @
9d87bb45
...
...
@@ -252,7 +252,7 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
$parts
[
'database'
]
=
':memory:'
;
$parts
[
'dsn'
]
=
'sqlite::memory:'
;
}
break
;
case
'mysql'
:
case
'informix'
:
...
...
lib/Doctrine/Query.php
View file @
9d87bb45
This diff is collapsed.
Click to expand it.
lib/Doctrine/Query/Where.php
View file @
9d87bb45
...
...
@@ -68,7 +68,7 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition
case
'regexp'
:
case
'like'
:
$operator
=
$this
->
getOperator
(
$func
);
if
(
empty
(
$relation
))
{
throw
new
Doctrine_Query_Exception
(
'DQL functions contains/regexp/like can only be used for fields of related components'
);
}
...
...
lib/Doctrine/RawSql.php
View file @
9d87bb45
...
...
@@ -105,7 +105,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate
$p
=
$low
;
$p
.=
"by"
;
$parts
[
$low
.
"by"
]
=
array
();
}
else
{
$parts
[
$p
][]
=
$part
;
}
...
...
lib/Doctrine/Record.php
View file @
9d87bb45
...
...
@@ -378,7 +378,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
if
(
$tmp
[
$name
]
!==
self
::
$null
)
{
if
(
is_string
(
$tmp
[
$name
]))
{
$value
=
unserialize
(
$tmp
[
$name
]);
if
(
$value
===
false
)
throw
new
Doctrine_Record_Exception
(
"Unserialization of
$name
failed."
);
}
else
{
...
...
@@ -390,10 +390,10 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
case
"gzip"
:
if
(
$tmp
[
$name
]
!==
self
::
$null
)
{
$value
=
gzuncompress
(
$tmp
[
$name
]);
if
(
$value
===
false
)
throw
new
Doctrine_Record_Exception
(
"Uncompressing of
$name
failed."
);
$this
->
_data
[
$name
]
=
$value
;
}
break
;
...
...
@@ -422,27 +422,27 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
case
Doctrine_Identifier
::
AUTO_INCREMENT
:
case
Doctrine_Identifier
::
SEQUENCE
:
$name
=
$this
->
_table
->
getIdentifier
();
if
(
$exists
)
{
if
(
isset
(
$this
->
_data
[
$name
])
&&
$this
->
_data
[
$name
]
!==
self
::
$null
)
{
$this
->
_id
[
$name
]
=
$this
->
_data
[
$name
];
}
}
unset
(
$this
->
_data
[
$name
]);
break
;
case
Doctrine_Identifier
::
NORMAL
:
$this
->
_id
=
array
();
$name
=
$this
->
_table
->
getIdentifier
();
if
(
isset
(
$this
->
_data
[
$name
])
&&
$this
->
_data
[
$name
]
!==
self
::
$null
)
{
$this
->
_id
[
$name
]
=
$this
->
_data
[
$name
];
}
break
;
case
Doctrine_Identifier
::
COMPOSITE
:
$names
=
$this
->
_table
->
getIdentifier
();
foreach
(
$names
as
$name
)
{
if
(
$this
->
_data
[
$name
]
===
self
::
$null
)
{
$this
->
_id
[
$name
]
=
null
;
...
...
@@ -1021,7 +1021,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
default
:
if
(
$this
->
_data
[
$v
]
instanceof
Doctrine_Record
)
$this
->
_data
[
$v
]
=
$this
->
_data
[
$v
]
->
getIncremented
();
$a
[
$v
]
=
$this
->
_data
[
$v
];
}
}
...
...
lib/Doctrine/Relation/Association.php
View file @
9d87bb45
...
...
@@ -113,7 +113,7 @@ class Doctrine_Relation_Association extends Doctrine_Relation
' WHERE '
.
$this
->
local
.
' IN ('
.
substr
(
str_repeat
(
"?, "
,
$count
),
0
,
-
2
)
.
')'
;
$dql
=
"FROM "
.
$this
->
table
->
getComponentName
();
$dql
.=
"."
.
$this
->
associationTable
->
getComponentName
();
$dql
.=
" WHERE "
.
$this
->
table
->
getComponentName
()
.
"."
.
$this
->
table
->
getIdentifier
()
.
" IN (
$sub
)"
;
...
...
lib/Doctrine/Relation/Association/Self.php
View file @
9d87bb45
...
...
@@ -50,7 +50,7 @@ class Doctrine_Relation_Association_Self extends Doctrine_Relation_Association
' FROM '
.
$this
->
associationTable
->
getTableName
()
.
' WHERE '
.
$this
->
foreign
.
' = ?'
;
$dql
=
'FROM '
.
$this
->
table
->
getComponentName
();
$dql
.=
'.'
.
$this
->
associationTable
->
getComponentName
();
$dql
.=
' WHERE '
.
$this
->
table
->
getComponentName
()
.
'.'
.
$this
->
table
->
getIdentifier
()
.
' IN ('
.
$sub
.
')'
;
...
...
lib/Doctrine/Table.php
View file @
9d87bb45
...
...
@@ -196,7 +196,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
)
)
),
$this
->
columns
);
$this
->
primaryKeys
[]
=
'id'
;
$this
->
identifier
=
'id'
;
$this
->
identifierType
=
Doctrine_Identifier
::
AUTO_INCREMENT
;
...
...
@@ -206,19 +206,19 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
if
(
count
(
$this
->
primaryKeys
)
>
1
)
{
$this
->
identifier
=
$this
->
primaryKeys
;
$this
->
identifierType
=
Doctrine_Identifier
::
COMPOSITE
;
}
else
{
foreach
(
$this
->
primaryKeys
as
$pk
)
{
$e
=
$this
->
columns
[
$pk
][
2
];
$found
=
false
;
foreach
(
$e
as
$option
=>
$value
)
{
if
(
$found
)
break
;
$e2
=
explode
(
":"
,
$option
);
switch
(
strtolower
(
$e2
[
0
]))
{
case
"autoincrement"
:
$this
->
identifierType
=
Doctrine_Identifier
::
AUTO_INCREMENT
;
...
...
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