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
delete✅Basic command is fully supported
deletes✅
comment⚠️
let⚠️Unimplemented
ordered✅
writeConcern⚠️Ignored
q✅
limit✅
collation❌Unimplemented
hint⚠️Ignored
find✅Basic command is fully supported
filter✅
sort✅
projection✅Fields, dot notation, and the $, $slice, $elemMatch and $meta operators
hint⚠️Ignored
skip⚠️
limit✅
batchSize✅
singleBatch✅
comment⚠️
maxTimeMS✅
readConcern⚠️Ignored
max⚠️Ignored
min⚠️Ignored
returnKey❌Unimplemented
showRecordId✅
tailable✅
oplogReplay⚠️Ignored
noCursorTimeout❌Issue
awaitData✅
allowPartialResults❌Unimplemented
collation❌Unimplemented
allowDiskUse⚠️Ignored
let❌Unimplemented
findAndModify✅Basic command is fully supported
query✅
sort✅
remove✅
update✅
new✅
upsert✅
bypassDocumentValidation⚠️Ignored
writeConcern⚠️Ignored
maxTimeMS✅
collation❌Unimplemented
arrayFilters❌Unimplemented
hint⚠️Ignored
comment⚠️
let⚠️Unimplemented
getMore✅Basic command is fully supported
batchSize✅
maxTimeMS✅
comment⚠️Unimplemented
insert✅Basic command is fully supported
documents✅
ordered✅
bypassDocumentValidation⚠️Ignored
comment⚠️Ignored
update✅Basic command is fully supported
updates✅
ordered⚠️Ignored
writeConcern⚠️Ignored
bypassDocumentValidation⚠️Ignored
comment⚠️
let⚠️Unimplemented
q✅
u⚠️Issue
c⚠️Unimplemented
upsert✅
multi✅
collation❌Unimplemented
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
$✅️
$elemMatch✅️The first matching element; the field is absent when none match
$meta⚠️recordId and textScore; see below
$slice✅️n, -n and [skip, n]

All four are implemented once, in the handler above the backends, so every backend answers them the same way.

$slice and $meta are neither an inclusion nor an exclusion: on their own they return the whole document, with the array limited or the value added beside it. $elemMatch names a field to keep, so it is an inclusion and cannot be mixed with an exclusion.

$meta answers two keywords:

KeywordStatusComments
recordId✅️The storage-level identity of the document
textScore⚠️Counted from this fork's own $text matching, so the ORDER matches MongoDB's but the VALUES do not. Refused, as MongoDB refuses it, when the query has no $text
indexKey❌The index a query used is not available to the projection
sortKey❌Internal to the query plan
searchScore❌Atlas Search
searchHighlights❌Atlas Search
vectorSearchScore❌Atlas Vector Search

Query Plan Cache Commands

CommandArgumentStatusComments
planCacheClear❌Issue
query⚠️
projection⚠️
sort⚠️
comment⚠️
planCacheClearFilters❌Issue
query⚠️
sort⚠️
projection⚠️
collation❌Unimplemented
comment⚠️
planCacheListFilters❌Issue
comment⚠️
planCacheSetFilter❌Issue
query⚠️
sort⚠️
projection⚠️
collation❌Unimplemented
indexes⚠️
comment⚠️

Free Monitoring Commands

CommandArgumentStatusComments
setFreeMonitoring✅Telemetry 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⚠️
grantRolesToUser❌Issue
writeConcern⚠️
comment⚠️
revokeRolesFromUser❌Issue
roles⚠️
writeConcern⚠️
comment⚠️
updateUser✅
pwd
customData
roles
digestPassword
writeConcern
authenticationRestrictions
mechanisms
digestPassword
comment
usersInfo✅
showCredentials✅
showCustomData⚠️
showPrivileges⚠️
showAuthenticationRestrictions⚠️
filter⚠️Issue
comment⚠️

Authentication Commands

CommandArgumentStatusComments
authenticate❌Issue
getnonce❌Deprecated
logout✅
saslStart✅

Role Management Commands

