FerretDB v1 (SQLite)

Supported commands

This build (FerretDB v1, SQLite)

This is the FerretDB v1 (SQLite) fork. On top of upstream FerretDB v1.24.2 it adds, among other things: a single-node replica-set handshake with automatic oplog creation (replSetInitiate, replSetGetStatus, replSetGetConfig, replica-set hello/isMaster fields) so MongoDB-wire clients can tail changes instead of polling; the aggregation operators $eq, $ne, $or, $ifNull, $anyElementTrue, $objectToArray, $map and the equality-join $lookup stage; and the throttle self-throttling extension command (see the end of this page). The authoritative, dated list is in the CHANGELOG; the ROADMAP has the full comparison with upstream. FerretDB v1 (SQLite) is a general-purpose MongoDB 7 replacement, comparable to FerretDB v2 (PostgreSQL).

Query commands

CommandArgumentStatusComments
deleteBasic command is fully supported
deletes
comment⚠️
let⚠️Unimplemented
ordered
writeConcern⚠️Ignored
q
limit
collationUnimplemented
hint⚠️Ignored
findBasic command is fully supported
filter
sort
projectionBasic projections with fields are supported
hint⚠️Ignored
skip⚠️
limit
batchSize
singleBatch
comment⚠️
maxTimeMS
readConcern⚠️Ignored
max⚠️Ignored
min⚠️Ignored
returnKeyUnimplemented
showRecordId
tailable
oplogReplay⚠️Ignored
noCursorTimeoutIssue
awaitData
allowPartialResultsUnimplemented
collationUnimplemented
allowDiskUse⚠️Ignored
letUnimplemented
findAndModifyBasic command is fully supported
query
sort
remove
update
new
upsert
bypassDocumentValidation⚠️Ignored
writeConcern⚠️Ignored
maxTimeMS
collationUnimplemented
arrayFiltersUnimplemented
hint⚠️Ignored
comment⚠️
let⚠️Unimplemented
getMoreBasic command is fully supported
batchSize
maxTimeMS
comment⚠️Unimplemented
insertBasic command is fully supported
documents
ordered
bypassDocumentValidation⚠️Ignored
comment⚠️Ignored
updateBasic command is fully supported
updates
ordered⚠️Ignored
writeConcern⚠️Ignored
bypassDocumentValidation⚠️Ignored
comment⚠️
let⚠️Unimplemented
q
u⚠️Issue
c⚠️Unimplemented
upsert
multi
collationUnimplemented
arrayFilters⚠️Unimplemented
hint⚠️Ignored

Update Operators

The following operators and modifiers are available in the update and findAndModify commands.

OperatorModifierStatusComments
$currentDate
$inc
$min
$max
$mul
$rename
$set
$setOnInsert
$unset
$⚠️Issue
$[]⚠️Issue
$[<identifier>]⚠️Issue
$addToSet✅️
$pop
$pull
$push✅️
$pullAll✅️
$each✅️
$position⚠️Issue
$slice⚠️Issue
$sort⚠️Issue
$bit✅️

Projection Operators

The following operators are available in the find command projection argument.

OperatorStatusComments
$✅️
$elemMatchIssue
$metaIssue
$sliceIssue

Query Plan Cache Commands

CommandArgumentStatusComments
planCacheClearIssue
query⚠️
projection⚠️
sort⚠️
comment⚠️
planCacheClearFiltersIssue
query⚠️
sort⚠️
projection⚠️
collationUnimplemented
comment⚠️
planCacheListFiltersIssue
comment⚠️
planCacheSetFilterIssue
query⚠️
sort⚠️
projection⚠️
collationUnimplemented
indexes⚠️
comment⚠️

Free Monitoring Commands

CommandArgumentStatusComments
setFreeMonitoringTelemetry reporting
action: "enable"0
action: "disable"0
getFreeMonitoringStatus

Database Operations

User Management Commands

