Commit 315be84f authored by Jan Kramer's avatar Jan Kramer

Added GUID expression to SQLite platform

parent f3374cb1
...@@ -46,6 +46,17 @@ class SqlitePlatform extends AbstractPlatform ...@@ -46,6 +46,17 @@ class SqlitePlatform extends AbstractPlatform
return 'RLIKE'; return 'RLIKE';
} }
/**
* {@inheritDoc}
*/
public function getGuidExpression()
{
return "HEX(RANDOMBLOB(4)) || '-' || HEX(RANDOMBLOB(2)) || '-4' || "
. "SUBSTR(HEX(RANDOMBLOB(2)), 2) || '-' || "
. "SUBSTR('89AB', 1 + (ABS(RANDOM()) % 4), 1) || "
. "SUBSTR(HEX(RANDOMBLOB(2)), 2) || '-' || HEX(RANDOMBLOB(6))";
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment