空手道支持neo4j数据库吗?

rmbxnbpk  于 2021-07-26  发布在  Java
关注(0)|答案(1)|浏览(355)

想知道空手道是否支持neo4j数据库吗?。如果是,希望有一个前。功能,这将是有益的。

w80xi6nr

w80xi6nr1#

空手道支持任何java代码,这样你就可以做任何你想做的事情。
请看这个jdbc示例,它将帮助您开始: dogs.feature . 你将需要写一点java代码(只写一次),所以如果你没有这个技能,请找人帮忙。

  1. # use jdbc to validate
  2. * def config = { username: 'sa', password: '', url: 'jdbc:h2:mem:testdb', driverClassName: 'org.h2.Driver' }
  3. * def DbUtils = Java.type('com.intuit.karate.demo.util.DbUtils')
  4. * def db = new DbUtils(config)
  5. # since the DbUtils returns a Java Map, it becomes normal JSON here !
  6. # which means that you can use the full power of Karate's 'match' syntax
  7. * def dogs = db.readRows('SELECT * FROM DOGS')
  8. * match dogs contains { ID: '#(id)', NAME: 'Scooby' }

相关问题