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

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

问题描述

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

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

推荐答案

空手道支持任何Java代码,这样您就可以间接地做任何您想做的事.

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

请查看此JDBC示例,它将使您入门:

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天全站免登陆