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
f4fb2d94
Commit
f4fb2d94
authored
Sep 05, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finalizing cubrid Schema
parent
be67559f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
Command.php
framework/yii/db/Command.php
+1
-1
QueryBuilder.php
framework/yii/db/QueryBuilder.php
+1
-1
Schema.php
framework/yii/db/cubrid/Schema.php
+11
-11
QueryBuilder.php
framework/yii/db/mysql/QueryBuilder.php
+1
-1
No files found.
framework/yii/db/Command.php
View file @
f4fb2d94
...
...
@@ -472,7 +472,7 @@ class Command extends \yii\base\Component
* ))->execute();
* ~~~
*
* Not that the values in each row must match the corresponding column names.
* Not
e
that the values in each row must match the corresponding column names.
*
* @param string $table the table that new rows will be inserted into.
* @param array $columns the column names
...
...
framework/yii/db/QueryBuilder.php
View file @
f4fb2d94
...
...
@@ -134,7 +134,7 @@ class QueryBuilder extends \yii\base\Object
* ))->execute();
* ~~~
*
* Not that the values in each row must match the corresponding column names.
* Not
e
that the values in each row must match the corresponding column names.
*
* @param string $table the table that new rows will be inserted into.
* @param array $columns the column names
...
...
framework/yii/db/cubrid/Schema.php
View file @
f4fb2d94
...
...
@@ -43,9 +43,6 @@ class Schema extends \yii\db\Schema
'time'
=>
self
::
TYPE_TIME
,
'timestamp'
=>
self
::
TYPE_TIMESTAMP
,
'datetime'
=>
self
::
TYPE_DATETIME
,
// Bit string data types
// 'bit' => self::TYPE_BINARY, // TODO
// 'bit varying' => self::TYPE_BINARY,
// String data types
'char'
=>
self
::
TYPE_STRING
,
'varchar'
=>
self
::
TYPE_STRING
,
...
...
@@ -56,6 +53,9 @@ class Schema extends \yii\db\Schema
// BLOB/CLOB data types
'blob'
=>
self
::
TYPE_BINARY
,
'clob'
=>
self
::
TYPE_BINARY
,
// Bit string data types
// 'bit' => self::TYPE_STRING,
// 'bit varying' => self::TYPE_STRING,
// Collection data types (TODO are considered strings for now, naybe support conversion?)
// 'set' => self::TYPE_STRING,
// 'multiset' => self::TYPE_STRING,
...
...
@@ -106,7 +106,7 @@ class Schema extends \yii\db\Schema
$tableInfo
=
$this
->
db
->
pdo
->
cubrid_schema
(
\PDO
::
CUBRID_SCH_TABLE
,
$name
);
if
(
isset
(
$tableInfo
[
0
][
'NAME'
]))
{
$table
=
new
TableSchema
;
$table
=
new
TableSchema
()
;
$table
->
name
=
$tableInfo
[
0
][
'NAME'
];
$sql
=
'SHOW FULL COLUMNS FROM '
.
$this
->
quoteSimpleTableName
(
$table
->
name
);
...
...
@@ -145,7 +145,7 @@ class Schema extends \yii\db\Schema
*/
protected
function
loadColumnSchema
(
$info
)
{
$column
=
new
ColumnSchema
;
$column
=
new
ColumnSchema
()
;
$column
->
name
=
$info
[
'Field'
];
$column
->
allowNull
=
$info
[
'Null'
]
===
'YES'
;
...
...
@@ -174,13 +174,13 @@ class Schema extends \yii\db\Schema
if
(
isset
(
$values
[
1
]))
{
$column
->
scale
=
(
int
)
$values
[
1
];
}
if
(
$
column
->
size
===
1
&&
(
$type
===
'tinyint'
||
$type
===
'bit'
)
)
{
$column
->
type
=
'boolean'
;
}
elseif
(
$type
===
'bit'
||
$type
===
'bit varying'
)
{
if
(
$column
->
size
>
32
)
{
$column
->
type
=
'bigint'
;
if
(
$
type
===
'bit'
||
$type
===
'bit varying'
)
{
if
(
$column
->
size
===
1
)
{
$column
->
type
=
self
::
TYPE_BOOLEAN
;
}
else
if
(
$column
->
size
>
32
)
{
$column
->
type
=
self
::
TYPE_BIGINT
;
}
elseif
(
$column
->
size
===
32
)
{
$column
->
type
=
'integer'
;
$column
->
type
=
self
::
TYPE_INTEGER
;
}
}
}
...
...
framework/yii/db/mysql/QueryBuilder.php
View file @
f4fb2d94
...
...
@@ -152,7 +152,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* ))->execute();
* ~~~
*
* Not that the values in each row must match the corresponding column names.
* Not
e
that the values in each row must match the corresponding column names.
*
* @param string $table the table that new rows will be inserted into.
* @param array $columns the column names
...
...
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