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
9d7ad1e2
Commit
9d7ad1e2
authored
Jan 24, 2012
by
Kim Hemsø Rasmussen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added keywards to drizzle platform.
parent
3a77cd68
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
330 additions
and
22 deletions
+330
-22
Connection.php
lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php
+6
-1
Driver.php
lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php
+13
-7
DrizzlePlatform.php
lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
+8
-7
DrizzleKeywords.php
lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php
+302
-6
DrizzleSchemaManager.php
lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php
+1
-1
No files found.
lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php
View file @
9d7ad1e2
...
...
@@ -19,9 +19,14 @@
namespace
Doctrine\DBAL\Driver\DrizzlePDOMySql
;
/**
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
*/
class
Connection
extends
\Doctrine\DBAL\Driver\PDOConnection
{
/**
* {@inheritdoc}
*/
public
function
quote
(
$value
,
$type
=
\PDO
::
PARAM_STR
)
{
if
(
\PDO
::
PARAM_BOOL
===
$type
)
{
...
...
lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php
View file @
9d7ad1e2
...
...
@@ -27,13 +27,7 @@ namespace Doctrine\DBAL\Driver\DrizzlePDOMySql;
class
Driver
implements
\Doctrine\DBAL\Driver
{
/**
* Attempts to establish a connection with the underlying driver.
*
* @param array $params
* @param string $username
* @param string $password
* @param array $driverOptions
* @return Doctrine\DBAL\Driver\Connection
* {@inheritdoc}
*/
public
function
connect
(
array
$params
,
$username
=
null
,
$password
=
null
,
array
$driverOptions
=
array
())
{
...
...
@@ -70,21 +64,33 @@ class Driver implements \Doctrine\DBAL\Driver
return
$dsn
;
}
/**
* {@inheritdoc}
*/
public
function
getDatabasePlatform
()
{
return
new
\Doctrine\DBAL\Platforms\DrizzlePlatform
();
}
/**
* {@inheritdoc}
*/
public
function
getSchemaManager
(
\Doctrine\DBAL\Connection
$conn
)
{
return
new
\Doctrine\DBAL\Schema\DrizzleSchemaManager
(
$conn
);
}
/**
* {@inheritdoc}
*/
public
function
getName
()
{
return
'drizzle_pdo_mysql'
;
}
/**
* {@inheritdoc}
*/
public
function
getDatabase
(
\Doctrine\DBAL\Connection
$conn
)
{
$params
=
$conn
->
getParams
();
...
...
lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
View file @
9d7ad1e2
...
...
@@ -32,9 +32,7 @@ use Doctrine\DBAL\DBALException,
class
DrizzlePlatform
extends
AbstractPlatform
{
/**
* Get the platform name for this instance.
*
* @return string
* {@inheritdoc}
*/
public
function
getName
()
{
...
...
@@ -42,10 +40,7 @@ class DrizzlePlatform extends AbstractPlatform
}
/**
* Gets the character used for identifier quoting.
*
* @return string
* @override
* {@inheritdoc}
*/
public
function
getIdentifierQuoteCharacter
()
{
...
...
@@ -292,6 +287,12 @@ class DrizzlePlatform extends AbstractPlatform
return
'DATE'
;
}
/**
* C/P from mysql platform
*
* @param TableDiff $diff
* @return type
*/
public
function
getAlterTableSQL
(
TableDiff
$diff
)
{
$columnSql
=
array
();
...
...
lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php
View file @
9d7ad1e2
...
...
@@ -21,13 +21,9 @@
namespace
Doctrine\DBAL\Platforms\Keywords
;
/**
*
MySQL
Keywordlist
*
Drizzle
Keywordlist
*
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @link www.doctrine-project.com
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author David Coallier <davidc@php.net>
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
*/
class
DrizzleKeywords
extends
KeywordList
{
...
...
@@ -39,6 +35,306 @@ class DrizzleKeywords extends KeywordList
protected
function
getKeywords
()
{
return
array
(
'ABS'
,
'ALL'
,
'ALLOCATE'
,
'ALTER'
,
'AND'
,
'ANY'
,
'ARE'
,
'ARRAY'
,
'AS'
,
'ASENSITIVE'
,
'ASYMMETRIC'
,
'AT'
,
'ATOMIC'
,
'AUTHORIZATION'
,
'AVG'
,
'BEGIN'
,
'BETWEEN'
,
'BIGINT'
,
'BINARY'
,
'BLOB'
,
'BOOLEAN'
,
'BOTH'
,
'BY'
,
'CALL'
,
'CALLED'
,
'CARDINALITY'
,
'CASCADED'
,
'CASE'
,
'CAST'
,
'CEIL'
,
'CEILING'
,
'CHAR'
,
'CHARACTER'
,
'CHARACTER_LENGTH'
,
'CHAR_LENGTH'
,
'CHECK'
,
'CLOB'
,
'CLOSE'
,
'COALESCE'
,
'COLLATE'
,
'COLLECT'
,
'COLUMN'
,
'COMMIT'
,
'CONDITION'
,
'CONNECT'
,
'CONSTRAINT'
,
'CONVERT'
,
'CORR'
,
'CORRESPONDING'
,
'COUNT'
,
'COVAR_POP'
,
'COVAR_SAMP'
,
'CREATE'
,
'CROSS'
,
'CUBE'
,
'CUME_DIST'
,
'CURRENT'
,
'CURRENT_DATE'
,
'CURRENT_DEFAULT_TRANSFORM_GROUP'
,
'CURRENT_PATH'
,
'CURRENT_ROLE'
,
'CURRENT_TIME'
,
'CURRENT_TIMESTAMP'
,
'CURRENT_TRANSFORM_GROUP_FOR_TYPE'
,
'CURRENT_USER'
,
'CURSOR'
,
'CYCLE'
,
'DATE'
,
'DAY'
,
'DEALLOCATE'
,
'DEC'
,
'DECIMAL'
,
'DECLARE'
,
'DEFAULT'
,
'DELETE'
,
'DENSE_RANK'
,
'DEREF'
,
'DESCRIBE'
,
'DETERMINISTIC'
,
'DISCONNECT'
,
'DISTINCT'
,
'DOUBLE'
,
'DROP'
,
'DYNAMIC'
,
'EACH'
,
'ELEMENT'
,
'ELSE'
,
'END'
,
'ESCAPE'
,
'EVERY'
,
'EXCEPT'
,
'EXEC'
,
'EXECUTE'
,
'EXISTS'
,
'EXP'
,
'EXTERNAL'
,
'EXTRACT'
,
'FALSE'
,
'FETCH'
,
'FILTER'
,
'FLOAT'
,
'FLOOR'
,
'FOR'
,
'FOREIGN'
,
'FREE'
,
'FROM'
,
'FULL'
,
'FUNCTION'
,
'FUSION'
,
'GET'
,
'GLOBAL'
,
'GRANT'
,
'GROUP'
,
'GROUPING'
,
'HAVING'
,
'HOLD'
,
'HOUR'
,
'IDENTITY'
,
'IN'
,
'INDICATOR'
,
'INNER'
,
'INOUT'
,
'INSENSITIVE'
,
'INSERT'
,
'INT'
,
'INTEGER'
,
'INTERSECT'
,
'INTERSECTION'
,
'INTERVAL'
,
'INTO'
,
'IS'
,
'JOIN'
,
'LANGUAGE'
,
'LARGE'
,
'LATERAL'
,
'LEADING'
,
'LEFT'
,
'LIKE'
,
'LN'
,
'LOCAL'
,
'LOCALTIME'
,
'LOCALTIMESTAMP'
,
'LOWER'
,
'MATCH'
,
'MAX'
,
'MEMBER'
,
'MERGE'
,
'METHOD'
,
'MIN'
,
'MINUTE'
,
'MOD'
,
'MODIFIES'
,
'MODULE'
,
'MONTH'
,
'MULTISET'
,
'NATIONAL'
,
'NATURAL'
,
'NCHAR'
,
'NCLOB'
,
'NEW'
,
'NO'
,
'NONE'
,
'NORMALIZE'
,
'NOT'
,
'NULL_SYM'
,
'NULLIF'
,
'NUMERIC'
,
'OCTET_LENGTH'
,
'OF'
,
'OLD'
,
'ON'
,
'ONLY'
,
'OPEN'
,
'OR'
,
'ORDER'
,
'OUT'
,
'OUTER'
,
'OVER'
,
'OVERLAPS'
,
'OVERLAY'
,
'PARAMETER'
,
'PARTITION'
,
'PERCENTILE_CONT'
,
'PERCENTILE_DISC'
,
'PERCENT_RANK'
,
'POSITION'
,
'POWER'
,
'PRECISION'
,
'PREPARE'
,
'PRIMARY'
,
'PROCEDURE'
,
'RANGE'
,
'RANK'
,
'READS'
,
'REAL'
,
'RECURSIVE'
,
'REF'
,
'REFERENCES'
,
'REFERENCING'
,
'REGR_AVGX'
,
'REGR_AVGY'
,
'REGR_COUNT'
,
'REGR_INTERCEPT'
,
'REGR_R2'
,
'REGR_SLOPE'
,
'REGR_SXX'
,
'REGR_SXY'
,
'REGR_SYY'
,
'RELEASE'
,
'RESULT'
,
'RETURN'
,
'RETURNS'
,
'REVOKE'
,
'RIGHT'
,
'ROLLBACK'
,
'ROLLUP'
,
'ROW'
,
'ROWS'
,
'ROW_NUMBER'
,
'SAVEPOINT'
,
'SCOPE'
,
'SCROLL'
,
'SEARCH'
,
'SECOND'
,
'SELECT'
,
'SENSITIVE'
,
'SESSION_USER'
,
'SET'
,
'SIMILAR'
,
'SMALLINT'
,
'SOME'
,
'SPECIFIC'
,
'SPECIFICTYPE'
,
'SQL'
,
'SQLEXCEPTION'
,
'SQLSTATE'
,
'SQLWARNING'
,
'SQRT'
,
'START'
,
'STATIC'
,
'STDDEV_POP'
,
'STDDEV_SAMP'
,
'SUBMULTISET'
,
'SUBSTRING'
,
'SUM'
,
'SYMMETRIC'
,
'SYSTEM'
,
'SYSTEM_USER'
,
'TABLE'
,
'TABLESAMPLE'
,
'THEN'
,
'TIME'
,
'TIMESTAMP'
,
'TIMEZONE_HOUR'
,
'TIMEZONE_MINUTE'
,
'TO'
,
'TRAILING'
,
'TRANSLATE'
,
'TRANSLATION'
,
'TREAT'
,
'TRIGGER'
,
'TRIM'
,
'TRUE'
,
'UESCAPE'
,
'UNION'
,
'UNIQUE'
,
'UNKNOWN'
,
'UNNEST'
,
'UPDATE'
,
'UPPER'
,
'USER'
,
'USING'
,
'VALUE'
,
'VALUES'
,
'VARCHAR'
,
'VARYING'
,
'VAR_POP'
,
'VAR_SAMP'
,
'WHEN'
,
'WHENEVER'
,
'WHERE'
,
'WIDTH_BUCKET'
,
'WINDOW'
,
'WITH'
,
'WITHIN'
,
'WITHOUT'
,
'XML'
,
'XMLAGG'
,
'XMLATTRIBUTES'
,
'XMLBINARY'
,
'XMLCOMMENT'
,
'XMLCONCAT'
,
'XMLELEMENT'
,
'XMLFOREST'
,
'XMLNAMESPACES'
,
'XMLPARSE'
,
'XMLPI'
,
'XMLROOT'
,
'XMLSERIALIZE'
,
'YEAR'
,
);
}
}
\ No newline at end of file
lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php
View file @
9d7ad1e2
...
...
@@ -82,7 +82,7 @@ class DrizzleSchemaManager extends AbstractSchemaManager
);
}
protected
function
_getPortableTableIndexesList
(
$tableIndexes
,
$tableName
=
null
)
protected
function
_getPortableTableIndexesList
(
$tableIndexes
,
$tableName
=
null
)
{
$indexes
=
array
();
foreach
(
$tableIndexes
as
$k
)
{
...
...
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