空手道是否支持 Neo4j 数据库? [英] Does Karate supports Neo4j Database?

查看:24
本文介绍了空手道是否支持 Neo4j 数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道Karate 是否支持 Neo4j 数据库?.如果是,想有一个前任.功能会有所帮助.

Want to know if Karate supports Neo4j database?. If yes, would like to have an ex. feature which will be helpful.

推荐答案

Karate 支持任何 Java 代码 这样你就可以间接地做任何你想做的事情.

Karate supports any Java code so that way indirectly you should be able to do anything you want.

请看这个 JDBC 示例,它将帮助您入门:dogs.feature.您将需要编写一点 Java 代码(仅限一次),因此如果您没有这方面的技能,请寻求帮助.

Please look at this JDBC example which will get you started: dogs.feature. You will need to write a little bit of Java code (one time only) so if you don't have that skill, please ask someone to help.

# use jdbc to validate
* def config = { username: 'sa', password: '', url: 'jdbc:h2:mem:testdb', driverClassName: 'org.h2.Driver' }
* def DbUtils = Java.type('com.intuit.karate.demo.util.DbUtils')
* def db = new DbUtils(config)

# since the DbUtils returns a Java Map, it becomes normal JSON here !
# which means that you can use the full power of Karate's 'match' syntax
* def dogs = db.readRows('SELECT * FROM DOGS')
* match dogs contains { ID: '#(id)', NAME: 'Scooby' }

这篇关于空手道是否支持 Neo4j 数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