Java Code Examples for java.sql.DatabaseMetaData#procedureResultUnknown()

The following examples show how to use java.sql.DatabaseMetaData#procedureResultUnknown() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LangProcedureTest.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
static String TYPE(short type) {
    switch (type) {
    case DatabaseMetaData.procedureResultUnknown:
        return "procedureResultUnknown";
    case DatabaseMetaData.procedureNoResult:
        return "procedureNoResult";
    case DatabaseMetaData.procedureReturnsResult:
        return "procedureReturnsResult";
    default:
        return "??????";
    }

}
 
Example 2
Source File: LangProcedureTest.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
static String TYPE(short type) {
    switch (type) {
    case DatabaseMetaData.procedureResultUnknown:
        return "procedureResultUnknown";
    case DatabaseMetaData.procedureNoResult:
        return "procedureNoResult";
    case DatabaseMetaData.procedureReturnsResult:
        return "procedureReturnsResult";
    default:
        return "??????";
    }

}
 
Example 3
Source File: SchemaInfoUpdateCheck.java    From bigtable-sql with Apache License 2.0 5 votes vote down vote up
private ProcedureInfo[] createProcdureInfos(Matcher matcher, String sql, boolean isAlterOrDrop)
{
   int endIx = matcher.end(1);
   int len = matcher.group(1).length();
   String proc = sql.substring(endIx - len, endIx);
   String[] splits = proc.split("\\.");
   String simpleName = splits[splits.length - 1];
   simpleName = removeQuotes(simpleName);

   if(isAlterOrDrop)
   {
      String buf = _session.getSchemaInfo().getCaseSensitiveProcedureName(simpleName);
      if(null != buf)
      {
         simpleName = buf;
      }
      return new ProcedureInfo[]{new ProcedureInfo(null, null, simpleName, null, DatabaseMetaData.procedureResultUnknown, _dmd)};
   }
   else
   {
      // DB2 stores all names in upper case.
      // PostgreSQL stores all names in lower case.
      // That's why we may not find proc as it was written in the create statement.
      // So we try out the upper and lower case names too.
      return new ProcedureInfo[]
         {
            new ProcedureInfo(null, null, simpleName, null, DatabaseMetaData.procedureResultUnknown, _dmd),
            new ProcedureInfo(null, null, simpleName.toUpperCase(), null, DatabaseMetaData.procedureResultUnknown, _dmd),
            new ProcedureInfo(null, null, simpleName.toLowerCase(), null, DatabaseMetaData.procedureResultUnknown, _dmd)
         };
   }
}
 
Example 4
Source File: SchemaInfo.java    From bigtable-sql with Apache License 2.0 5 votes vote down vote up
/**
    * @param fireSchemaInfoUpdate Should only be false when the caller makes sure fireSchemaInfoUpdate() is called later.
    */
   void refreshCacheForSimpleProcedureName(String simpleProcName, boolean fireSchemaInfoUpdate)
   {
      HashMap<String, String> caseSensitiveProcNames = new HashMap<String, String>();

      CaseInsensitiveString caseInsensitiveProcName = new CaseInsensitiveString(simpleProcName);
      String caseSensitiveProcName = _schemaInfoCache.getProcedureNamesForReadOnly().remove(caseInsensitiveProcName);

      caseSensitiveProcNames.put(caseSensitiveProcName, caseSensitiveProcName);

      ////////////////////////////////////////////////////////////////////////
      // Reload  all matching procedure types
      for(Iterator<String> i=caseSensitiveProcNames.keySet().iterator(); i.hasNext();)
      {
         String buf = i.next();
         ProcedureInfo pi = new ProcedureInfo(null, null, buf, null, DatabaseMetaData.procedureResultUnknown, _dmd);
         reload(pi, fireSchemaInfoUpdate);
      }
      //
      ////////////////////////////////////////////////////////////////////////

// is done in reload       
//      if(fireSchemaInfoUpdate)
//      {
//         fireSchemaInfoUpdate();
//      }
   }
 
Example 5
Source File: LangProcedureTest.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
static String TYPE(short type) {
    switch (type) {
    case DatabaseMetaData.procedureResultUnknown:
        return "procedureResultUnknown";
    case DatabaseMetaData.procedureNoResult:
        return "procedureNoResult";
    case DatabaseMetaData.procedureReturnsResult:
        return "procedureReturnsResult";
    default:
        return "??????";
    }

}