Skip to main content

Parameters

Hint

This article is generated by AI translation.

jdbc-mongo supports many JDBC URL parameters to control connection behavior, auth, timeouts, etc.

JDBC URL format
jdbc:dbvisitor:mongo://server:port?database=0&param1=value1&param2=value2
  • Server address: if port is omitted, default is 27017. Format: ip or ip:port; cluster: ip:port;ip:port or ip;ip;ip.

Basic Parameters

NameDescriptionDefault
usernameDatabase usernameNone
passwordDatabase passwordNone
mechanismAuth mechanism: PLAIN, SCRAM-SHA-1, SCRAM-SHA-256, GSSAPI, X-509None (auto-negotiate)
clientNameClient name shown in MongoDB server logsMongo-JDBC-Client

Network & Timeouts

NameDescriptionDefault
connectTimeoutConnection timeout (ms)Driver default
socketTimeoutSocket read timeout (ms)Driver default
socketSndBufferSocket send buffer (bytes)Driver default
socketRcvBufferSocket receive buffer (bytes)Driver default

Read/Write Strategy

NameDescriptionDefault
retryWritesEnable retry writestrue
retryReadsEnable retry readstrue

Pre-Read Settings

Control pre-reading for large files or datasets. When enabled, result sets expose all document fields (not just _ID, _JSON).

NameDescriptionDefault
preReadEnable pre-read; exposes all fields in result sets.true
preReadThresholdThreshold to swap pre-read data to disk.5mb
preReadMaxFileSizeMax pre-read file size20mb
preReadCacheDirPre-read cache directory(system temp)
  • preReadMaxFileSize accepts units b, kb, mb, gb (e.g., 10mb). Without a unit, MB is assumed.

Other Parameters

NameDescriptionDefault
timeZoneLocal time zone used by the driver when handling time-zone data.UTC
customMongoCustomize MongoDB client creation; implement net.hasor.dbvisitor.adapter.mongo.CustomMongo.None