Search in sources :

Example 1 with KvRecord

use of com.torodb.backend.tables.records.KvRecord in project torodb by torodb.

the class AbstractMetaDataReadInterface method readKv.

@Override
public Optional<String> readKv(DSLContext dsl, MetaInfoKey key) {
    KvTable<KvRecord> kvTable = getKvTable();
    Condition c = kvTable.KEY.eq(key.getKeyName());
    return dsl.select(kvTable.VALUE).from(kvTable).where(c).fetchOptional().map(Record1::value1);
}
Also used : Condition(org.jooq.Condition) KvRecord(com.torodb.backend.tables.records.KvRecord) Record1(org.jooq.Record1)

Aggregations

KvRecord (com.torodb.backend.tables.records.KvRecord)1 Condition (org.jooq.Condition)1 Record1 (org.jooq.Record1)1