qingqiz / nmsql Goto Github PK
View Code? Open in Web Editor NEWLicense: Do What The F*ck You Want To Public License
License: Do What The F*ck You Want To Public License
我发现sqlite好多操作都是直接将record number压栈,我们还要不要保留record number这东西。
如果保留的话,dbengine需要给我增加接口。
如果不保留的话,每次压栈一个记录有可能会有性能损耗,以及之后可能会碰到一些其他问题(我猜的)。
callback 操作是出栈p1个元素,放进一个数组中 调用callback函数,p1个元素就是结果的p1列
在这里规定一下,栈顶是第0列,然后是第1列,以此类推
在callback函数调用中,传入的元素内容也是以dbengine和vm数据调用格式存储,具体见#40
列号统一以0开始
eps=1e-6
使用相对误差
上次说到:vm调用dbendine接口时传入的字符串是如下形式的:
Offset1
Offset2
...
OffsetN
String1
String2
...
StringN
然后就有了几个问题:
暂时就想得到这几个问题
dbengine返回的数据全是字符串,但是当我们要对数据排序的时候,需要知道数据的类型,但是vm这一层只能知道vm返回的数据有几列,每一列数据的字符串形式是怎样的,不知道类型。
我想的解决方案有两种:
rt @osmium18452
总结qq群聊内容。
我的B+树的设计
建议dbengine和page扫一下。便于沟通。
@osmium18452 @PtvMiKu
Select max(a) from tablea;
对于这种sql你怎么处理
接口对不上啊,见下文
-[ ] insert 时要插入 key-value 对,但是 Btree 的接口里没给 value
-[ ] erase 时要只要删除一个节点就可以了,不需要key
当查找失败时,sqlite关于cursor指向下一个还是前一个语焉不详,我想统一一下,所有涉及查找的操作都是lower_bound,及存在时指向存在的位置,否则指向第一个大于它的位置
NMSQL中分为两种索引:聚簇索引(clustered index)和次要索引(secondary index)。这两种索引都是一种差不多的B+树。
一张表有且只有一个聚簇索引,也就是只有一个主键(虽然主键是一个逻辑上的概念,这里先这么叫)。主键会决定了数据的真实存储位置。次要索引可以有很多,不会影响数据的实际存储位置。
dbengine使用B+Tree接口的时候需要注意以下几点:
@QingQiz 你来总结一下?
vm传入数据:
[len(2),flag(1),null(1),string(len)]+
括号中代表字节数
dbengine返回数据
len(4)[len(2),flag(1),null(1),string(len)]+
我能想到的需要
咱们表达式里应该支持那些函数,我试了试,只发现了 max 和 min,ir里到 strlen 我没找到对应到函数
研究中
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.