/** * {@inheritDoc} */ @Override public boolean supportsResultSetType(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_TYPE); 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 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 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(); } }
/** * {@inheritDoc} */ @Override public boolean insertsAreDetected(int type) throws SQLException { this.conn.lock(); try { initServiceMetaData(); List<Integer> supportedRSTypes = this.serviceMetaData .getFeaturesWithParams().get( ServiceFeatureParameterized.RESULTSET_INSERTS_DETECTED); return supportedRSTypes != null && supportedRSTypes.contains(Converters.getThriftResultSetType(type)); } 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 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(); } }
ClientStatement(ClientConnection conn, int rsType, int rsConcurrency, int rsHoldability) { this(conn, conn.getHoldability()); byte attrsRsType = (byte)Converters.getThriftResultSetType(rsType); if (attrsRsType != snappydataConstants.DEFAULT_RESULTSET_TYPE) { this.attrs.setResultSetType(attrsRsType); } if (rsConcurrency == ResultSet.CONCUR_UPDATABLE) { this.attrs.setUpdatable(true); } if (rsHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) { this.attrs.setHoldCursorsOverCommit(true); } else if (rsHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) { this.attrs.setHoldCursorsOverCommit(false); } this.isClosed = false; }
for (int rsType : rsTypes) { if (dmd.supportsResultSetType(rsType)) { supportedValues.add(Converters.getThriftResultSetType(rsType)); for (int rsType : rsTypes) { if (dmd.supportsResultSetConcurrency(rsType, concurType)) { supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType)); supportedValues.add(Converters.getThriftResultSetType(rsType));