func (t *Translator) Sort(fields []string) (bson.D, error) {
	doc := Sort(fields...)
	err := t.value(doc, false)
	if err != nil {
		return nil, err
	}
	return doc, nil
}
Sort will convert the provided sort array to a sort document and translate
all field names to refer to known database fields.
package coal
import (
	"strings"
	"github.com/256dpi/lungo/bsonkit"
	"github.com/256dpi/xo"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/bson/primitive"
)
var unsafeOperators = map[string]bool{
	"$expr":       true,
	"$jsonSchema": true,
	"$where":      true,
	"$elemMatch":  true,
	"$rename": true,
}
var systemFields = map[string]bool{
	"_id": true,
	"_lk": true,
}
type Translator struct {
	meta *Meta
}
func NewTranslator(model Model) *Translator {
	return &Translator{
		meta: GetMeta(model),
	}
}
func (t *Translator) Field(field string) (string, error) {
	err := t.field(&field)
	if err != nil {
		return "", err
	}
	return field, nil
}
func (t *Translator) Document(query bson.M) (bson.D, error) {
	doc, err := t.convert(query)
	if err != nil {
		return nil, err
	}
	err = t.value(doc, false)
	if err != nil {
		return nil, err
	}
	return doc, err
}