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 void
close()
com.couchbase.client.java.query.N1qlQueryResult
execute(String statement)
Executes the given N1QL statement, which returns a singleN1qlQueryResult
object.String
getNamespace()
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:CouchbaseConnection
Executes the given N1QL statement, which returns a singleN1qlQueryResult
object.- Specified by:
execute
in 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:
close
in interfacejavax.resource.cci.Connection
- Specified by:
close
in interfaceConnection
- Throws:
javax.resource.ResourceException
-
getNamespace
public String getNamespace()
Description copied from interface:CouchbaseConnection
Returns the name of the Namespace- Specified by:
getNamespace
in interfaceCouchbaseConnection
- Returns:
-
-