Node.js 水线定向数据库连接超时
使用SailsJS/Waterline,我使用Waterline-orientdb适配器连接到orientdb并将我的域对象提交到orientdb。除了我从数据库中得到的频繁连接超时之外,这一切都非常简单Node.js 水线定向数据库连接超时,node.js,sails.js,orientdb,waterline,sails-orientdb,Node.js,Sails.js,Orientdb,Waterline,Sails Orientdb,使用SailsJS/Waterline,我使用Waterline-orientdb适配器连接到orientdb并将我的域对象提交到orientdb。除了我从数据库中得到的频繁连接超时之外,这一切都非常简单 orientdb: { adapter: 'waterline-orientdb', host: 'somehost', port: 2424, user: 'someuser', password: 'somepassword', databa
orientdb:
{
adapter: 'waterline-orientdb',
host: 'somehost',
port: 2424,
user: 'someuser',
password: 'somepassword',
database: 'somedatabasename'
}
为了支持数据库连接,是否有办法配置适配器,使其使用池数据库连接,以便在发出查询之前测试连接?为了避免多次发出查询,适配器本身似乎应该能够处理所有这些问题。目前sails orientdb不支持池连接,但实现起来应该不会太困难 更新:对池连接的支持将在下一版本的sails orientdb:v0.10.51中提供,并通过配置启用,例如:
connections: {
myLocalOrient: {
//...
pool: { max: 10 }
}
}
有关的更多详细信息。Guardius,我已更新了下面的答案,池连接将在下一版本中出现。干杯