From bf53bd798a0b3faebedc220071133389686b57bf Mon Sep 17 00:00:00 2001 From: Johannes Rauh Date: Thu, 28 Nov 2024 10:40:59 +0100 Subject: [PATCH] Use query builder function to render insert statement --- database/db.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/database/db.go b/database/db.go index fc174c3..ac963e3 100644 --- a/database/db.go +++ b/database/db.go @@ -265,6 +265,10 @@ func (db *DB) BuildColumns(subject interface{}) []string { return slices.Clone(db.columnMap.Columns(subject)) } +func (db *DB) BuildInsertStatement(stmt InsertStatement) string { + return db.queryBuilder.InsertStatement(stmt) +} + // BuildDeleteStmt returns a DELETE statement for the given struct. func (db *DB) BuildDeleteStmt(from interface{}) string { return fmt.Sprintf(