Code Locations


Js Only


We have MongoDbConnection in a couple places.

One is Js only -- which includes passing tests

C:\Work\Java\work\html\_Docs\Python\_SmalltalkToPython\FromSmalltalk\js\nodejs\mv\zplay\mongo-db-connection-sample


Don't forget ">npm install"

In Smalltalk


This one is likely WIP and behind the "Js Only" flavor.

Files are written here:

C:\Work\Java\work\html\_Docs\Python\_SmalltalkToPython\FromSmalltalk\js\nodejs\mv\model\db-model\src



See MongoDbConnection>>basicConnect

uri = "mongodb://localhost:27017/temp_db"
c = await mongoose.createConnection(uri, {})
c is a "NativeConnection"

c.db is a "Db"
c.db.databaseName

collections = await c.db.listCollections().toArray()
each collection is:
	{
	name: firstnames
	type: collection
	}


Navigation