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

Method truncate

lib/model.ts:143–151  ·  view source on GitHub ↗

Truncate a model in the database.

()

Source from the content-addressed store, hash-verified

141
142 /** Truncate a model in the database. */
143 static async truncate() {
144 const truncateQuery = this._options.queryBuilder
145 .queryForSchema(this)
146 .table(this.table)
147 .truncate()
148 .toDescription();
149
150 await this._options.database.query(truncateQuery);
151 }
152
153 /** Create a model in the database. Should not be called from a child model. */
154 static async createTable() {

Callers 2

syncMethod · 0.45
translateToQueryMethod · 0.45

Calls 4

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

Tested by

no test coverage detected