You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: orm.go
    path of file: ./repos/go-zero/tools/goctl/model/sql/test
    
    the code of the file until where you have to start completion: // copy from core/stores/sqlx/orm.go

package mocksql

import (
	"errors"
	"reflect"
	"strings"

	"github.com/zeromicro/go-zero/core/mapping"
)

const tagName = "db"

var (
	// ErrNotMatchDestination defines an error for mismatching case
	ErrNotMatchDestination = errors.New("not matching destination to scan")
	// ErrNotReadableValue defines an error for the value is not addressable or interfaceable
	ErrNotReadableValue = errors.New("value not addressable or interfaceable")
	// ErrNotSettable defines an error for the variable is not settable
	ErrNotSettable = errors.New("passed in variable is not settable")
	// ErrUnsupportedValueType deinfes an error for unsupported unmarshal type
	ErrUnsupportedValueType = errors.New("unsupported unmarshal type")
)

type rowsScanner interface {
	Columns() ([]string, error)
	Err() error
	Next() bool
	Scan(v ...any) error
}

func getTaggedFieldValueMap(v reflect.Value) (map[string]any, error) {
	rt := mapping.Deref(v.Type())
	size := rt.NumField()
	result := make(map[string]any, size)

	for i := 0; i < size; i++ {
		key := parseTagName(rt.Field(i))
		if len(key) == 0 {
			return nil, nil
		}

		valueField := reflect.Indirect(v).Field(i)
		switch valueField.Kind() {
		case reflect.Ptr:
			if !valueField.CanInterface() {
				return nil, ErrNotReadableValue
			}
			if valueField.IsNil() {
				baseValueType := mapping.Deref(valueField.Type())
				valueField.Set(reflect.New(baseValueType))
			}
			result[key] = valueField.Interface()
		default:
			if !valueField.CanAddr() || !valueField.Addr().CanInterface() {
				return nil, ErrNotReadableValue
			}
			result[ke
    
func unmarshalRows(v any, scanner rowsScanner, strict bool) error {
	rv := reflect.ValueOf(v)
	if err := mapping.ValidatePtr(rv); err != nil {
		return err
	}

	rt := reflect.TypeOf(v)
	rte := rt.Elem()
	rve := rv.Elem()
	switch rte.Kind() {
	case reflect.Slice:
		if rve.CanSet() {
			ptr := rte.Elem().Kind() == reflect.Ptr
			appendFn := func(item reflect.Value) {
				if ptr {
					rve.Set(reflect.Append(rve, item))
				} else {
					rve.Set(reflect.Append(rve, reflect.Indirect(item)))
				}
			}
			fillFn := func(value any) error {
				if rve.CanSet() {
					if err := scanner.Scan(value); err != nil {
						return err
					}

					appendFn(reflect.ValueOf(value))
					return nil
				}
				return ErrNotSettable
			}

			base := mapping.Deref(rte.Elem())
			switch base.Kind() {
			case reflect.Bool,
				reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
				reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
				reflect.Float32, reflect.Float64,
				reflect.String:
				for scanner.Next() {
					value := reflect.New(base)
					if err := fillFn(value.Interface()); err != nil {
						return err
					}
				}
			case reflect.Struct:
				columns, err := scanner.Columns()
				if err != nil {
					return err
				}

				for scanner.Next() {
					value := reflect.New(base)
					values, err := mapStructFieldsIntoSlice(value, columns, strict)
					if err != nil {
						return err
					}

					if err := scanner.Scan(values...); err != nil {
						return err
					}

					appendFn(value)
				}
			default:
				return ErrUnsupportedValueType
			}

			return nil
		}

		return ErrNotSettable
	default:
		return ErrUnsupportedValueType
	}
}