MCPcopy
hub / github.com/eveningkid/denodb / drop

Method drop

lib/model.ts:130–140  ·  view source on GitHub ↗

Drop a model in the database.

()

Source from the content-addressed store, hash-verified

128
129 /** Drop a model in the database. */
130 static async drop() {
131 const dropQuery = this._options.queryBuilder
132 .queryForSchema(this)
133 .table(this.table)
134 .dropIfExists()
135 .toDescription();
136
137 await this._options.database.query(dropQuery);
138
139 this._isCreatedInDatabase = false;
140 }
141
142 /** Truncate a model in the database. */
143 static async truncate() {

Callers 1

syncMethod · 0.80

Calls 5

toDescriptionMethod · 0.80
dropIfExistsMethod · 0.80
tableMethod · 0.80
queryForSchemaMethod · 0.80
queryMethod · 0.65

Tested by

no test coverage detected