AsaDB logo mark AsaDB

Prolog Language SQL Engine

Local-first database software

Official Home Page

Language surface

SQL Reference

Implemented AsaDB SQL, compatibility status, type behavior, and known planned areas.

Implemented command surface

Database and schemaCREATE DATABASE, DROP DATABASE, USE, CREATE TABLE, DROP TABLE, TRUNCATE TABLE, supported ALTER TABLE, CREATE INDEX, DROP INDEX, CREATE VIEW, and DROP VIEW.
Data manipulationINSERT INTO ... VALUES, SELECT ... FROM, UPDATE ... SET ... WHERE, and DELETE FROM ... WHERE.
MetadataSHOW DATABASES, SHOW TABLES, DESCRIBE or DESC, SHOW COLUMNS, SHOW INDEX, SHOW CREATE TABLE, and placeholder EXPLAIN.
Predicates and expressionsAND, OR, NOT, comparisons, simple arithmetic, IN, LIKE, BETWEEN, IS NULL, basic searched/simple CASE, scalar subqueries, IN (SELECT ...), and EXISTS.
FunctionsCOUNT, SUM, AVG, MIN, MAX, LOWER, UPPER, LENGTH, CONCAT, SUBSTRING, TRIM, REPLACE, and COALESCE.
Query shapingORDER BY, LIMIT including offset forms, GROUP BY, basic UNION / UNION ALL, and simple SELECT-based views.
RelationshipsBasic INNER JOIN, LEFT JOIN, and RIGHT JOIN. Simple qualified equality predicates can use the optimized indexed path; complex predicates retain a nested-loop compatibility path.
Transactions and administrationSTART TRANSACTION / BEGIN, COMMIT, ROLLBACK, LOCK TABLES, and UNLOCK TABLES.
Users and grantsCREATE USER, DROP USER, GRANT, REVOKE, SHOW GRANTS, and LOGIN ... IDENTIFIED BY ....

Type behavior

SQL types are recorded as column metadata; AsaDB v1 does not claim full strict coercion. Numeric literals map to numeric values for INT, INTEGER, BIGINT, DECIMAL, FLOAT, DOUBLE, and REAL. VARCHAR, CHAR, and text types store atom/string literals. Date/time types are metadata types with literal values. NULL is stored as null; DEFAULT is metadata used for omitted insert columns.

Recognized but not fully executable

Metadata stubsCREATE/DROP TRIGGER, CREATE/DROP PROCEDURE, and CREATE/DROP FUNCTION are recognized and retained as metadata; they do not execute a body.
Planned statementsREPLACE, LOAD DATA INFILE, INSERT SELECT, multi-table update/delete, HAVING, savepoints, status/variable introspection, and several administration commands remain planned.
Planned typesExamples include MEDIUMINT, BIT, binary/blob families, ENUM, SET, and a number of advanced MySQL types.

v1.4.0 compatibility diagnostics

The parser fallback now consumes the repository's MySQL 5.5 compatibility manifest. A statement known to be unavailable can be reported as planned or unsupported by that manifest, while genuinely unknown SQL remains distinct. The manifest is a compatibility guide; it does not turn planned syntax into executable SQL.

A minimal example

CREATE TABLE notes (id INT, title VARCHAR(100));
INSERT INTO notes VALUES (1, 'hello AsaDB');
SELECT id, title FROM notes WHERE id = 1 ORDER BY id LIMIT 10;

The official compatibility target and status legend are maintained in docs/mysql55-compatibility.md and src/asadb_mysql55_compat.pl.