CommandArgumentStatusComments
createUser
pwd⚠️
customData⚠️
roles⚠️
digestPassword⚠️
writeConcern⚠️
authenticationRestrictions⚠️
mechanisms⚠️
digestPassword⚠️
comment⚠️
dropAllUsersFromDatabase
writeConcern⚠️
comment⚠️
dropUser
writeConcern⚠️
comment⚠️
grantRolesToUserIssue
writeConcern⚠️
comment⚠️
revokeRolesFromUserIssue
roles⚠️
writeConcern⚠️
comment⚠️
updateUser
pwd
customData
roles
digestPassword
writeConcern
authenticationRestrictions
mechanisms
digestPassword
comment
usersInfo
showCredentials
showCustomData⚠️
showPrivileges⚠️
showAuthenticationRestrictions⚠️
filter⚠️Issue
comment⚠️

Authentication Commands

CommandArgumentStatusComments
authenticateIssue
getnonceDeprecated
logout
saslStart

Role Management Commands

CommandArgumentStatusComments
createRoleIssue
privileges⚠️
roles⚠️
authenticationRestrictions⚠️
writeConcern⚠️
comment⚠️
dropRoleIssue
writeConcern⚠️
comment⚠️
dropAllRolesFromDatabaseIssue
writeConcern⚠️
comment⚠️
grantPrivilegesToRoleIssue
privileges⚠️
writeConcern⚠️
comment⚠️
grantRolesToRoleIssue
roles⚠️
writeConcern⚠️
comment⚠️
invalidateUserCacheIssue
revokePrivilegesFromRoleIssue
privileges⚠️
writeConcern⚠️
comment⚠️
revokeRolesFromRoleIssue
roles⚠️
writeConcern⚠️
comment⚠️
rolesInfoIssue
showPrivileges⚠️
showBuiltinRoles⚠️
comment⚠️
updateRoleIssue
privileges⚠️
roles⚠️
authenticationRestrictions⚠️
writeConcern⚠️
comment⚠️

Replication Commands

FerretDB v1 (SQLite) presents itself as a single-node, always-primary replica set of one — enough for a MongoDB-wire client's oplog tailing (e.g. Meteor's OpLog mode), not real multi-node replication or elections. See the CHANGELOG for details.

CommandArgumentStatusComments
replSetInitiateSingle-node RS; auto-creates the capped local.oplog.rs
replSetGetStatusSingle-member primary status for rs.status()
replSetGetConfigSingle-member config for rs.conf()

Session Commands

Related issue.

Related issue.

CommandArgumentStatusComments
abortTransaction⚠️Compatibility no-op (accepted, ignored)
txnNumber⚠️
writeConcern⚠️
autocommit⚠️
comment⚠️
commitTransaction⚠️Compatibility no-op (accepted, ignored)
txnNumber⚠️
writeConcern⚠️
autocommit⚠️
comment⚠️
endSessions⚠️Compatibility no-op (accepted, ignored)
killAllSessions⚠️Compatibility no-op (accepted, ignored)
killAllSessionsByPattern⚠️Compatibility no-op (accepted, ignored)
killSessions⚠️Compatibility no-op (accepted, ignored)
refreshSessions⚠️Compatibility no-op (accepted, ignored)
startSession⚠️Compatibility no-op (accepted, ignored)

Aggregation pipelines

Related issue.

CommandArgumentStatusComments
aggregate✅️
count
distinct

Aggregation pipeline stages

StageStatusComments
$addFieldsSupported
$bucketSupported
$bucketAutoSupported
$changeStreamNot implemented
$changeStreamNot implemented
$collStatsSupported
$countSupported
$currentOpNot implemented
$densifyNot implemented
$documentsNot implemented
$documentsNot implemented
$facetSupported
$fillNot implemented
$geoNearNot implemented
$graphLookupNot implemented
$group⚠️Supported; accumulators limited to $sum and $count
$indexStatsNot implemented
$limitSupported
$listLocalSessionsNot implemented
$listSessionsNot implemented
$lookupEquality join (from/localField/foreignField/as); pipeline form unsupported
$matchSupported
$mergeNot implemented
$outNot implemented
$planCacheStatsNot implemented
$projectSupported
$redactNot implemented
$replaceRootSupported
$replaceWithSupported
$sampleSupported
$searchNot implemented
$searchMetaNot implemented
$setSupported
$setWindowFieldsSupported
$skipSupported
$sortSupported
$sortByCountSupported
$unionWithSupported
$unsetSupported
$unwindSupported

