text_routines

SYNOPSIS

Text routines: string operations

EXAMPLES

Calculate 64 bit CRC for some text:

mysql> SELECT common_schema.crc64('mysql') AS crc64;
+---------------------+
| crc64               |
+---------------------+
| 9350511318824990686 |
+---------------------+

Use shorttime_to_seconds() to parse '2h', making for 2 hours:

mysql> SELECT shorttime_to_seconds('2h') as seconds;
+---------+
| seconds |
+---------+
|    7200 |
+---------+

Extract value from dictionary:

mysql> SELECT get_option('{width: 100, height: 180, color: #ffa030}', 'height') AS result;
+--------+
| result |
+--------+
| 180    |
+--------+

 
common_schema documentation