- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
orientdb.insert()
.into('User')
.set({name: 'John', surname: 'Smith'})
.all()
.then(function(result) {
...
}, function(error){
...
})
这是通过orientjs在OrientDb中插入单个顶点的方法。如何一次插入多个对象?
下面的查询
orientdb.insert()
.into('User')
.set([{name: 'John', surname: 'Smith'}, {name: 'Harry', surname: 'Potter'}])
.all()
.then(function(result) {
...
}, function(error){
...
})
仅插入最后一个元素({name: 'Harry', surname: 'Potter'}
)
最佳答案
试试这个
var OrientDB = require('orientjs');
var server = OrientDB({
host: 'localhost',
port: 2424,
username: 'root',
password: 'root'
})
var db = server.use({
name: 'mydb',
username: 'admin',
password: 'admin'
})
db.query('insert into User2(name) values ("John"),("Harry")').then(function (response) {
console.log(response);
});
server.close();
这是我得到的结果
希望对你有帮助
关于orientdb - orientjs - 如何执行批量插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36178853/
我对 OrientDB 中的多重继承很好奇...假设我创建了以下顶点类: CREATE CLASS A EXTENDS V CREATE PROPERTY A.label STRING CREATE
generic 类和vertex 或edge 类有什么区别?你为什么要用一个而不是另一个? 最佳答案 OrientDB 是一个多模型数据库。文档中介绍了数据建模: http://orientdb.co
如何在 Orientdb 中使 Edge 独一无二。 我想出的解决方案: 删除边 重新创建 但这并不好。 Edge 没有任何属性。 示例: create edge is_friend from #12
这是我现在使用的查询: INSERT INTO details SET name = "INITIALIZE",actionMap ={"1":12:1,"2":12:2}; 这里 12:1,12:2
考虑我们有 Vertex User 和 Edge FriendsWith。FriendsWith 可以在两个方向上进出(通常是在 2 个用户之间或在 2 个用户之间)。 重复是指从一个用户到另一个用户
是否可以删除 OrientDB 文档中嵌入列表中的一项?我有一个“个人数据”文档,其中包含“查询”列表。例如 { name: "Marco", inquiries: [{date: 2014-11-2
我想查询具有特定属性的文档。 我尝试了以下方法: select * from Foo where not bar is null 但这会返回我的文档,即使它们没有该属性。即使它可以工作,但如果存在以
我的问题是,我如何查询“聊天”表以检索个人资料表中的人员详细信息。 ParticipatinIn edge 从 Person 开始聊天。HasProfile Edge 开始了个人资料。 请帮我解决这个
我想查询具有特定属性的文档。 我尝试了以下方法: select * from Foo where not bar is null 但这会返回我的文档,即使它们没有该属性。即使它可以工作,但如果存在以
是否有可能得到一个例子来在 orientdb 中插入一条边。如果它不存在,有没有办法检查边是否存在,如果存在则只更新边,否则创建新边。我使用的是 Orientdb 2.1.13 版本。谢谢 最佳答案
我试图让 OrientDB Studio 显示一个字符串作为每个节点的标签,就像 Susheel Kumar 的这个截图一样 但是,当我运行 Susheel 的代码(为后代发布在下面)时,节点全部显示
我有一个相当复杂的查询 SELECT FROM ( SELECT EXPAND(INV()) FROM ( SELECT FROM ( SELECT EXPAND(OUTE('
我猜这是一个令人尴尬的初学者问题,无论如何... 在“服务器安全”下的 OrientDB 文档中,我们发现: While OrientDB Server can function as a regul
我有一个 CSV 文件,有 Id1 和 Id2。 Id1 和 Id2 是两个不同类的顶点。我想在 Id1 和 Id2 之间取得优势。这可以通过ETL实现吗? 我们可以在变压器的边缘配置中添加一些东西来
我正在研究 OrientDB 进行学术研究。我们应该关注的一个重要部分是 ACID 范式。 OrienDB 手册说: OrientDB is an ACID compliant DBMS. 它还说:
我正在使用 OrientDB 2.1.9 并创建了名为“TimespentEvents”的 plocal 图数据库。 当尝试在同一台机器上使用 JDBC 驱动程序从 Java 连接 URL 'jdbc
我想在 OrientDB 中使用蓝图和管道。 方法是什么?还有 TinkerPop3 或 TinkerPop2?哪个更适合我的学习体验? 最佳答案 OrientDB 的最新版本在本地实现了 Bluep
我一直在尝试使用 OrientDB 提供的“工作室”将 gremlin 与 OrientDB (V 3.0.30) 一起使用,但每次我尝试运行 gremlin 查询,例如 g.V我收到错误:com.o
昨天我们的 nexus 存储库实例由于磁盘已满事件而横盘整理。释放一些空间并尝试重新启动后,nexus 不再可用。结果,数据库损坏(大概)并且无法连接。当我运行 nexus-orient-consol
我正在使用带有 OrientDb Studio 2.2.8 的车辆历史数据库,并且我想要投影 automobile 类由 起亚。 数据库的架构如下所示: (汽车)--isModel-->(型号)--i
我是一名优秀的程序员,十分优秀!