16 package com.omnisci.jdbc;
18 import com.omnisci.thrift.server.TDatumType;
19 import com.omnisci.thrift.server.TQueryResult;
21 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory;
24 import java.sql.DatabaseMetaData;
25 import java.sql.ResultSetMetaData;
26 import java.sql.SQLException;
33 final static Logger
logger = LoggerFactory.getLogger(OmniSciResultSetMetaData.class);
44 return sqlResult.row_set.row_desc.size();
75 return sqlResult.row_set.row_desc.get(column - 1).col_type.nullable
76 ? DatabaseMetaData.columnNullable
77 : DatabaseMetaData.columnNoNulls;
97 return sqlResult.row_set.row_desc.get(column - 1).col_name;
102 throws SQLException {
103 return sqlResult.row_set.row_desc.get(column - 1).getCol_name();
108 throws SQLException {
114 throws SQLException {
115 return sqlResult.row_set.row_desc.get(column - 1).col_type.precision;
119 public int getScale(
int column)
throws SQLException {
120 return sqlResult.row_set.row_desc.get(column - 1).col_type.scale;
125 throws SQLException {
126 return "tableName??";
131 throws SQLException {
137 throws SQLException {
138 TDatumType
type = sqlResult.row_set.row_desc.get(column - 1).col_type.type;
145 throws SQLException {
146 return sqlResult.row_set.row_desc.get(column - 1).col_type.type.name();
151 throws SQLException {
157 throws SQLException {
163 throws SQLException {
169 throws SQLException {
170 throw new UnsupportedOperationException(
"Not supported yet,"
171 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
172 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
173 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
178 throws SQLException {
179 throw new UnsupportedOperationException(
"Not supported yet,"
180 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
181 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
182 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
187 throws SQLException {
188 throw new UnsupportedOperationException(
"Not supported yet,"
189 +
" line:" +
new Throwable().getStackTrace()[0].getLineNumber()
190 +
" class:" +
new Throwable().getStackTrace()[0].getClassName()
191 +
" method:" +
new Throwable().getStackTrace()[0].getMethodName());
static int toJava(TDatumType type)