CommandArgumentStatusComments
createRole❌Issue
privileges⚠️
roles⚠️
authenticationRestrictions⚠️
writeConcern⚠️
comment⚠️
dropRole❌Issue
writeConcern⚠️
comment⚠️
dropAllRolesFromDatabase❌Issue
writeConcern⚠️
comment⚠️
grantPrivilegesToRole❌Issue
privileges⚠️
writeConcern⚠️
comment⚠️
grantRolesToRole❌Issue
roles⚠️
writeConcern⚠️
comment⚠️
invalidateUserCache❌Issue
revokePrivilegesFromRole❌Issue
privileges⚠️
writeConcern⚠️
comment⚠️
revokeRolesFromRole❌Issue
roles⚠️
writeConcern⚠️
comment⚠️
rolesInfo❌Issue
showPrivileges⚠️
showBuiltinRoles⚠️
comment⚠️
updateRole❌Issue
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
replSetInitiate✅Single-node RS; auto-creates the capped local.oplog.rs
replSetGetStatus✅Single-member primary status for rs.status()
replSetGetConfig✅Single-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
$addFields✅Supported
$bucket✅Supported
$bucketAuto✅Supported
$changeStream❌Not implemented
$changeStream❌Not implemented
$collStats✅Supported
$count✅Supported
$currentOp❌Not implemented
$densify❌Not implemented
$documents❌Not implemented
$documents❌Not implemented
$facet✅Supported
$fill❌Not implemented
$geoNear❌Not implemented
$graphLookup❌Not implemented
$group⚠️Supported; accumulators limited to $sum and $count
$indexStats❌Not implemented
$limit✅Supported
$listLocalSessions❌Not implemented
$listSessions❌Not implemented
$lookup✅Equality join (from/localField/foreignField/as); pipeline form unsupported
$match✅Supported
$merge❌Not implemented
$out❌Not implemented
$planCacheStats❌Not implemented
$project✅Supported
$redact❌Not implemented
$replaceRoot✅Supported
$replaceWith✅Supported
$sample✅Supported
$search❌Not implemented
$searchMeta❌Not implemented
$set✅Supported
$setWindowFields✅Supported
$skip✅Supported
$sort✅Supported
$sortByCount✅Supported
$unionWith✅Supported
$unset✅Supported
$unwind✅Supported

Aggregation pipeline operators

