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
9b525f34
Commit
9b525f34
authored
Mar 01, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the DQL DELETE handling
parent
a2016e2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
Doctrine.php
lib/Doctrine.php
+2
-1
Oracle.php
lib/Doctrine/Import/Oracle.php
+1
-1
Query.php
lib/Doctrine/Query.php
+21
-4
No files found.
lib/Doctrine.php
View file @
9b525f34
...
...
@@ -529,8 +529,9 @@ final class Doctrine
*/
public
static
function
isValidClassname
(
$classname
)
{
if
(
preg_match
(
'~(^[a-z])|(_[a-z])|([\W])|(_{2})~'
,
$classname
))
if
(
preg_match
(
'~(^[a-z])|(_[a-z])|([\W])|(_{2})~'
,
$classname
))
{
return
false
;
}
return
true
;
}
...
...
lib/Doctrine/Import/Oracle.php
View file @
9b525f34
...
...
@@ -126,7 +126,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import
$descr
[
$val
[
'column_name'
]]
=
array
(
'name'
=>
$val
[
'column_name'
],
'notnull'
=>
(
bool
)
(
$val
[
'nullable'
]
===
'N'
),
// nullable is N when mandatory
'notnull'
=>
(
bool
)
(
$val
[
'nullable'
]
===
'N'
),
'type'
=>
$val
[
'data_type'
],
'ptype'
=>
$decl
[
'type'
],
'fixed'
=>
$decl
[
'fixed'
],
...
...
lib/Doctrine/Query.php
View file @
9b525f34
...
...
@@ -47,6 +47,14 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
* constant for UPDATE queries
*/
const
UPDATE
=
2
;
/**
* constant for INSERT queries
*/
const
INSERT
=
3
;
/**
* constant for CREATE queries
*/
const
CREATE
=
4
;
/**
* @param array $subqueryAliases the table aliases needed in some LIMIT subqueries
*/
...
...
@@ -957,8 +965,14 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
$parts
=
$this
->
splitQuery
(
$query
);
foreach
(
$parts
as
$k
=>
$part
)
{
$part
=
implode
(
" "
,
$part
);
$part
=
implode
(
' '
,
$part
);
switch
(
strtoupper
(
$k
))
{
case
'CREATE'
:
$this
->
type
=
self
::
CREATE
;
break
;
case
'INSERT'
:
$this
->
type
=
self
::
INSERT
;
break
;
case
'DELETE'
:
$this
->
type
=
self
::
DELETE
;
break
;
...
...
@@ -1297,10 +1311,13 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
if
(
!
isset
(
$this
->
tableAliases
[
$currPath
]))
{
$this
->
tableIndexes
[
$tname
]
=
1
;
}
}
$this
->
parts
[
"from"
]
=
$this
->
conn
->
quoteIdentifier
(
$table
->
getTableName
())
.
' '
.
$tname
;
$this
->
parts
[
'from'
]
=
$this
->
conn
->
quoteIdentifier
(
$table
->
getTableName
());
if
(
$this
->
type
===
self
::
SELECT
)
{
$this
->
parts
[
'from'
]
.=
' '
.
$tname
;
}
$this
->
tableAliases
[
$currPath
]
=
$tname
;
...
...
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