TiDB for moondb — the moonmysql wire protocol, with the server's own capability report and version detection.
moon add moonbitstack/moontidbasync fn run() -> Unit raise {
let db = @moontidb.connect("127.0.0.1", 4000, "root", "", "test")
let server = @moontidb.server_of(db) // Server::Tidb
let plan = @moontidb.capabilities_for(server) // multiple_result_sets: false
db.execute("CREATE TABLE hero (id INT PRIMARY KEY, name TEXT)", []) |> ignore
db.close()
}| TiDB v8.5 | |
|---|---|
| Prepared statements, binary protocol | yes |
| INSERT/UPDATE without a primary key | yes (hidden _tidb_rowid) |
| Savepoints, transactions | yes |
| Unsigned 64-bit columns | yes |
| Stored procedures returning result sets | no (error 8108) |
| utf8 vs utf8mb3 spelling in the session | TiDB reports utf8mb3 where MySQL reports utf8 |
| FLOAT rendered as text | more digits than MySQL's six |
Install
Download zipTiDB for moondb — the moonmysql wire protocol, with the server's own capability report and version detection.