SupportedMongoShellAPIs

This matrix is not well maintenanced yet.

Longo is focusing to be work as like as Mongo Shell in browser world.

Mongo Shell APIs described below are supported.

Except non-CRUD operation like Sharding, Replication, Auth, etcetra are not supported because it is used only in the browser by single user.

Database APIs

MongoDB Method Supported Inpremented
db.addUser no -
db.auth no -
db.changeUserPassword no -
db.cloneCollection yes See API
db.cloneDatabase no -
db.commandHelp no -
db.copyDatabase no -
db.createCollection yes See API
db.currentOp yes See API
db.dropDatabase yes See API
db.eval no -
db.fsyncLock no -
db.fsyncUnlock no -
db.getCollection yes See API
db.getCollectionNames yes See API
db.getLastError yes See API
db.getLastErrorObj no See API
db.getMongo no -
db.getName yes See API
db.getPrevError no -
db.getProfilingLevel no -
db.getProfilingStatus no -
db.getReplicationInfo no -
db.getSiblingDB no -
db.help no -
db.hostInfo no -
db.isMaster no -
db.killOp yes See API
db.listCommands no console.log(Longo.createDB(""));
db.loadServerScripts no -
db.logout no -
db.printCollectionStats no -
db.printReplicationInfo no -
db.printShardingStatus no -
db.printSlaveReplicationInfo no -
db.removeUser no -
db.repairDatabase no -
db.resetError no -
db.runCommand no -
db.serverBuildInfo no -
db.serverStatus no -
db.setProfilingLevel no -
db.shutdownServer no -
db.stats no -
db.version no Use Longo.getVersion

Collection APIs

MongoDB Method supported inpremented
db.collection.aggregate yes See API
db.collection.count yes See API
db.collection.copyTo yes See API
db.collection.createIndex no -
db.collection.getIndexStats no -
db.collection.indexStats no -
db.collection.dataSize yes See API
db.collection.distinct yes no
db.collection.drop yes See API
db.collection.dropIndex no -
db.collection.dropIndexes no -
db.collection.ensureIndex no -
db.collection.find yes See API
db.collection.findAndModify yes no
db.collection.findOne yes See API
db.collection.getIndexes no -
db.collection.getShardDistribution no -
db.collection.getShardVersion no -
db.collection.group yes no
db.collection.insert yes See API
db.collection.isCapped yes See API
db.collection.mapReduce yes no
db.collection.reIndex no -
db.collection.remove yes See API
db.collection.renameCollection yes See API
db.collection.save yes See API
db.collection.stats no -
db.collection.storageSize no -
db.collection.totalSize yes See API
db.collection.totalIndexSize no -
db.collection.update yes See API
db.collection.validate no -
Longo Original APIs inpremented
db.collection.persist See API
db.collection.persistOnce See API
db.collection.setDefaultErrorHandler See API

Cursor APIs

In Longo, differ from MongoDB, Cursor object does not have and reference to data. Cursor works as command stack, It will never executed until Cursror receiver APIs called. Result dataset will be passed to these receiver.

MongoDB Method supported inpremented
cursor.addOption no -
cursor.batchSize no -
cursor.count yes See API
cursor.explain no -
cursor.forEach yes See API
cursor.hasNext no -
cursor.hint no -
cursor.limit yes See API
cursor.map yes See API
cursor.maxTimeMS no -
cursor.max yes See API
cursor.min yes See API
cursor.next no -
cursor.objsLeftInBatch no -
cursor.readPref no -
cursor.showDiskLoc no -
cursor.size yes See API
cursor.skip yes See API
cursor.snapshot no -
cursor.sort yes See API
cursor.toArray yes In Longo, result dataset always responded as Array
Commands receiver APIs inpremented
cursor.done See API
cursor.onValue See API
cursor.assign See API
cursor.promise See API

Query operators

Query operators are depended on underscore-query.

Query API $equal $contains $ne $lt $lte $gt $gte $between $in $nin $all $any $size $exists or $has $like $likeI $elemMatch

$regex $cb $computed

Longo does not support $regex$cb$computed operators. Because we use JSON formatted message between main thread and worker thread.

You can use Longo.collection.find({}).map instead, to perform like $regex$cb$computed operators.

Projection operators

Update operators