English | 中文
This is a database demo composed with Cangjie, the brand-new language.
-
CREATE_DATABASE -
DROP_DATABASE -
USE -
ERR -
QUIT -
CREATE_TABLE -
DROP_TABLE -
INFO_TABLE -
INSERT_INTO -
DELETE_FROM -
SELECT -
HELP -
Root Directory Config
- Run program:
cjpm run - Run
.helpfor Manual and you will get the output below
Available commands:
1> create database <name> - Create a new database
2> drop database <name> - Delete a database
3> use <name> - Switch to database
4> create table <name> (<col_type1> <col_name1>, <col_type2> <col_name2>, … )
- Create a new table
5> drop table <name> - Delete a table
6> info table <name> - Show table information
7> insert into <table> set <col_name1>=<col_value1>, <col_name2>=<col_value2>, …
- Insert data into table
8> delete from <table> [where condition] - Delete data from table
9> select <col_name1>, <col_name2>, … from <table> [where condition] [order by col_name] [asc/desc]
- Query data from tablename_database
|--database.meta
|--name_table
| |--table.meta
| |--page.data
! !
| Key | Type |
|---|---|
| Magic Name | "CJDB" |
| Database Name | String |
| Table Count | Int |
| Table Name | List<String> |
| Key | Type |
|---|---|
| Table Name | String |
| Row Count | UInt |
| Column Count | UInt |
| Table Column Info | List<List<Type, String>> |
| Column_0 | Column_1 | ... |
|---|---|---|
| T | T | ... |
| ... | ... | ... |