Skip to content

Commit

Permalink
Use query builder function to render insert statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jrauh01 committed Nov 28, 2024
1 parent 01bfe70 commit bf53bd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bf53bd7

Please sign in to comment.