Package io.prestosql.testing
Class AbstractTestingPrestoClient<T>
- java.lang.Object
-
- io.prestosql.testing.AbstractTestingPrestoClient<T>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
TestingPrestoClient
public abstract class AbstractTestingPrestoClient<T> extends java.lang.Object implements java.io.Closeable
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTestingPrestoClient(io.prestosql.server.testing.TestingPrestoServer prestoServer, io.prestosql.Session defaultSession)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()ResultWithQueryId<T>execute(io.prestosql.Session session, java.lang.String sql)ResultWithQueryId<T>execute(java.lang.String sql)io.prestosql.SessiongetDefaultSession()protected abstract ResultsSession<T>getResultSession(io.prestosql.Session session)io.prestosql.server.testing.TestingPrestoServergetServer()protected java.util.List<io.prestosql.spi.type.Type>getTypes(java.util.List<io.prestosql.client.Column> columns)java.util.List<io.prestosql.metadata.QualifiedObjectName>listTables(io.prestosql.Session session, java.lang.String catalog, java.lang.String schema)booleantableExists(io.prestosql.Session session, java.lang.String table)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
getResultSession
protected abstract ResultsSession<T> getResultSession(io.prestosql.Session session)
-
execute
public ResultWithQueryId<T> execute(java.lang.String sql)
-
execute
public ResultWithQueryId<T> execute(io.prestosql.Session session, java.lang.String sql)
-
listTables
public java.util.List<io.prestosql.metadata.QualifiedObjectName> listTables(io.prestosql.Session session, java.lang.String catalog, java.lang.String schema)
-
tableExists
public boolean tableExists(io.prestosql.Session session, java.lang.String table)
-
getDefaultSession
public io.prestosql.Session getDefaultSession()
-
getServer
public io.prestosql.server.testing.TestingPrestoServer getServer()
-
getTypes
protected java.util.List<io.prestosql.spi.type.Type> getTypes(java.util.List<io.prestosql.client.Column> columns)
-
-