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
eb55ec4a
Commit
eb55ec4a
authored
Mar 07, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ported guid() from MDB2
parent
e68b193c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
4 deletions
+39
-4
Expression.php
lib/Doctrine/Expression.php
+9
-0
Mssql.php
lib/Doctrine/Expression/Mssql.php
+11
-3
Mysql.php
lib/Doctrine/Expression/Mysql.php
+9
-0
Oracle.php
lib/Doctrine/Expression/Oracle.php
+10
-1
No files found.
lib/Doctrine/Expression.php
View file @
eb55ec4a
...
@@ -652,4 +652,13 @@ class Doctrine_Expression extends Doctrine_Connection_Module
...
@@ -652,4 +652,13 @@ class Doctrine_Expression extends Doctrine_Connection_Module
$value2
=
$this
->
getIdentifier
(
$value2
);
$value2
=
$this
->
getIdentifier
(
$value2
);
return
$expression
.
' BETWEEN '
.
$value1
.
' AND '
.
$value2
;
return
$expression
.
' BETWEEN '
.
$value1
.
' AND '
.
$value2
;
}
}
/**
* Returns global unique identifier
*
* @return string to get global unique identifier
*/
public
function
guid
()
{
throw
new
Doctrine_Expression_Exception
(
'method not implemented'
);
}
}
}
lib/Doctrine/Expression/Mssql.php
View file @
eb55ec4a
...
@@ -71,11 +71,19 @@ class Doctrine_Expression_Mssql extends Doctrine_Expression
...
@@ -71,11 +71,19 @@ class Doctrine_Expression_Mssql extends Doctrine_Expression
* @param string $arg2
* @param string $arg2
* @param string $values...
* @param string $values...
* @return string to concatenate two strings
* @return string to concatenate two strings
* @access public
*/
**/
public
function
concat
(
$arg1
,
$arg2
)
function
concat
(
$arg1
,
$arg2
)
{
{
$args
=
func_get_args
();
$args
=
func_get_args
();
return
'('
.
implode
(
' + '
,
$args
)
.
')'
;
return
'('
.
implode
(
' + '
,
$args
)
.
')'
;
}
}
/**
* Returns global unique identifier
*
* @return string to get global unique identifier
*/
public
function
guid
()
{
return
'NEWID()'
;
}
}
}
lib/Doctrine/Expression/Mysql.php
View file @
eb55ec4a
...
@@ -98,4 +98,13 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression
...
@@ -98,4 +98,13 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression
$match
.=
$this
->
patternEscapeString
();
$match
.=
$this
->
patternEscapeString
();
return
$match
;
return
$match
;
}
}
/**
* Returns global unique identifier
*
* @return string to get global unique identifier
*/
public
function
guid
()
{
return
'UUID()'
;
}
}
}
lib/Doctrine/Expression/Oracle.php
View file @
eb55ec4a
...
@@ -89,8 +89,17 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression
...
@@ -89,8 +89,17 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression
*
*
* @return string an oracle SQL string that generates a float between 0 and 1
* @return string an oracle SQL string that generates a float between 0 and 1
*/
*/
function
random
()
public
function
random
()
{
{
return
'dbms_random.value'
;
return
'dbms_random.value'
;
}
}
/**
* Returns global unique identifier
*
* @return string to get global unique identifier
*/
public
function
guid
()
{
return
'SYS_GUID()'
;
}
}
}
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