Java Code Examples for java.sql.DatabaseMetaData#procedureNullable()
The following examples show how to use
java.sql.DatabaseMetaData#procedureNullable() .
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: JDBCUtils.java From netbeans with Apache License 2.0 | 5 votes |
public static Nullable getProcedureNullable(int dbmdProcedureNullable) { switch (dbmdProcedureNullable) { case DatabaseMetaData.procedureNoNulls: return Nullable.NOT_NULLABLE; case DatabaseMetaData.procedureNullable: return Nullable.NULLABLE; case DatabaseMetaData.procedureNullableUnknown: default: return Nullable.UNKNOWN; } }
Example 2
Source File: GetProcedureColumns.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public GetProcedureColumns(AliasInfo aliasInfo, String aliasType) throws SQLException { int functionParamCursor = -2; // compile time aliasInfo will be null. if (aliasInfo != null) { isProcedure = aliasType.equals("P"); isFunction = aliasType.equals("F"); procedure = (RoutineAliasInfo) aliasInfo; method_count = (short) procedure.getParameterCount(); rowCount = procedure.getParameterCount(); if ( procedure.isTableFunction() ) { tableFunctionReturnType = procedure.getReturnType(); returnedTableColumnCount = tableFunctionReturnType.getRowColumnNames().length; rowCount += returnedTableColumnCount; functionParamCursor = -1; } } if (aliasType == null) { nullable = 0; return; } if (isFunction) { nullable = (short) JDBC40Translation.FUNCTION_NULLABLE; sqlType = procedure.getReturnType(); columnName = ""; // COLUMN_NAME is VARCHAR NOT NULL columnType = (short) JDBC40Translation.FUNCTION_RETURN; paramCursor = functionParamCursor; return; } nullable = (short) DatabaseMetaData.procedureNullable; paramCursor = -1; }
Example 3
Source File: GetProcedureColumns.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
public GetProcedureColumns(AliasInfo aliasInfo, String aliasType) throws SQLException { int functionParamCursor = -2; // compile time aliasInfo will be null. if (aliasInfo != null) { isProcedure = aliasType.equals("P"); isFunction = aliasType.equals("F"); procedure = (RoutineAliasInfo) aliasInfo; method_count = (short) procedure.getParameterCount(); rowCount = procedure.getParameterCount(); if ( procedure.isTableFunction() ) { tableFunctionReturnType = procedure.getReturnType(); returnedTableColumnCount = tableFunctionReturnType.getRowColumnNames().length; rowCount += returnedTableColumnCount; functionParamCursor = -1; } } if (aliasType == null) { nullable = 0; return; } if (isFunction) { nullable = (short) JDBC40Translation.FUNCTION_NULLABLE; sqlType = procedure.getReturnType(); columnName = ""; // COLUMN_NAME is VARCHAR NOT NULL columnType = (short) JDBC40Translation.FUNCTION_RETURN; paramCursor = functionParamCursor; return; } nullable = (short) DatabaseMetaData.procedureNullable; paramCursor = -1; }
Example 4
Source File: GetProcedureColumns.java From spliceengine with GNU Affero General Public License v3.0 | 5 votes |
public GetProcedureColumns(AliasInfo aliasInfo, String aliasType) throws SQLException { int functionParamCursor = -2; // compile time aliasInfo will be null. if (aliasInfo != null) { isProcedure = aliasType.equals("P"); isFunction = aliasType.equals("F"); procedure = (RoutineAliasInfo) aliasInfo; method_count = (short) procedure.getParameterCount(); rowCount = procedure.getParameterCount(); if ( procedure.isTableFunction() ) { tableFunctionReturnType = procedure.getReturnType(); returnedTableColumnCount = tableFunctionReturnType.getRowColumnNames().length; rowCount += returnedTableColumnCount; functionParamCursor = -1; } } if (aliasType == null) { nullable = 0; return; } if (isFunction) { nullable = (short) JDBC40Translation.FUNCTION_NULLABLE; sqlType = procedure.getReturnType(); columnName = ""; // COLUMN_NAME is VARCHAR NOT NULL columnType = (short) JDBC40Translation.FUNCTION_RETURN; paramCursor = functionParamCursor; return; } nullable = (short) DatabaseMetaData.procedureNullable; paramCursor = -1; }