⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mat01.mal

📁 一个内存数据库的源代码这是服务器端还有客户端
💻 MAL
字号:
# select count(*) from tablesmdb.list();#   v2:bat[:oid,:int]  := sql.bind("sys","ptables","id",0,2);# bind the two components separately#   v2v0:bat[:oid,:int]  := sql.bind("sys","ptables","id",0);#   v2v1:bat[:oid,:int]  := sql.bind("sys","ptables","id",0);#   v2v2:bat[:oid,:int]  := sql.bind("sys","ptables","id",0);# simulate the SQL behavior    v2v0:= bat.new(:oid,:int);    bat.insert(v2v0,nil,0);    v2v1:= bat.new(:oid,:int);    bat.insert(v2v1,nil,1);    v2v2:= bat.new(:oid,:int);    bat.insert(v2v2,nil,2);    v2 := mat.new(v2v0,v2v1,v2v2);#   v23:bat[:oid,:int]  := sql.bind("sys","ttables","id",0);    v23:= bat.new(:oid,:int);    bat.insert(v23,nil,3);#   v8:bat[:oid,:oid]  := sql.bind_dbat("sys","ptables",0);    v8:= bat.new(:oid,:oid);      v10 := bat.reverse(v8);    v12 := algebra.kdifference(v2,v10);    v17 := algebra.markT(v12,0@0);    v19 := bat.reverse(v17);    v21 := algebra.join(v19,v2);#   v26:bat[:oid,:oid]  := sql.bind_dbat("sys","ttables",0);    v26:= bat.new(:oid,:oid);    v28 := bat.reverse(v26);    v30 := algebra.kdifference(v23,v28);    v34 := algebra.markT(v30,0@0);    v36 := bat.reverse(v34);    v38 := algebra.join(v36,v23);    v40 := bat.setAccess(v21,"w");    bat.append(v40,v38);    v47 := algebra.markT(v40,0@0);    v49 := bat.reverse(v47);    v51 := algebra.join(v49,v40);    v56 := algebra.markT(v51,0@0);    v58 := bat.reverse(v56);    v60 := algebra.join(v58,v51);    v62 := aggr.count(v60);#   sql.exportValue(3,"tables","countvid","int",32,0,6,v62);	io.print(v62);optimizer.multitable();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -