java.lang.Object
com.apple.foundationdb.relational.server.FRL
All Implemented Interfaces:
AutoCloseable

@API(EXPERIMENTAL) public class FRL extends Object implements 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
    Modifier and Type
    Class
    Description
    static final class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FRL()
     
    FRL(com.apple.foundationdb.relational.api.Options options)
     
    FRL(com.apple.foundationdb.relational.api.Options options, String clusterFile)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    execute(String database, String schema, String sql, List<com.apple.foundationdb.relational.jdbc.grpc.v1.Parameter> parameters, com.apple.foundationdb.relational.api.Options options)
    Execute sql.
    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
    update(String database, String schema, String sql)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
      Execute sql.
      Parameters:
      database - Database to run the sql against.
      schema - Schema to use on database
      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

      public int update(String database, String schema, String sql) throws SQLException
      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 interface AutoCloseable
      Throws:
      SQLException
      com.apple.foundationdb.relational.api.exceptions.RelationalException