Aggregation pipeline operators

OperatorStatusComments
$absSupported
$accumulatorIssue
$acosSupported
$acoshSupported
$add (arithmetic)Issue
$add (date)Issue
$addToSetIssue
$allElementsTrueSupported
$andSupported
$anyElementTrueAdded in FerretDB v1
$arrayElemAtSupported
$arrayToObjectSupported
$asinSupported
$asinhSupported
$atanSupported
$atan2Issue
$atanhSupported
$avgSupported
$binarySizeSupported
$bottomIssue
$bottomNIssue
$bsonSizeSupported
$ceilSupported
$cmpSupported
$concatSupported
$concatArraysSupported
$condSupported
$convertSupported
$cosSupported
$coshSupported
$countSupported
$covariancePopNot implemented
$covarianceSampNot implemented
$dateAddSupported
$dateDiffSupported
$dateFromPartsSupported
$dateFromStringSupported
$dateSubtractSupported
$dateToPartsSupported
$dateToStringSupported
$dateTruncSupported
$dayOfMonthSupported
$dayOfWeekSupported
$dayOfYearSupported
$degreesToRadiansSupported
$denseRankNot implemented
$derivativeNot implemented
$divideSupported
$documentNumberNot implemented
$eqAdded in FerretDB v1
$expSupported
$expMovingAvgNot implemented
$filterSupported
$first (accumulator)Issue
$first (array operator)Issue
$firstNIssue
$floorSupported
$functionSupported
$getFieldSupported
$gtSupported
$gteSupported
$hourSupported
$ifNullAdded in FerretDB v1
$inSupported
$indexOfArraySupported
$indexOfBytesSupported
$indexOfCPSupported
$integralNot implemented
$isArraySupported
$isNumberSupported
$isoDayOfWeekSupported
$isoWeekSupported
$isoWeekYearSupported
$last (accumulator)Issue
$last (array operator)Issue
$lastNIssue
$letSupported
$linearFillNot implemented
$literalSupported
$lnSupported
$locfNot implemented
$logSupported
$log10Issue
$ltSupported
$lteSupported
$ltrimSupported
$mapAdded in FerretDB v1
$maxSupported
$maxNIssue
$mergeObjectsIssue
$metaNot implemented
$millisecondSupported
$minSupported
$minNNot implemented
$minuteSupported
$modSupported
$monthSupported
$multiplySupported
$neAdded in FerretDB v1
$notSupported
$objectToArrayAdded in FerretDB v1
$orAdded in FerretDB v1
$powSupported
$pushIssue
$radiansToDegreesSupported
$randSupported
$rangeSupported
$rankNot implemented
$reduceSupported
$regexFindNot implemented
$regexFindAllNot implemented
$regexMatchSupported
$replaceAllSupported
$replaceOneSupported
$reverseArraySupported
$roundSupported
$rtrimSupported
$sampleRateNot implemented
$secondSupported
$setDifferenceSupported
$setEqualsSupported
$setFieldSupported
$setIntersectionSupported
$setIsSubsetSupported
$setUnionSupported
$shiftNot implemented
$sinSupported
$sinhSupported
$sizeSupported
$sliceSupported
$sortArraySupported
$splitSupported
$sqrtSupported
$stdDevPopNot implemented
$stdDevSampNot implemented
$strcasecmpSupported
$strLenBytesSupported
$strLenCPSupported
$substrSupported
$substrBytesSupported
$substrCPSupported
$subtract (arithmetic)Issue
$subtract (date)Issue
$sum (accumulator)✅️
$sum (operator)✅️
$switchSupported
$tanSupported
$tanhSupported
$toBoolSupported
$toDateSupported
$toDecimalNot implemented
$toDoubleSupported
$toIntSupported
$toLongSupported
$toLowerSupported
$toObjectIdSupported
$topIssue
$topNIssue
$toStringSupported
$toUpperSupported
$trimSupported
$truncSupported
$tsIncrementNot implemented
$tsSecondNot implemented
$typeSupported
$unsetFieldSupported
$weekSupported
$yearSupported
$zipSupported

