fr.inria.corese.kgram.core.Query.isDelete()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(182)

本文整理了Java中fr.inria.corese.kgram.core.Query.isDelete方法的一些代码示例,展示了Query.isDelete的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.isDelete方法的具体详情如下:
包路径:fr.inria.corese.kgram.core.Query
类名称:Query
方法名:isDelete

Query.isDelete介绍

暂无

代码示例

代码示例来源:origin: fr.inria.corese/kgram

  1. public boolean isSelect(){
  2. return ! (isConstruct() || isUpdate() || isDelete());
  3. }

代码示例来源:origin: fr.inria.corese/corese-core

  1. /**
  2. * query is the global Query ast is the current update action use case:
  3. * delete insert data delete insert where In case of data, fake an empty
  4. * where and process as a where update.
  5. */
  6. Mappings update(Query query, ASTQuery ast, Mapping m) {
  7. //System.out.println("** QP:\n" + m.getBind());
  8. exec.logStart(query);
  9. Query q = exec.compile(ast, ds);
  10. Mapping mm = m;
  11. if (m != null && m.size() == 0 && m.getBind() != null) {
  12. // m contains LDScript binding stack
  13. // generate appropriate Mapping for query q from this stack.
  14. mm = Mapping.create(q, m.getBind());
  15. }
  16. Mappings map = exec.query(q, mm);
  17. //Mappings map = exec.basicQuery(ast, null, ds);
  18. //Query q = map.getQuery();
  19. // PRAGMA: update can be both delete & insert
  20. if (q.isDelete()) {
  21. manager.delete(q, map, ds);
  22. }
  23. if (q.isConstruct()) {
  24. // insert
  25. manager.insert(q, map, ds);
  26. }
  27. exec.logFinish(query, map);
  28. return map;
  29. }

代码示例来源:origin: Wimmics/corese

  1. /**
  2. * query is the global Query ast is the current update action use case:
  3. * delete insert data delete insert where In case of data, fake an empty
  4. * where and process as a where update.
  5. */
  6. Mappings update(Query query, ASTQuery ast, Mapping m) {
  7. //System.out.println("** QP:\n" + m.getBind());
  8. exec.logStart(query);
  9. Query q = exec.compile(ast, ds);
  10. Mapping mm = m;
  11. if (m != null && m.size() == 0 && m.getBind() != null) {
  12. // m contains LDScript binding stack
  13. // generate appropriate Mapping for query q from this stack.
  14. mm = Mapping.create(q, m.getBind());
  15. }
  16. Mappings map = exec.query(q, mm);
  17. //Mappings map = exec.basicQuery(ast, null, ds);
  18. //Query q = map.getQuery();
  19. // PRAGMA: update can be both delete & insert
  20. if (q.isDelete()) {
  21. manager.delete(q, map, ds);
  22. }
  23. if (q.isConstruct()) {
  24. // insert
  25. manager.insert(q, map, ds);
  26. }
  27. exec.logFinish(query, map);
  28. return map;
  29. }

相关文章