Class FRL
java.lang.Object
com.apple.foundationdb.relational.server.FRL
- All Implemented Interfaces:
AutoCloseable
Temporary class. "The Relational Database".
Facade over RelationalDatabase. Mostly copied from cli DbState but cut-down.
TODO: Remove having to go via embedded JDBC.... It is unnecessary overhead.
TODO: What can be shared in here? I want to do concurrent query handling. What is unsafe?
TODO: How does
RelationalDatabase
relate?
TODO: Let this be front door to the relational DB used by Server? Hide the driver
and connection stuff behind here?-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
execute
(String database, String schema, String sql, List<com.apple.foundationdb.relational.jdbc.grpc.v1.Parameter> parameters, com.apple.foundationdb.relational.api.Options options) Executesql
.com.apple.foundationdb.relational.api.RelationalResultSet
get
(String database, String schema, String tableName, com.apple.foundationdb.relational.api.KeySet keySet) int
insert
(String database, String schema, String tableName, List<com.apple.foundationdb.relational.api.RelationalStruct> data) com.apple.foundationdb.relational.api.RelationalResultSet
scan
(String database, String schema, String tableName, com.apple.foundationdb.relational.api.KeySet keySet) int
-
Constructor Details
-
FRL
public FRL() throws com.apple.foundationdb.relational.api.exceptions.RelationalException- Throws:
com.apple.foundationdb.relational.api.exceptions.RelationalException
-
FRL
public FRL(@Nonnull com.apple.foundationdb.relational.api.Options options) throws com.apple.foundationdb.relational.api.exceptions.RelationalException - Throws:
com.apple.foundationdb.relational.api.exceptions.RelationalException
-
FRL
public FRL(@Nonnull com.apple.foundationdb.relational.api.Options options, @Nullable String clusterFile) throws com.apple.foundationdb.relational.api.exceptions.RelationalException - Throws:
com.apple.foundationdb.relational.api.exceptions.RelationalException
-
-
Method Details
-
execute
@Nonnull public FRL.Response execute(String database, String schema, String sql, List<com.apple.foundationdb.relational.jdbc.grpc.v1.Parameter> parameters, com.apple.foundationdb.relational.api.Options options) throws SQLException Executesql
.- Parameters:
database
- Database to run thesql
against.schema
- Schema to use ondatabase
sql
- SQL to execute.parameters
- If non-null, then these are parameters and 'sql' is text of a prepared statement.- Returns:
- Returns A Response with either a ResultSet or a Row count, depending on the type of query issued
- Throws:
SQLException
- For all sorts of reasons.
-
update
- Throws:
SQLException
-
insert
public int insert(String database, String schema, String tableName, List<com.apple.foundationdb.relational.api.RelationalStruct> data) throws SQLException - Throws:
SQLException
-
get
public com.apple.foundationdb.relational.api.RelationalResultSet get(String database, String schema, String tableName, com.apple.foundationdb.relational.api.KeySet keySet) throws SQLException - Throws:
SQLException
-
scan
public com.apple.foundationdb.relational.api.RelationalResultSet scan(String database, String schema, String tableName, com.apple.foundationdb.relational.api.KeySet keySet) throws SQLException - Throws:
SQLException
-
close
public void close() throws SQLException, com.apple.foundationdb.relational.api.exceptions.RelationalException- Specified by:
close
in interfaceAutoCloseable
- Throws:
SQLException
com.apple.foundationdb.relational.api.exceptions.RelationalException
-