net.corda.node.utilities

## Class DatabaseSupportKt

- net.corda.node.utilities.DatabaseSupportKt

-     public class DatabaseSupportKt

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `NODE_DATABASE_PREFIX` Table prefix for all tables owned by the node module.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> rx.Observer<T>` | `bufferUntilDatabaseCommit(rx.Observer<T> $receiver)` Buffer observations until after the current database transaction has been closed. Observations are never dropped, simply delayed.
    `static org.jetbrains.exposed.sql.Column<net.corda.core.crypto.CompositeKey>` | `compositeKey(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)`
    `static kotlin.Pair<java.io.Closeable,org.jetbrains.exposed.sql.Database>` | `configureDatabase(java.util.Properties props)`
    `static org.jetbrains.exposed.sql.Transaction` | `createDatabaseTransaction(org.jetbrains.exposed.sql.Database db)`
    `static <T> T` | `databaseTransaction(org.jetbrains.exposed.sql.Database db, kotlin.jvm.functions.Function1<? super org.jetbrains.exposed.sql.Transaction,? extends T> statement)`
    `static org.jetbrains.exposed.sql.Column<java.time.Instant>` | `instant(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)`
    `static <T> T` | `isolatedTransaction(org.jetbrains.exposed.sql.Database database, kotlin.jvm.functions.Function1<? super org.jetbrains.exposed.sql.Transaction,? extends T> block)`
    `static org.jetbrains.exposed.sql.Column<java.time.LocalDate>` | `localDate(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)`
    `static org.jetbrains.exposed.sql.Column<java.time.LocalDateTime>` | `localDateTime(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)`
    `static PartyColumns` | `party(org.jetbrains.exposed.sql.Table $receiver, java.lang.String nameColumnName, java.lang.String keyColumnName)`
    `static org.jetbrains.exposed.sql.Column<java.security.PublicKey>` | `publicKey(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)` Table column helpers for use with Exposed, as per varchar etc.
    `static org.jetbrains.exposed.sql.Column<net.corda.core.crypto.SecureHash>` | `secureHash(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)`
    `static StateRefColumns` | `stateRef(org.jetbrains.exposed.sql.Table $receiver, java.lang.String txIdColumnName, java.lang.String indexColumnName)`
    `static TxnNoteColumns` | `txnNote(org.jetbrains.exposed.sql.Table $receiver, java.lang.String txIdColumnName, java.lang.String txnNoteColumnName)`
    `static org.jetbrains.exposed.sql.Column<java.util.UUID>` | `uuidString(org.jetbrains.exposed.sql.Table $receiver, java.lang.String name)`
    `static <T> rx.Observable<T>` | `wrapWithDatabaseTransaction(rx.Observable<T> $receiver, org.jetbrains.exposed.sql.Database db)` Wrap delivery of observations in a database transaction. Multiple subscribers will receive the observations inside the same database transaction. This also lazily subscribes to the source rx.Observable to preserve any buffering that might be in place.

- - ### Field Detail

    - #### NODE_DATABASE_PREFIX

          public static java.lang.String NODE_DATABASE_PREFIX

      Table prefix for all tables owned by the node module.

  - ### Method Detail

    - #### databaseTransaction

          public static <T> T databaseTransaction(org.jetbrains.exposed.sql.Database db,
                                                  kotlin.jvm.functions.Function1<? super org.jetbrains.exposed.sql.Transaction,? extends T> statement)

    - #### createDatabaseTransaction

          public static org.jetbrains.exposed.sql.Transaction createDatabaseTransaction(org.jetbrains.exposed.sql.Database db)

    - #### configureDatabase

          public static kotlin.Pair<java.io.Closeable,org.jetbrains.exposed.sql.Database> configureDatabase(java.util.Properties props)

    - #### isolatedTransaction

          public static <T> T isolatedTransaction(org.jetbrains.exposed.sql.Database database,
                                                  kotlin.jvm.functions.Function1<? super org.jetbrains.exposed.sql.Transaction,? extends T> block)

    - #### bufferUntilDatabaseCommit

          public static <T> rx.Observer<T> bufferUntilDatabaseCommit(rx.Observer<T> $receiver)

      Buffer observations until after the current database transaction has been closed. Observations are never dropped, simply delayed.

      Primarily for use by component authors to publish observations during database transactions without racing against closing the database transaction.

      For examples, see the call hierarchy of this function.

    - #### wrapWithDatabaseTransaction

          public static <T> rx.Observable<T> wrapWithDatabaseTransaction(rx.Observable<T> $receiver,
                                                                         org.jetbrains.exposed.sql.Database db)

      Wrap delivery of observations in a database transaction. Multiple subscribers will receive the observations inside the same database transaction. This also lazily subscribes to the source rx.Observable to preserve any buffering that might be in place.

    - #### publicKey

          public static org.jetbrains.exposed.sql.Column<java.security.PublicKey> publicKey(org.jetbrains.exposed.sql.Table $receiver,
                                                                                            java.lang.String name)

      Table column helpers for use with Exposed, as per varchar etc.

      See Also:
        varchar

    - #### compositeKey

          public static org.jetbrains.exposed.sql.Column<net.corda.core.crypto.CompositeKey> compositeKey(org.jetbrains.exposed.sql.Table $receiver,
                                                                                                          java.lang.String name)

    - #### secureHash

          public static org.jetbrains.exposed.sql.Column<net.corda.core.crypto.SecureHash> secureHash(org.jetbrains.exposed.sql.Table $receiver,
                                                                                                      java.lang.String name)

    - #### party

          public static PartyColumns party(org.jetbrains.exposed.sql.Table $receiver,
                                           java.lang.String nameColumnName,
                                           java.lang.String keyColumnName)

    - #### uuidString

          public static org.jetbrains.exposed.sql.Column<java.util.UUID> uuidString(org.jetbrains.exposed.sql.Table $receiver,
                                                                                    java.lang.String name)

    - #### localDate

          public static org.jetbrains.exposed.sql.Column<java.time.LocalDate> localDate(org.jetbrains.exposed.sql.Table $receiver,
                                                                                        java.lang.String name)

    - #### localDateTime

          public static org.jetbrains.exposed.sql.Column<java.time.LocalDateTime> localDateTime(org.jetbrains.exposed.sql.Table $receiver,
                                                                                                java.lang.String name)

    - #### instant

          public static org.jetbrains.exposed.sql.Column<java.time.Instant> instant(org.jetbrains.exposed.sql.Table $receiver,
                                                                                    java.lang.String name)

    - #### stateRef

          public static StateRefColumns stateRef(org.jetbrains.exposed.sql.Table $receiver,
                                                 java.lang.String txIdColumnName,
                                                 java.lang.String indexColumnName)

    - #### txnNote

          public static TxnNoteColumns txnNote(org.jetbrains.exposed.sql.Table $receiver,
                                               java.lang.String txIdColumnName,
                                               java.lang.String txnNoteColumnName)