Administration commands

CommandArgument / OptionPropertyStatusComments
cloneCollectionAsCapped
toCollection⚠️
size⚠️
writeConcern⚠️
comment⚠️
collModIssue
index⚠️
keyPattern⚠️
name⚠️
expireAfterSeconds⚠️
hidden⚠️
prepareUnique⚠️
unique⚠️
validator⚠️
validationLevel⚠️
validationAction⚠️
viewOn (Views)⚠️
pipeline (Views)⚠️
cappedSize⚠️
cappedMax⚠️
changeStreamPreAndPostImages⚠️
compact
force
comment⚠️
compactStructuredEncryptionData
compactionTokens⚠️
convertToCappedIssue
size⚠️
writeConcern⚠️
comment⚠️
create
capped✅️
timeseries⚠️Issue
timeField⚠️
metaField⚠️
granularity⚠️
expireAfterSeconds⚠️Issue
clusteredIndex⚠️
changeStreamPreAndPostImages⚠️
autoIndexId⚠️Issue
size✅️
max
storageEngine⚠️Ignored
validator⚠️Not implemented in PostgreSQL
validationLevel⚠️Unimplemented
validationAction⚠️Unimplemented
indexOptionDefaults⚠️Ignored
viewOn⚠️Unimplemented
pipeline⚠️Unimplemented
collationUnimplemented
writeConcern⚠️Ignored
encryptedFields⚠️
comment⚠️Ignored
createIndexes
indexes
key
name✅️
unique
partialFilterExpressionIssue
sparseIssue
expireAfterSecondsIssue
hiddenUnimplemented
storageEngineUnimplemented
weightsUnimplemented
default_languageUnimplemented
language_overrideUnimplemented
textIndexVersionUnimplemented
2dsphereIndexVersionUnimplemented
bitsUnimplemented
minUnimplemented
maxUnimplemented
bucketSizeUnimplemented
collationUnimplemented
wildcardProjectionUnimplemented
writeConcern⚠️
commitQuorum⚠️
comment⚠️
currentOpBasic command supported (empty inprog)
$ownOps⚠️
$all⚠️
comment⚠️
drop
writeConcern⚠️Ignored
comment⚠️Ignored
dropDatabase
writeConcern⚠️Ignored
comment⚠️Ignored
dropConnectionsIssue
hostAndPort⚠️
comment⚠️
dropIndexes
index
writeConcern⚠️Ignored
comment⚠️Ignored
filemd5
fsync
fsyncUnlock
lock⚠️
comment⚠️
getDefaultRWConcern
inMemory⚠️
comment⚠️
getClusterParameter
getParameter
comment⚠️
killCursors
cursors
comment⚠️
killOpIssue
op⚠️
comment⚠️
listCollections
filter
nameOnly
authorizedCollections⚠️Issue
comment⚠️
listDatabases
filter
nameOnly
authorizedDatabases⚠️Issue
comment⚠️Ignored
listIndexes
cursor.batchSize⚠️Ignored
comment⚠️Ignored
logRotateIssue
<target>⚠️
comment⚠️
reIndexIssue
renameCollection
toIssue
dropTarget⚠️Issue
writeConcern⚠️Ignored
comment⚠️Ignored
rotateCertificates
setFeatureCompatibilityVersion
setIndexCommitQuorum
setIndexCommitQuorum⚠️
indexNames⚠️
commitQuorum⚠️
comment⚠️
setParameterIssue
setDefaultRWConcern
defaultReadConcern⚠️
defaultWriteConcern⚠️
writeConcern⚠️
comment⚠️
shutdownIssue
force⚠️
timeoutSecs⚠️
comment⚠️

Diagnostic commands

