AvenirSQL —— 基于 Node.js 的数据库
AvenirSQL是一个用Node.js设计的数据库,支持常见的SQL语句。 技术特点 1.支持增删改查 2.精确查找支持哈希索引,范围查找支持B+树索引 3.智能缓存,提升QPS性能 4.提供用户管理,cli程序(curl.js) 5.实现串行锁功能 6.灵活的策略配置 具体技术实现 1.统一的底层错误处理函数,避免函数重复传递参数。 async response(type, client) { let res = null; if (typeof type == 'string') { res = getError(type); if (!res) { res = unknown; } } else { let code = type.code; let data = type.data; res = getError(code); if (!res) { res = unknown; } res.data = data; } client.write(JSON.stringify(res)); //如果没有配置默认短连接 if( ini...
