const classafMorphia::Morphia

sys::Obj
  afMorphia::Morphia

(Service) - Mongo to Fantom Object Mapping.

bsonConvs

Source

const BsonConvs bsonConvs

The Object-Relational-Mapping converters.

connMgr

Source

const MongoConnMgr connMgr

The underlying connection manager.

datastore

Source

Datastore datastore(Type entityType)

Creates a new Datastore instance for the given entity type.

db

Source

const MongoDb? db

The referenced database (if defined).

dbName

Source

const Str? dbName

The name of the database (if defined).

fromBsonDoc

Source

Obj? fromBsonDoc([Str:Obj?]? bsonObj, Type? fantomType)

Converts a BSON object to the given Fantom type.

get

Source

@Operator
Datastore get(Type entityType)

Convenience / shorthand notation for datastore(name)

make

Source

new make(Uri connectionUrl, BsonConvs? bsonConvs := null, Str? dbName := null, Log? log := null)

Creates a new Morphia instance.

prettyPrint

Source

Str prettyPrint(Obj? entity, Int? maxWidth := null, Str? indent := null)

Converts the given entity / object to BSON and pretty prints it.

query

Source

MongoQ query()

Creates a MongoQ instance that's adapted to query Morphia entities.

shutdown

Source

Void shutdown()

Convenience for MongoConnMgr.shutdown().

toBsonDoc

Source

[Str:Obj?]? toBsonDoc(Obj? fantomObj)

Converts the given Fantom object to its BSON object representation.