OperatorStatusComments
$abs✅Supported
$accumulator❌Issue
$acos✅Supported
$acosh✅Supported
$add (arithmetic)❌Issue
$add (date)❌Issue
$addToSet❌Issue
$allElementsTrue✅Supported
$and✅Supported
$anyElementTrue✅Added in FerretDB v1
$arrayElemAt✅Supported
$arrayToObject✅Supported
$asin✅Supported
$asinh✅Supported
$atan✅Supported
$atan2❌Issue
$atanh✅Supported
$avg✅Supported
$binarySize✅Supported
$bottom❌Issue
$bottomN❌Issue
$bsonSize✅Supported
$ceil✅Supported
$cmp✅Supported
$concat✅Supported
$concatArrays✅Supported
$cond✅Supported
$convert✅Supported
$cos✅Supported
$cosh✅Supported
$count✅Supported
$covariancePop❌Not implemented
$covarianceSamp❌Not implemented
$dateAdd✅Supported
$dateDiff✅Supported
$dateFromParts✅Supported
$dateFromString✅Supported
$dateSubtract✅Supported
$dateToParts✅Supported
$dateToString✅Supported
$dateTrunc✅Supported
$dayOfMonth✅Supported
$dayOfWeek✅Supported
$dayOfYear✅Supported
$degreesToRadians✅Supported
$denseRank❌Not implemented
$derivative❌Not implemented
$divide✅Supported
$documentNumber❌Not implemented
$eq✅Added in FerretDB v1
$exp✅Supported
$expMovingAvg❌Not implemented
$filter✅Supported
$first (accumulator)❌Issue
$first (array operator)❌Issue
$firstN❌Issue
$floor✅Supported
$function✅Supported
$getField✅Supported
$gt✅Supported
$gte✅Supported
$hour✅Supported
$ifNull✅Added in FerretDB v1
$in✅Supported
$indexOfArray✅Supported
$indexOfBytes✅Supported
$indexOfCP✅Supported
$integral❌Not implemented
$isArray✅Supported
$isNumber✅Supported
$isoDayOfWeek✅Supported
$isoWeek✅Supported
$isoWeekYear✅Supported
$last (accumulator)❌Issue
$last (array operator)❌Issue
$lastN❌Issue
$let✅Supported
$linearFill❌Not implemented
$literal✅Supported
$ln✅Supported
$locf❌Not implemented
$log✅Supported
$log10❌Issue
$lt✅Supported
$lte✅Supported
$ltrim✅Supported
$map✅Added in FerretDB v1
$max✅Supported
$maxN❌Issue
$mergeObjects❌Issue
$meta❌Not implemented
$millisecond✅Supported
$min✅Supported
$minN❌Not implemented
$minute✅Supported
$mod✅Supported
$month✅Supported
$multiply✅Supported
$ne✅Added in FerretDB v1
$not✅Supported
$objectToArray✅Added in FerretDB v1
$or✅Added in FerretDB v1
$pow✅Supported
$push❌Issue
$radiansToDegrees✅Supported
$rand✅Supported
$range✅Supported
$rank❌Not implemented
$reduce✅Supported
$regexFind❌Not implemented
$regexFindAll❌Not implemented
$regexMatch✅Supported
$replaceAll✅Supported
$replaceOne✅Supported
$reverseArray✅Supported
$round✅Supported
$rtrim✅Supported
$sampleRate❌Not implemented
$second✅Supported
$setDifference✅Supported
$setEquals✅Supported
$setField✅Supported
$setIntersection✅Supported
$setIsSubset✅Supported
$setUnion✅Supported
$shift❌Not implemented
$sin✅Supported
$sinh✅Supported
$size✅Supported
$slice✅Supported
$sortArray✅Supported
$split✅Supported
$sqrt✅Supported
$stdDevPop❌Not implemented
$stdDevSamp❌Not implemented
$strcasecmp✅Supported
$strLenBytes✅Supported
$strLenCP✅Supported
$substr✅Supported
$substrBytes✅Supported
$substrCP✅Supported
$subtract (arithmetic)❌Issue
$subtract (date)❌Issue
$sum (accumulator)✅️
$sum (operator)✅️
$switch✅Supported
$tan✅Supported
$tanh✅Supported
$toBool✅Supported
$toDate✅Supported
$toDecimal❌Not implemented
$toDouble✅Supported
$toInt✅Supported
$toLong✅Supported
$toLower✅Supported
$toObjectId✅Supported
$top❌Issue
$topN❌Issue
$toString✅Supported
$toUpper✅Supported
$trim✅Supported
$trunc✅Supported
$tsIncrement❌Not implemented
$tsSecond❌Not implemented
$type✅Supported
$unsetField✅Supported
$week✅Supported
$year✅Supported
$zip✅Supported

Administration commands

CommandArgument / OptionPropertyStatusComments
cloneCollectionAsCapped❌
toCollection⚠️
size⚠️
writeConcern⚠️
comment⚠️
collMod❌Issue
index⚠️
keyPattern⚠️
name⚠️
expireAfterSeconds⚠️
hidden⚠️
prepareUnique⚠️
unique⚠️
validator⚠️
validationLevel⚠️
validationAction⚠️
viewOn (Views)⚠️
pipeline (Views)⚠️
cappedSize⚠️
cappedMax⚠️
changeStreamPreAndPostImages⚠️
compact✅
force✅
comment⚠️
compactStructuredEncryptionData❌
compactionTokens⚠️
convertToCapped❌Issue
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
collation❌Unimplemented
writeConcern⚠️Ignored
encryptedFields⚠️
comment⚠️Ignored
createIndexes✅
indexes✅
key✅
name✅️
unique✅
partialFilterExpression❌Issue
sparse❌Issue
expireAfterSeconds❌Issue
hidden❌Unimplemented
storageEngine❌Unimplemented
weights❌Unimplemented
default_language❌Unimplemented
language_override❌Unimplemented
textIndexVersion❌Unimplemented
2dsphereIndexVersion❌Unimplemented
bits❌Unimplemented
min❌Unimplemented
max❌Unimplemented
bucketSize❌Unimplemented
collation❌Unimplemented
wildcardProjection❌Unimplemented
writeConcern⚠️
commitQuorum⚠️
comment⚠️
currentOp✅Basic command supported (empty inprog)
$ownOps⚠️
$all⚠️
comment⚠️
drop✅
writeConcern⚠️Ignored
comment⚠️Ignored
dropDatabase✅
writeConcern⚠️Ignored
comment⚠️Ignored
dropConnections❌Issue
hostAndPort⚠️
comment⚠️
dropIndexes✅
index✅
writeConcern⚠️Ignored
comment⚠️Ignored
filemd5❌
fsync❌
fsyncUnlock❌
lock⚠️
comment⚠️
getDefaultRWConcern❌
inMemory⚠️
comment⚠️
getClusterParameter❌
getParameter❌
comment⚠️
killCursors✅
cursors✅
comment⚠️
killOp❌Issue
op⚠️
comment⚠️
listCollections✅
filter✅
nameOnly✅
authorizedCollections⚠️Issue
comment⚠️
listDatabases✅
filter✅
nameOnly✅
authorizedDatabases⚠️Issue
comment⚠️Ignored
listIndexes✅
cursor.batchSize⚠️Ignored
comment⚠️Ignored
logRotate❌Issue
<target>⚠️
comment⚠️
reIndex❌Issue
renameCollection✅
to✅Issue
dropTarget⚠️Issue
writeConcern⚠️Ignored
comment⚠️Ignored
rotateCertificates❌
setFeatureCompatibilityVersion❌
setIndexCommitQuorum❌
setIndexCommitQuorum⚠️
indexNames⚠️
commitQuorum⚠️
comment⚠️
setParameter❌Issue
setDefaultRWConcern❌
defaultReadConcern⚠️
defaultWriteConcern⚠️
writeConcern⚠️
comment⚠️
shutdown❌Issue
force⚠️
timeoutSecs⚠️
comment⚠️

Diagnostic commands

CommandArgumentStatusComments
buildInfo✅Basic command is fully supported
collStats✅Basic command is fully supported
collStats✅
scale✅
connPoolStats❌Unimplemented
connectionStatus✅Basic command is fully supported
showPrivileges✅
dataSize✅Basic command is fully supported
keyPattern⚠️Unimplemented
min⚠️Unimplemented
max⚠️Unimplemented
estimate⚠️Ignored
dbHash❌Unimplemented
collection⚠️
dbStats✅Basic command is fully supported
scale✅
freeStorage⚠️Unimplemented
driverOIDTest⚠️Unimplemented
explain✅Basic command is fully supported
verbosity⚠️Ignored
comment⚠️Unimplemented
features❌Unimplemented
getCmdLineOpts✅Basic command is fully supported
getLog✅Basic command is fully supported
hostInfo✅Basic command is fully supported
_isSelf❌Unimplemented
listCommands✅Basic command is fully supported
lockInfo❌Unimplemented
netstat❌Unimplemented
ping✅Basic command is fully supported
profile❌Unimplemented
slowms⚠️
sampleRate⚠️
filter⚠️
serverStatus✅Basic command is fully supported
shardConnPoolStats❌Unimplemented
throttle✅FerretDB v1 extension (see below)
slowDownMs✅Pause per command, 0–1000, def 5
durationMs✅Window length, 0–300000, def 2000
top❌Unimplemented
validate✅Basic command is fully supported
full⚠️
repair⚠️
metadata⚠️
checkBSONConformance⚠️
validateDBMetadata❌Unimplemented
apiParameters⚠️
db⚠️
collections⚠️
whatsmyuri✅Basic 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