Class MongoDbDriverLiveAdapter
java.lang.Object
app.ductape.sdk.database.adapters.BaseAdapter
app.ductape.sdk.database.adapters.MongoDbDriverLiveAdapter
Real MongoDB adapter via the official MongoDB Java Sync Driver (Go/.NET Mongo live-adapter
parity). The connection pool is explicitly capped at 1 connection — the VPC connector tunnel
local proxy only accepts a single TCP connection per
connect() call, so pooling beyond
1 connection would be unusable anyway.
Table name = collection name. where maps are translated to MongoDB filter documents
via simple per-key equality (Filters.eq(TItem)), consistent with the in-memory
MongoDBAdapter stub's equality-only where matching.
-
Field Summary
Fields inherited from class app.ductape.sdk.database.adapters.BaseAdapter
connected, connectionOptions, connectionUrl, maxRetries -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected DatabaseTypeintvoidvoidintTSadapter.rawQuery(options).static booleanTS/.NET/Go parity gate: opt-in viaoptions.live == true(with a resolvable connection string) or theDUCTAPE_LIVE=trueenvironment variable.booleanMongoDB has no savepoint/SQL-style deferrable transaction support in this adapter.booleantableExists(String table) testConnection(Map<String, Object> options) intMethods inherited from class app.ductape.sdk.database.adapters.BaseAdapter
aggregate, attemptReconnect, beginTransaction, commitTransaction, createIndex, createSavepoint, dropIndex, executeWithRetry, executeWithRetry, getDatabaseType, getIndexStatistics, groupBy, isConnected, isConnectionError, listIndexes, releaseSavepoint, rollbackToSavepoint, rollbackTransaction
-
Constructor Details
-
MongoDbDriverLiveAdapter
public MongoDbDriverLiveAdapter()
-
-
Method Details
-
databaseType
- Specified by:
databaseTypein classBaseAdapter
-
shouldUse
TS/.NET/Go parity gate: opt-in viaoptions.live == true(with a resolvable connection string) or theDUCTAPE_LIVE=trueenvironment variable. -
connect
- Specified by:
connectin classBaseAdapter
-
testConnection
- Specified by:
testConnectionin classBaseAdapter
-
disconnect
public void disconnect()- Specified by:
disconnectin classBaseAdapter
-
query
public List<Map<String,Object>> query(String table, Map<String, Object> where, int limit, int offset) - Specified by:
queryin classBaseAdapter
-
insert
- Specified by:
insertin classBaseAdapter
-
update
- Specified by:
updatein classBaseAdapter
-
delete
- Specified by:
deletein classBaseAdapter
-
tableExists
- Specified by:
tableExistsin classBaseAdapter
-
listTables
- Specified by:
listTablesin classBaseAdapter
-
schema
- Specified by:
schemain classBaseAdapter
-
createTable
- Specified by:
createTablein classBaseAdapter
-
dropTable
- Specified by:
dropTablein classBaseAdapter
-
rawQuery
Description copied from class:BaseAdapterTSadapter.rawQuery(options). Default in-memory behavior supports object queries by delegating toBaseAdapter.query(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, int, int).- Overrides:
rawQueryin classBaseAdapter
-
supportsDeferrableTransactions
public boolean supportsDeferrableTransactions()MongoDB has no savepoint/SQL-style deferrable transaction support in this adapter.- Overrides:
supportsDeferrableTransactionsin classBaseAdapter
-