CommandArgumentStatusComments
buildInfoBasic command is fully supported
collStatsBasic command is fully supported
collStats
scale
connPoolStatsUnimplemented
connectionStatusBasic command is fully supported
showPrivileges
dataSizeBasic command is fully supported
keyPattern⚠️Unimplemented
min⚠️Unimplemented
max⚠️Unimplemented
estimate⚠️Ignored
dbHashUnimplemented
collection⚠️
dbStatsBasic command is fully supported
scale
freeStorage⚠️Unimplemented
driverOIDTest⚠️Unimplemented
explainBasic command is fully supported
verbosity⚠️Ignored
comment⚠️Unimplemented
featuresUnimplemented
getCmdLineOptsBasic command is fully supported
getLogBasic command is fully supported
hostInfoBasic command is fully supported
_isSelfUnimplemented
listCommandsBasic command is fully supported
lockInfoUnimplemented
netstatUnimplemented
pingBasic command is fully supported
profileUnimplemented
slowms⚠️
sampleRate⚠️
filter⚠️
serverStatusBasic command is fully supported
shardConnPoolStatsUnimplemented
throttleFerretDB v1 extension (see below)
slowDownMsPause per command, 0–1000, def 5
durationMsWindow length, 0–300000, def 2000
topUnimplemented
validateBasic command is fully supported
full⚠️
repair⚠️
metadata⚠️
checkBSONConformance⚠️
validateDBMetadataUnimplemented
apiParameters⚠️
db⚠️
collections⚠️
whatsmyuriBasic command is fully supported

FerretDB v1 extension commands

These commands are specific to this FerretDB v1 (SQLite) build and are not part of the MongoDB command set.

throttle

A self-throttle for host-CPU pressure. A client that shares the host with FerretDB can call throttle to (1) learn how busy FerretDB is and (2) ask it to slow down when the host CPU is high (a client cannot pause FerretDB's internal work from the outside). While the throttle is active, every command sleeps slowDownMs before it runs, which lowers FerretDB's CPU use and yields time to other software on the host. The throttle self-expires after durationMs, so a crashed or disconnected client can never leave FerretDB permanently slow. The throttle command itself and the cheap health/handshake commands (hello/isMaster/ping) are never throttled.

A client can drive the loop by calling throttle repeatedly with an increasing slowDownMs (e.g. doubling) while the host CPU stays high, and backing off once enough CPU is free. commandsProcessed and operationsSummary let the client see how busy FerretDB is and what it has been doing between calls.

FerretDB also self-regulates. A client that shares the host may be too starved of CPU to measure the load or even send the request. So a background loop in FerretDB samples the host's total CPU (from /proc/stat) every few seconds and, when it is too high, adds its OWN increasing delay before each command until CPU returns below a target — then backs off. The delay actually applied per command is the max of the client-requested slowDownMs and FerretDB's self-regulated delay, so the two cooperate and FerretDB never monopolizes the host even with no client. Self-regulation is tunable with FERRETDB_CPU_SELF_REGULATE (default on), FERRETDB_CPU_HIGH_PERCENT, FERRETDB_CPU_TARGET_PERCENT, FERRETDB_CPU_SLOWDOWN_MS, FERRETDB_CPU_SLOWDOWN_MAX_MS and FERRETDB_CPU_INTERVAL_MS; it is a no-op where /proc/stat is unreadable.

Parameters (all optional):

FieldTypeDefaultRangeMeaning
slowDownMsint50–1000Pause before each command while active
durationMsint20000–300000How long the throttle stays active

Response fields:

FieldMeaning
commandsProcessedRunning count of commands handled (an activity/"how busy" signal)
operationsSummaryThe busiest commands so far, e.g. find=12000, update=340, …
throttledWhether the client-requested throttle is currently active
slowDownMsThe client-requested pause (clamped) now in effect
durationMsThe requested window length
untilUnixNanoDeadline after which the client throttle self-expires
autoSlowDownMsFerretDB's own self-regulated delay (independent of the client)
hostCpuPercentFerretDB's last measured host CPU%

Example:

db.runCommand({ throttle: 1, slowDownMs: 5, durationMs: 2000 })
// { ok: 1, commandsProcessed: 128374, throttled: true, slowDownMs: 5, ... }

db.runCommand({ throttle: 1, durationMs: 0 }) // resume full speed immediately