package advsql func Insert[T any](db *Database, query string, encoder func(v *T, encode ScanFunc) error) InsertFunc[T] { prepareGlobal(db, query) return func(value *T) error { s := db.stmt(query) return encoder(value, func(args ...interface{}) error { _, err := s.Exec(args...) return err }) } }