Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 4.17 KB

mysql.md

File metadata and controls

36 lines (20 loc) · 4.17 KB

MySQL Compatibility

PuzzleDB supports MySQL commands based on go-mysql, a database framework that makes it easy to implement MySQL compatible servers using Go.

framework

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.

Data Model

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:

MySQLPuzzleDB

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

Supported commands

PuzzleDB currently supports MySQL statements in stages. This section describes the status of Redis command support in PuzzleDB.

Data Definition Statements

SupportStatementNote

O

CREATE DATABASE

O

CREATE TABLE

O

DROP DATABASE

O

DROP TABLE

Transaction Control Statements

SupportStatementNote

O

BEGIN

O

COMMIT

O

ROLLBACK

Data Manipulation Statements

SupportStatementNote

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

Utility Statements

SupportStatementNote

O

USE