orion-bcdb / orion-sdk-java

Apache License 2.0
1 stars 2 forks source link

Introduce Provenance Queries #15

Open tock-ibm opened 1 year ago

tock-ibm commented 1 year ago
        // GetHistoricalData return all historical values for specific dn and key
    // Value returned with its associated metadata, including block number, tx index, etc
    ValueWithMetadata[] GetHistoricalData(String dbName, String key) throws Exception;
    // GetHistoricalDataAt returns value for specific version, if exist
    ValueWithMetadata GetHistoricalDataAt(String dbName, String key, Version v) throws Exception;
    // GetPreviousHistoricalData returns value precedes given version, including its metadata, i.e version
    ValueWithMetadata[] GetPreviousHistoricalData(String dbName, String key, Version v) throws Exception;
    // GetNextHistoricalData returns value succeeds given version, including its metadata
    ValueWithMetadata[] GetNextHistoricalData(String dbName, String key, Version v) throws Exception;
    // GetDataReadByUser returns all user reads grouped by databases
    HashMap<String, KVsWithMetadata> GetDataReadByUser(String userID) throws Exception;
    // GetDataWrittenByUser returns all user writes grouped by databases
    HashMap<String, KVsWithMetadata> GetDataWrittenByUser(String userID) throws Exception;
    // GetReaders returns all users who read value associated with the key
    String[] GetReaders(String dbName, String key) throws Exception;
    // GetWriters returns all users who wrote value associated with the key
    String[] GetWriters(String dbName, String key) throws Exception;
    // GetTxIDsSubmittedByUser IDs of all tx submitted by user
    String[] GetTxIDsSubmittedByUser(String userID) throws Exception;