MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / prepareBenchTable

Function prepareBenchTable

cmd/cql-minerd/integration_test.go:677–686  ·  view source on GitHub ↗
(db *sql.DB)

Source from the content-addressed store, hash-verified

675const TABLENAME = "insert_table0"
676
677func prepareBenchTable(db *sql.DB) {
678 _, err := db.Exec("DROP TABLE IF EXISTS " + TABLENAME + ";")
679 So(err, ShouldBeNil)
680
681 _, err = db.Exec(`CREATE TABLE ` + TABLENAME + ` ("k" INT, "v1" TEXT, PRIMARY KEY("k"))`)
682 So(err, ShouldBeNil)
683
684 _, err = db.Exec("REPLACE INTO "+TABLENAME+" VALUES(?, ?)", ROWSTART-1, "test")
685 So(err, ShouldBeNil)
686}
687
688func cleanBenchTable(db *sql.DB) {
689 _, err := db.Exec("DELETE FROM "+TABLENAME+" WHERE k >= ?", ROWSTART)

Callers 1

benchDBFunction · 0.85

Calls 1

ExecMethod · 0.65

Tested by

no test coverage detected