PuzzleDB supports MySQL commands based on go-mysql, a database framework that makes it easy to implement MySQL compatible servers using Go.
The go-mysql framework automatically handles the MySQL protocol and system commands. Therefore, PuzzleDB achieves MySQL compatibility by implementing only simply handling DDL (Data Definition Language) and DML (Data Manipulation Language) query commands.
PuzzleDB is a multi-data model database and the core data model is a document model; PuzzleDB converts MySQL data types into the PuzzleDB data model as follows:
MySQL | PuzzleDB |
---|---|
COMPLEX | map |
ARRAY | array |
VARCHAR | string |
CHAR | string |
TINYINT | tiny |
SMALLINT | short |
INTEGER | int |
BIGINT | long |
FLOAT | float32 |
DOUBLE (REAL) | float64 |
DATE DATETIME | time.Time |
TIME TIMESTAMP | time.Time |
NULL | null |
BOOLEAN (TINYINT(1)) | bool |
BLOB (BYTEA) | []byte |
PuzzleDB currently supports MySQL statements in stages. This section describes the status of Redis command support in PuzzleDB.
Support | Statement | Note |
---|---|---|
O | CREATE DATABASE | |
O | CREATE TABLE | |
O | DROP DATABASE | |
O | DROP TABLE |
Support | Statement | Note |
---|---|---|
O | BEGIN | |
O | COMMIT | |
O | ROLLBACK |
Support | Statement | Note |
---|---|---|
O | DELETE | |
O | INSERT | Does not perform constraint checking on foreign keys |
O | SELECT | Sub-queries and algebraic operations are currently not supported |
O | UPDATE |
Support | Statement | Note |
---|---|---|
O | USE |