Class CouchbaseConnectionImpl
- java.lang.Object
-
- org.teiid.resource.spi.BasicConnection
-
- org.teiid.resource.adapter.couchbase.CouchbaseConnectionImpl
-
- All Implemented Interfaces:
javax.resource.cci.Connection,CouchbaseConnection,Connection,ResourceConnection
public class CouchbaseConnectionImpl extends BasicConnection implements CouchbaseConnection
-
-
Constructor Summary
Constructors Constructor Description CouchbaseConnectionImpl(com.couchbase.client.java.env.CouchbaseEnvironment environment, String connectionString, String keyspace, String password, TimeUnit timeUnit, String namespace, com.couchbase.client.java.query.consistency.ScanConsistency scanConsistent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.couchbase.client.java.query.N1qlQueryResultexecute(String statement)Executes the given N1QL statement, which returns a singleN1qlQueryResultobject.StringgetNamespace()Returns the name of the Namespace-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.teiid.resource.spi.ResourceConnection
cleanUp, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo, getXAResource, isAlive
-
-
-
-
Method Detail
-
execute
public com.couchbase.client.java.query.N1qlQueryResult execute(String statement) throws TranslatorException
Description copied from interface:CouchbaseConnectionExecutes the given N1QL statement, which returns a singleN1qlQueryResultobject.- Specified by:
executein interfaceCouchbaseConnection- Parameters:
statement- Any N1QL statement, like Insert, Select, Update, Delete, etc.- Returns:
- Throws:
TranslatorException
-
close
public void close() throws javax.resource.ResourceException- Specified by:
closein interfacejavax.resource.cci.Connection- Specified by:
closein interfaceConnection- Throws:
javax.resource.ResourceException
-
getNamespace
public String getNamespace()
Description copied from interface:CouchbaseConnectionReturns the name of the Namespace- Specified by:
getNamespacein interfaceCouchbaseConnection- Returns:
-
-