标签:nod ons 支持 数据 函数 ble number expected https
cratedb 4.2 已经发布了,从changelogs 可以看到还是有比较多的更新的,比如pg 协议更好的兼容(更好的支持bi以及数据分析工具)
同时提供了更好的pg内部结构的暴露(还是方便数据分析工具的使用),同时替换nashorn 为graalvm 的js 引擎(更好的js 特性支持)
同时也提供了很多更好的内置函数,还是很不错的
version: "3"
services:
crate1:
image: dockerimage.yonyou.com/cratedb/crate:4.2.3
volumes:
- "./cratedb/data1:/data"
- "./cratedb/1.yaml:/crate/config/crate.yml"
ports:
- "4200:4200"
- "4300:4300"
- "5432:5432"
crate2:
image: dockerimage.yonyou.com/cratedb/crate:4.2.3
volumes:
- "./cratedb/data2:/data"
- "./cratedb/2.yaml:/crate/config/crate.yml"
ports:
- "4201:4200"
- "4301:4300"
- "5433:5432"
crate3:
image: dockerimage.yonyou.com/cratedb/crate:4.2.3
volumes:
- "./cratedb/data3:/data"
- "./cratedb/3.yaml:/crate/config/crate.yml"
ports:
- "4202:4200"
- "4302:4300"
- "5434:5432"
1.yaml:
cluster.name: cratecluster
node.name: crate1
node.master: true
node.data: true
http.port: 4200
psql.port: 5432
transport.tcp.port: 4300
discovery.seed_hosts: ["crate1"]
cluster.initial_master_nodes: ["crate1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
gateway.expected_nodes: 3
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
network.host: _local_,_site_
path.logs: /data/log
path.data: /data/data
blobs.path: /data/blobs
2.yaml:
cluster.name: cratecluster
node.name: crate2
node.master: false
node.data: true
http.port: 4200
psql.port: 5432
transport.tcp.port: 4300
discovery.seed_hosts: ["crate1"]
cluster.initial_master_nodes: ["crate1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
gateway.expected_nodes: 3
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
network.host: _local_,_site_
path.logs: /data/log
path.data: /data/data
blobs.path: /data/blobs
3.yaml:
cluster.name: cratecluster
node.name: crate3
node.master: false
node.data: true
http.port: 4200
psql.port: 5432
transport.tcp.port: 4300
discovery.seed_hosts: ["crate1"]
cluster.initial_master_nodes: ["crate1"]
http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: _local_,_site_
gateway.expected_nodes: 3
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
path.logs: /data/log
path.data: /data/data
blobs.path: /data/blobs
{
"name": "knex-crate-db",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"knex": "^0.21.5",
"pg": "^8.3.2"
},
"scripts": {
"app": "tsc && node dist/app.js"
}
}
app.ts:
import knex from "knex"
var client = knex({
client: ‘pg‘,
version: ‘7.2‘,
connection: {
host: ‘ip‘,
user: ‘crate‘
}
});
?
let users = client("doc.users").select("*")
users.then((data) => {
console.log(data)
// close
client.destroy(function () {
console.log(JSON.stringify(arguments))
})
})
https://crate.io/docs/crate/reference/en/latest/appendices/release-notes/4.2.0.html
https://github.com/knex/knex
https://github.com/brianc/node-postgres
标签:nod ons 支持 数据 函数 ble number expected https
原文地址:https://www.cnblogs.com/rongfengliang/p/13563132.html