protected AvaticaStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability, Meta.Signature signature) { this.connection = Objects.requireNonNull(connection); this.resultSetType = resultSetType; this.resultSetConcurrency = resultSetConcurrency; this.resultSetHoldability = resultSetHoldability; this.signature = signature; this.closed = false; if (h == null) { final Meta.ConnectionHandle ch = connection.handle; h = connection.meta.createStatement(ch); } connection.statementMap.put(h.id, this); this.handle = h; }
protected void resetStatement() { // Invalidate the old statement connection.statementMap.remove(handle.id); // Get a new one final Meta.ConnectionHandle ch = new Meta.ConnectionHandle(connection.id); Meta.StatementHandle h = connection.meta.createStatement(ch); // Cache it in the connection connection.statementMap.put(h.id, this); // Update the local state and try again this.handle = h; }
protected void resetStatement() { // Invalidate the old statement connection.statementMap.remove(handle.id); connection.flagMap.remove(handle.id); // Get a new one final Meta.ConnectionHandle ch = new Meta.ConnectionHandle(connection.id); Meta.StatementHandle h = connection.meta.createStatement(ch); // Cache it in the connection connection.statementMap.put(h.id, this); // Update the local state and try again this.handle = h; }
protected void resetStatement() { // Invalidate the old statement connection.statementMap.remove(handle.id); connection.flagMap.remove(handle.id); // Get a new one final Meta.ConnectionHandle ch = new Meta.ConnectionHandle(connection.id); Meta.StatementHandle h = connection.meta.createStatement(ch); // Cache it in the connection connection.statementMap.put(h.id, this); // Update the local state and try again this.handle = h; }
protected AvaticaStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability, Meta.Signature signature) { this.connection = Objects.requireNonNull(connection); this.resultSetType = resultSetType; this.resultSetConcurrency = resultSetConcurrency; this.resultSetHoldability = resultSetHoldability; this.signature = signature; this.closed = false; if (h == null) { final Meta.ConnectionHandle ch = connection.handle; h = connection.meta.createStatement(ch); } connection.statementMap.put(h.id, this); this.handle = h; this.batchedSql = new ArrayList<>(); try { this.cancelFlag = connection.getCancelFlag(h); } catch (NoSuchStatementException e) { throw new AssertionError("no statement", e); } }
protected AvaticaStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability, Meta.Signature signature) { this.connection = Objects.requireNonNull(connection); this.resultSetType = resultSetType; this.resultSetConcurrency = resultSetConcurrency; this.resultSetHoldability = resultSetHoldability; this.signature = signature; this.closed = false; if (h == null) { final Meta.ConnectionHandle ch = connection.handle; h = connection.meta.createStatement(ch); } connection.statementMap.put(h.id, this); this.handle = h; this.batchedSql = new ArrayList<>(); try { this.cancelFlag = connection.getCancelFlag(h); } catch (NoSuchStatementException e) { throw new AssertionError("no statement", e); } }
public CreateStatementResponse apply(CreateStatementRequest request) { final Meta.ConnectionHandle ch = new Meta.ConnectionHandle(request.connectionId); final Meta.StatementHandle h = meta.createStatement(ch); return new CreateStatementResponse(h.connectionId, h.id, serverLevelRpcMetadata); }
public CreateStatementResponse apply(CreateStatementRequest request) { final Meta.ConnectionHandle ch = new Meta.ConnectionHandle(request.connectionId); final Meta.StatementHandle h = meta.createStatement(ch); return new CreateStatementResponse(h.connectionId, h.id, serverLevelRpcMetadata); }
public CreateStatementResponse apply(CreateStatementRequest request) { final Meta.ConnectionHandle ch = new Meta.ConnectionHandle(request.connectionId); final Meta.StatementHandle h = meta.createStatement(ch); return new CreateStatementResponse(h.connectionId, h.id, serverLevelRpcMetadata); }