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

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

本文整理了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

public boolean isSelect(){
  return ! (isConstruct() || isUpdate() || isDelete());
}

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

/**
 * query is the global Query ast is the current update action use case:
 * delete insert data delete insert where In case of data, fake an empty
 * where and process as a where update.
 */
Mappings update(Query query, ASTQuery ast, Mapping m) {
  //System.out.println("** QP:\n" + m.getBind());
  exec.logStart(query);
  Query q = exec.compile(ast, ds);
  Mapping mm = m;
  if (m != null && m.size() == 0 && m.getBind() != null) {
    // m contains LDScript binding stack
    // generate appropriate Mapping for query q from this stack.
    mm = Mapping.create(q, m.getBind());
  }
  Mappings map = exec.query(q, mm);
  //Mappings map = exec.basicQuery(ast, null, ds);
  //Query q = map.getQuery();
  // PRAGMA: update can be both delete & insert
  if (q.isDelete()) {
    manager.delete(q, map, ds);
  }
  if (q.isConstruct()) {
    // insert
    manager.insert(q, map, ds);
  }
  exec.logFinish(query, map);
  return map;
}

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

/**
 * query is the global Query ast is the current update action use case:
 * delete insert data delete insert where In case of data, fake an empty
 * where and process as a where update.
 */
Mappings update(Query query, ASTQuery ast, Mapping m) {
  //System.out.println("** QP:\n" + m.getBind());
  exec.logStart(query);
  Query q = exec.compile(ast, ds);
  Mapping mm = m;
  if (m != null && m.size() == 0 && m.getBind() != null) {
    // m contains LDScript binding stack
    // generate appropriate Mapping for query q from this stack.
    mm = Mapping.create(q, m.getBind());
  }
  Mappings map = exec.query(q, mm);
  //Mappings map = exec.basicQuery(ast, null, ds);
  //Query q = map.getQuery();
  // PRAGMA: update can be both delete & insert
  if (q.isDelete()) {
    manager.delete(q, map, ds);
  }
  if (q.isConstruct()) {
    // insert
    manager.insert(q, map, ds);
  }
  exec.logFinish(query, map);
  return map;
}

相关文章