Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
PSDI Army
yii2
Commits
2387d003
Commit
2387d003
authored
Sep 05, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CUBRID added exception about wrong implementation of quoteValue
parent
57a91c84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
QueryBuilder.php
framework/yii/db/cubrid/QueryBuilder.php
+1
-1
Schema.php
framework/yii/db/cubrid/Schema.php
+24
-0
No files found.
framework/yii/db/cubrid/QueryBuilder.php
View file @
2387d003
...
...
@@ -21,7 +21,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'int
(11)
NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_PK
=>
'int NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'varchar'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
...
...
framework/yii/db/cubrid/Schema.php
View file @
2387d003
...
...
@@ -7,6 +7,7 @@
namespace
yii\db\cubrid
;
use
yii\base\NotSupportedException
;
use
yii\db\Expression
;
use
yii\db\TableSchema
;
use
yii\db\ColumnSchema
;
...
...
@@ -87,6 +88,29 @@ class Schema extends \yii\db\Schema
}
/**
* Quotes a string value for use in a query.
* Note that if the parameter is not a string, it will be returned without change.
* @param string $str string to be quoted
* @return string the properly quoted string
* @see http://www.php.net/manual/en/function.PDO-quote.php
*/
public
function
quoteValue
(
$str
)
{
throw
new
NotSupportedException
(
'quoteValue is currently broken in cubrid PDO'
);
// TODO implement workaround
/* if (!is_string($str)) {
return $str;
}
$this->db->open();
if (($value = $this->db->pdo->quote($str)) !== false) {
return $value;
} else { // the driver doesn't support quote (e.g. oci)
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
}*/
}
/**
* Creates a query builder for the CUBRID database.
* @return QueryBuilder query builder instance
*/
...
...
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