public ServiceMetaData deepCopy() { return new ServiceMetaData(this); }
public Object getFieldValue(_Fields field) { switch (field) { case PRODUCT_NAME: return getProductName(); return getProductVersion(); return getProductMajorVersion(); return getProductMinorVersion(); return getJdbcMajorVersion(); return getJdbcMinorVersion(); return getIdentifierQuote(); return getSqlKeywords(); return getNumericFunctions(); return getStringFunctions(); return getSystemFunctions(); return getDateTimeFunctions(); return getSearchStringEscape(); return getExtraNameCharacters();
EmbedDatabaseMetaData dmd = (EmbedDatabaseMetaData)connHolder .getConnection().getMetaData(); ServiceMetaData metadata = new ServiceMetaData() .setCatalogSeparator(dmd.getCatalogSeparator()) .setCatalogTerm(dmd.getCatalogTerm()) .setDateTimeFunctions(toList(dmd.getTimeDateFunctions())) .setDefaultResultSetHoldabilityHoldCursorsOverCommit(dmd .getResultSetHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT) .setDefaultResultSetType( snappydataConstants.RESULTSET_TYPE_FORWARD_ONLY) .setDefaultTransactionIsolation( snappydataConstants.DEFAULT_TRANSACTION_ISOLATION) .setExtraNameCharacters(dmd.getExtraNameCharacters()) .setCatalogAtStart(dmd.isCatalogAtStart()) .setIdentifierQuote(dmd.getIdentifierQuoteString()) .setJdbcMajorVersion(dmd.getJDBCMajorVersion()) .setJdbcMinorVersion(dmd.getJDBCMinorVersion()) .setMaxBinaryLiteralLength(dmd.getMaxBinaryLiteralLength()) .setMaxCatalogNameLength(dmd.getMaxCatalogNameLength()) .setMaxCharLiteralLength(dmd.getMaxCharLiteralLength()) .setMaxColumnNameLength(dmd.getMaxColumnNameLength()) .setMaxColumnsInGroupBy(dmd.getMaxColumnsInGroupBy()) .setMaxColumnsInIndex(dmd.getMaxColumnsInIndex()) .setMaxColumnsInOrderBy(dmd.getMaxColumnsInOrderBy()) .setMaxColumnsInSelect(dmd.getMaxColumnsInSelect()) .setMaxColumnsInTable(dmd.getMaxColumnsInTable()) .setMaxConnections(dmd.getMaxConnections()) .setMaxCursorNameLength(dmd.getMaxCursorNameLength()) .setMaxIndexLength(dmd.getMaxIndexLength())
/** * {@inheritDoc} */ @Override public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes; switch (concurrency) { case ResultSet.CONCUR_READ_ONLY: supportedRSTypes = this.serviceMetaData.getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_CONCURRENCY_READ_ONLY); break; case ResultSet.CONCUR_UPDATABLE: supportedRSTypes = this.serviceMetaData.getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_CONCURRENCY_UPDATABLE); break; default: return false; } return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public String getIdentifierQuoteString() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return this.serviceMetaData.getIdentifierQuote(); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public int getJDBCMajorVersion() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return this.serviceMetaData.getJdbcMajorVersion(); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public String getCatalogSeparator() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return this.serviceMetaData.getCatalogSeparator(); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public String getExtraNameCharacters() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return this.serviceMetaData.getExtraNameCharacters(); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public int getJDBCMinorVersion() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return this.serviceMetaData.getJdbcMinorVersion(); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public String getCatalogTerm() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return this.serviceMetaData.getCatalogTerm(); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public String getTimeDateFunctions() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return SharedUtils.toCSV(this.serviceMetaData.getDateTimeFunctions()); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public int getDefaultTransactionIsolation() throws SQLException { this.conn.lock(); try { initServiceMetaData(); return Converters.getJdbcIsolation(this.serviceMetaData .getDefaultTransactionIsolation()); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean ownDeletesAreVisible(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_OWN_DELETES_VISIBLE); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean othersInsertsAreVisible(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_OTHERS_INSERTS_VISIBLE); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean deletesAreDetected(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_DELETES_DETECTED); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean ownUpdatesAreVisible(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_OWN_UPDATES_VISIBLE); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean updatesAreDetected(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_UPDATES_DETECTED); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean ownInsertsAreVisible(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_OWN_INSERTS_VISIBLE); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean othersUpdatesAreVisible(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_OTHERS_UPDATES_VISIBLE); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }
/** * {@inheritDoc} */ @Override public boolean othersDeletesAreVisible(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_OTHERS_DELETES_VISIBLE); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } finally { this.conn.unlock(); } }