MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / constructor

Method constructor

lib/mapping/mapper.js:68–81  ·  view source on GitHub ↗

* Creates a new instance of Mapper. * @param {Client} client The Client instance to use to execute the queries and fetch the metadata. * @param {MappingOptions} [options] The [MappingOptions]module:mapping~MappingOptions containing the * information of the models and table mappings.

(client, options)

Source from the content-addressed store, hash-verified

66 * information of the models and table mappings.
67 */
68 constructor(client, options) {
69 if (!client) {
70 throw new Error('client must be defined');
71 }
72
73 /**
74 * The Client instance used to create this Mapper instance.
75 * @type {Client}
76 */
77 this.client = client;
78
79 this._modelMappingInfos = ModelMappingInfo.parse(options, client.keyspace);
80 this._modelMappers = new Map();
81 }
82
83 /**
84 * Gets a [ModelMapper]{@link module:mapping~ModelMapper} that is able to map documents of a certain model into

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected