func (c *Connection) Delete(dq squirrel.DeleteBuilder) error {
	_, err := c.execSquirrel(dq)
	return err
}
Delete removes records indicated by the given DeleteBuilder
package database
import (
	"database/sql"
	"fmt"
	"time"
	"github.com/theparanoids/ashirt-server/backend/logging"
	"github.com/Masterminds/squirrel"
	"github.com/go-sql-driver/mysql"
	"github.com/jmoiron/sqlx"
)
func (c *Connection) Select(modelSlice interface{}, sb squirrel.SelectBuilder) error {
	query, values, err := prepSquirrel(sb, nil)
	if err != nil {
		return err
	}
	return c.Sqlx.Select(modelSlice, query, values...)
}
func (c *Connection) Get(model interface{}, sb squirrel.SelectBuilder) error {
	query, values, err := prepSquirrel(sb, nil)
	if err != nil {
		return err
	}
	return c.Sqlx.Get(model, query, values...)
}
func (c *Connection) Exec(query string, values ...interface{}) error {
	newQuery, newValues, err := sqlx.In(query, values...)
	if err != nil {
		return err
	}
	logQuery(newQuery, newValues)
	_, err = c.Sqlx.Exec(newQuery, newValues...)
	return err
}
func (c *Connection) Insert(tableName string, valueMap map[string]interface{}) (int64, error) {
	ins := prepInsert(tableName, valueMap)
	result, err := c.execSquirrel(ins)
	if err != nil {
		return -1, err
	}
	return result.LastInsertId()
}
func (c *Connection) BatchInsert(tableName string, count int, mapFn func(int) map[string]interface{}) error {
	if count == 0 {
		return nil
	}
	columns := []string{}
	query := squirrel.Insert(tableName)
	for idx := 0; idx < count; idx++ {
		valueMap := mapFn(idx)
		if len(valueMap) == 0 {
			continue
		}
		if len(columns) == 0 {
			for columnName := range valueMap {
				columns = append(columns, columnName)
			}
			query = query.Columns(columns...)
		}
		values := []interface{}{}
		for _, columnName := range columns {
			values = append(values, valueMap[columnName])
		}
		query = query.Values(values...)
	}
	_, err := c.execSquirrel(query)
	return err
}
func (c *Connection) Update(ub squirrel.UpdateBuilder) error {
	ub = ub.Set("updated_at", time.Now())
	_, err := c.execSquirrel(ub)
	if err != nil {
		return fmt.Errorf("Unable to execute db update : %w", err)
	}
	return nil
}