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

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

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

Procedure.isFunction介绍

暂无

代码示例

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

public Type getType() {
  if (isFunction()) {
    if (isVirtual()) {
      return Type.UDF;
    }
    return Type.Function;
  }
  if (isVirtual()) {
    return Type.StoredQuery;
  }
  return Type.StoredProc;
}

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

static FunctionMethod replaceProcedureWithFunction(MetadataFactory factory,
    Procedure proc) throws MetadataException {
  if (proc.isFunction() && proc.getQueryPlan() != null) {
    return null;
  }
  FunctionMethod method = createFunctionMethod(proc);
  //remove the old proc
  factory.getSchema().getResolvingOrder().remove(factory.getSchema().getResolvingOrder().size() - 1);
  factory.getSchema().getProcedures().remove(proc.getName());
  
  factory.getSchema().addFunction(method);
  return method;
}

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

static FunctionMethod replaceProcedureWithFunction(MetadataFactory factory,
    Procedure proc) throws MetadataException {
  if (proc.isFunction() && proc.getQueryPlan() != null) {
    return null;
  }
  FunctionMethod method = createFunctionMethod(proc);
  //remove the old proc
  factory.getSchema().getResolvingOrder().remove(factory.getSchema().getResolvingOrder().size() - 1);
  factory.getSchema().getProcedures().remove(proc.getName());
  
  factory.getSchema().addFunction(method);
  return method;
}

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

static FunctionMethod replaceProcedureWithFunction(MetadataFactory factory,
    Procedure proc) throws MetadataException {
  if (proc.isFunction() && proc.getQueryPlan() != null) {
    return null;
  }
  FunctionMethod method = createFunctionMethod(proc);
  //remove the old proc
  factory.getSchema().getResolvingOrder().remove(factory.getSchema().getResolvingOrder().size() - 1);
  factory.getSchema().getProcedures().remove(proc.getName());
  
  factory.getSchema().addFunction(method);
  return method;
}

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

public static FunctionTree getFunctionProcedures(Schema schema) {
  UDFSource dummySource = new UDFSource(Collections.EMPTY_LIST);
  FunctionTree ft = null;
  for (Procedure p : schema.getProcedures().values()) {
    if (p.isFunction() && p.getQueryPlan() != null) {
      if (ft == null) {
        ft = new FunctionTree(schema.getName(), dummySource, false);
      }
      FunctionMethod fm = SQLParserUtil.createFunctionMethod(p);
      FunctionDescriptor fd = ft.addFunction(schema.getName(), dummySource, fm, false);
      fd.setProcedure(p);
    }
  }
  return ft;
}

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

public static FunctionTree getFunctionProcedures(Schema schema) {
  UDFSource dummySource = new UDFSource(Collections.EMPTY_LIST);
  FunctionTree ft = null;
  for (Procedure p : schema.getProcedures().values()) {
    if (p.isFunction() && p.getQueryPlan() != null) {
      if (ft == null) {
        ft = new FunctionTree(schema.getName(), dummySource, false);
      }
      FunctionMethod fm = SQLParserUtil.createFunctionMethod(p);
      FunctionDescriptor fd = ft.addFunction(schema.getName(), dummySource, fm, false);
      fd.setProcedure(p);
    }
  }
  return ft;
}

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

public static FunctionTree getFunctionProcedures(Schema schema) {
  UDFSource dummySource = new UDFSource(Collections.EMPTY_LIST);
  FunctionTree ft = null;
  for (Procedure p : schema.getProcedures().values()) {
    if (p.isFunction() && p.getQueryPlan() != null) {
      if (ft == null) {
        ft = new FunctionTree(schema.getName(), dummySource, false);
      }
      FunctionMethod fm = SQLParserUtil.createFunctionMethod(p);
      FunctionDescriptor fd = ft.addFunction(schema.getName(), dummySource, fm, false);
      fd.setProcedure(p);
    }
  }
  return ft;
}

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

records.addAll(p.getResultSet().getColumns());
if (p.isVirtual() && !p.isFunction()) {
  String proc = this.getProcedureDefinition(vdbName, vdbVersion, p);
  if (proc != null) {

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

} else if (p.isFunction() && param.getType() != ProcedureParameter.Type.In) {
    metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31165, p.getFullName(), param.getFullName()));
  metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31077, p.getFullName(), model.getName()));
if (p.isFunction()) {
  if (!hasReturn) {
    metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31166, p.getFullName()));

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

} else if (p.isFunction() && param.getType() != ProcedureParameter.Type.In) {
    metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31165, p.getFullName(), param.getFullName()));
  metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31077, p.getFullName(), model.getName()));
if (p.isFunction()) {
  if (!hasReturn) {
    metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31166, p.getFullName()));

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

} else if (p.isFunction() && param.getType() != ProcedureParameter.Type.In) {
    metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31165, p.getFullName(), param.getFullName()));
  metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31077, p.getFullName(), model.getName()));
if (p.isFunction()) {
  if (!hasReturn) {
    metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31166, p.getFullName()));

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

if (procedureRecord.isFunction()) {
  FunctionParameter outputParam = null;
  List<FunctionParameter> args = new ArrayList<FunctionParameter>(procedureRecord.getParameters().size() - 1);

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

if (procedureRecord.isFunction()) {
  FunctionParameter outputParam = null;
  List<FunctionParameter> args = new ArrayList<FunctionParameter>(procedureRecord.getParameters().size() - 1);

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

assertFalse(proc.isFunction());

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

assertFalse(proc.isFunction());

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

append(FOREIGN);
append(SPACE).append(procedure.isFunction()?FUNCTION:PROCEDURE).append(SPACE).append(SQLStringVisitor.escapeSinglePart(procedure.getName()));
append(LPAREN);

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

append(FOREIGN);
append(SPACE).append(procedure.isFunction()?FUNCTION:PROCEDURE).append(SPACE).append(SQLStringVisitor.escapeSinglePart(procedure.getName()));
append(LPAREN);

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

append(FOREIGN);
append(SPACE).append(procedure.isFunction()?FUNCTION:PROCEDURE).append(SPACE).append(SQLStringVisitor.escapeSinglePart(procedure.getName()));
append(LPAREN);

相关文章