BedquiltDBPostgreSQL 扩展
BedquiltDB 是一款开源的PostgreSQL扩展,专门用于支持jsonb数据类型的存储,并且提供相应的开放API。BedquiltDB 旨在为开发人员提供一种功能强大的工具,在项目的早期阶段,用于处理松散结构化的数据。
优点:
-
简单开放的API
-
支持所有编程语言
-
支持所有SQL语句,包括约束
-
容易从"loose schema" 模式切换到 "well defined schema"而不需要改变数据库平台。
示例代码:
Python
import pybedquilt bq = pybedquilt.BedquiltClient(dbname='bedquilt_test') projects = bq['projects'] projects.add_constraints({ 'description': {'$required': 1, '$notnull': 1, '$type': 'string'}, 'tags': {'$required': 1, '$type': 'array'} }) projects.insert({ '_id': "BedquiltDB", 'description': "A ghastly hack.", 'quality': "pre-alpha", 'tags': ["json", "postgres", "api"] }) early_projects = projects.find( {'quality': 'pre-alpha'}) api_projects = projects.find( {'tags': ['api']}) cool_project = projects.find_one_by_id('BedquiltDB')
Node.js
var BedquiltClient = require('bedquilt').BedquiltClient; BedquiltClient.connect('localhost', function(err, client) { var tools = client.collection('tools'); tools.find({type: 'blunt'}, function(err, results) { console.log(results); }); });
SQL
select bq_insert( 'orders', '{"_id": "2001515", "customerId": "117176", "items": ["orange_coat", "socks", "plastic_teeth"]}' ); select bq_find( 'orders', '{"customerId": "220011", "items": ["socks"]}' ); select bq_remove_one( 'orders', '{"_id": "4401515"}' );
评论
ShellJSNode.js 扩展
ShellJS是Node.js扩展,用于实现Unixshell命令执行,支持Windows。示例代码:require('shelljs/global');if(!which('git')){echo(
ShellJSNode.js 扩展
0
StarPUGCC 扩展
StarUP通常用来帮助高性能的类库和编译环境探索不同体系结构的多核架构。StarPU是一组GCC扩展和相关联的运行时系统,旨在促进异构系统的编程-例如,具有可编程图形处理单元的计算机。“StarPU
StarPUGCC 扩展
0
JspTestjunit扩展
JspTest是一个不依赖予容器,对jsp页面进行单元测试的junit扩展。内部它使用Jasper作为jsp编译引擎---tomcat的jsp引擎。对于使用maven作为构建工具的团队或个人,使用非常
JspTestjunit扩展
0
console-traceNode.js 扩展
console-trace扩展了Node.JS的本地console对象,以CallSite信息给日志功能添加前缀如何使用:require('console-trace')你可以添加t或者trace的g
console-traceNode.js 扩展
0