com.jaregu.database.queries.cache.QueriesCacheNoCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of queries Show documentation
Show all versions of queries Show documentation
Java based SQL templating project. Store your queries in *.sql files and build queries for execution. Supports simple expressions and conditional clauses and interface proxying for java-sql bridge.
package com.jaregu.database.queries.cache;
import java.util.function.Supplier;
import com.jaregu.database.queries.QueryId;
import com.jaregu.database.queries.SourceId;
import com.jaregu.database.queries.compiling.PreparedQuery;
import com.jaregu.database.queries.parsing.ParsedQueries;
public class QueriesCacheNoCache implements QueriesCache {
private static final QueriesCache INSTANCE = new QueriesCacheNoCache();
private QueriesCacheNoCache() {
}
@Override
public ParsedQueries getParsedQueries(SourceId sourceId, Supplier queriesSupplier) {
return queriesSupplier.get();
}
@Override
public PreparedQuery getPreparedQuery(QueryId queryId, Supplier querySupplier) {
return querySupplier.get();
}
public static QueriesCache getInstance() {
return INSTANCE;
}
}