org.teiid.metadata.Procedure.getUpdateCount()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(119)

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

Procedure.getUpdateCount介绍

暂无

代码示例

代码示例来源:origin: org.teiid/teiid-olingo

private static boolean isFuntion(Procedure proc) {
  if (doesProcedureReturn(proc) && proc.getUpdateCount() < 1
      && !isInputParameterLob(proc)) {
    return true;
  }
  return false;
}

代码示例来源:origin: teiid/teiid

private String buildProcedureOptions(Procedure procedure) {
  StringBuilder options = new StringBuilder();
  addCommonOptions(options, procedure);
  
  if (procedure.getUpdateCount() != Procedure.AUTO_UPDATECOUNT) {
    addOption(options, UPDATECOUNT, procedure.getUpdateCount());
  }    
  
  if (!procedure.getProperties().isEmpty()) {
    for (String key:procedure.getProperties().keySet()) {
      addOption(options, key, procedure.getProperty(key, false));
    }
  }        
  
  return options.toString();
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

private String buildProcedureOptions(Procedure procedure) {
  StringBuilder options = new StringBuilder();
  addCommonOptions(options, procedure);
  
  if (procedure.getUpdateCount() != Procedure.AUTO_UPDATECOUNT) {
    addOption(options, UPDATECOUNT, procedure.getUpdateCount());
  }    
  
  if (!procedure.getProperties().isEmpty()) {
    for (String key:procedure.getProperties().keySet()) {
      addOption(options, key, procedure.getProperty(key, false));
    }
  }        
  
  return options.toString();
}

代码示例来源:origin: org.teiid/teiid-engine

private String buildProcedureOptions(Procedure procedure) {
  StringBuilder options = new StringBuilder();
  addCommonOptions(options, procedure);
  
  if (procedure.getUpdateCount() != Procedure.AUTO_UPDATECOUNT) {
    addOption(options, UPDATECOUNT, procedure.getUpdateCount());
  }    
  
  if (!procedure.getProperties().isEmpty()) {
    for (String key:procedure.getProperties().keySet()) {
      addOption(options, key, procedure.getProperty(key, false));
    }
  }        
  
  return options.toString();
}

代码示例来源:origin: org.teiid/teiid-olingo

private static void addOperationAnnotations(Procedure proc,
    CsdlOperation operation, CsdlSchema csdlSchema) {
  if (proc.getAnnotation() != null) {
    addStringAnnotation(operation, "Core.Description", proc.getAnnotation());
  }
  
  if (proc.getNameInSource() != null) {
    addStringAnnotation(operation, "teiid.NAMEINSOURCE", proc.getNameInSource());
  }
  if (proc.getUpdateCount() != Procedure.AUTO_UPDATECOUNT) {
    addIntAnnotation(operation, "teiid.UPDATECOUNT", proc.getUpdateCount());
  }   
  // add all custom properties
  for (String str:proc.getProperties().keySet()) {
    addTerm(normalizeTermName(str), new String[] {"Action", "Function"}, csdlSchema);
    addStringAnnotation(operation, csdlSchema.getAlias()+"."+normalizeTermName(str), proc.getProperties().get(str));
  }         
}

代码示例来源:origin: teiid/teiid

@Test
public void testAlterProcedureOptions() throws Exception {
  String ddl = "CREATE FOREIGN PROCEDURE myProc(OUT p1 boolean, p2 varchar, INOUT p3 decimal) " +
      "RETURNS (r1 varchar, r2 decimal)" +
      "OPTIONS(RANDOM 'any', UUID 'uuid', NAMEINSOURCE 'nis', ANNOTATION 'desc', UPDATECOUNT '2');" +
      "ALTER FOREIGN PROCEDURE myProc OPTIONS(SET NAMEINSOURCE 'x');" +
      "ALTER FOREIGN PROCEDURE myProc ALTER PARAMETER p2 OPTIONS (ADD x 'y');" +
      "ALTER FOREIGN PROCEDURE myProc OPTIONS(DROP UPDATECOUNT);";
  
  Schema s = helpParse(ddl, "model").getSchema();
  Procedure proc = s.getProcedure("myProc");
  assertNotNull(proc);

  assertEquals("x", proc.getNameInSource());
  assertEquals("p2", proc.getParameters().get(1).getName());
  assertEquals("y", proc.getParameters().get(1).getProperty("x", false));
  assertEquals(1, proc.getUpdateCount());
}

代码示例来源:origin: teiid/teiid

procInfo.setUpdateCount(procRecord.getUpdateCount());
results.add(procInfo);

代码示例来源:origin: org.jboss.teiid/teiid-engine

procInfo.setUpdateCount(procRecord.getUpdateCount());
results.add(procInfo);

代码示例来源:origin: org.teiid/teiid-engine

procInfo.setUpdateCount(procRecord.getUpdateCount());
results.add(procInfo);

代码示例来源:origin: teiid/teiid

assertEquals("nis", proc.getNameInSource());
assertEquals("desc", proc.getAnnotation());
assertEquals(2, proc.getUpdateCount());
assertEquals("any", proc.getProperties().get("RANDOM"));

代码示例来源:origin: teiid/teiid

assertEquals("nis", proc.getNameInSource());
assertEquals("desc", proc.getAnnotation());
assertEquals(2, proc.getUpdateCount());
assertEquals("any", proc.getProperties().get("RANDOM"));

相关文章