Search in sources :

Example 1 with ForMetadata

use of io.trino.plugin.raptor.legacy.metadata.ForMetadata in project trino by trinodb.

the class RaptorModule method createJdbi.

@ForMetadata
@Singleton
@Provides
public static Jdbi createJdbi(@ForMetadata ConnectionFactory connectionFactory, TypeManager typeManager) {
    Jdbi dbi = Jdbi.create(connectionFactory).installPlugin(new SqlObjectPlugin()).registerRowMapper(new TableColumn.Mapper(typeManager)).registerRowMapper(new Distribution.Mapper(typeManager));
    createTablesWithRetry(dbi);
    return dbi;
}
Also used : Jdbi(org.jdbi.v3.core.Jdbi) Distribution(io.trino.plugin.raptor.legacy.metadata.Distribution) SqlObjectPlugin(org.jdbi.v3.sqlobject.SqlObjectPlugin) Singleton(javax.inject.Singleton) ForMetadata(io.trino.plugin.raptor.legacy.metadata.ForMetadata) Provides(com.google.inject.Provides)

Aggregations

Provides (com.google.inject.Provides)1 Distribution (io.trino.plugin.raptor.legacy.metadata.Distribution)1 ForMetadata (io.trino.plugin.raptor.legacy.metadata.ForMetadata)1 Singleton (javax.inject.Singleton)1 Jdbi (org.jdbi.v3.core.Jdbi)1 SqlObjectPlugin (org.jdbi.v3.sqlobject.SqlObjectPlugin)1