// Desc provide desc order by query condition, the input parameters are columns.
511615
func (session *Session) Desc(colNames ...string) *Session {
	session.statement.Desc(colNames...)
	return session
}
840731
func (b *SearchRequestBuilder) SortDesc(field, unmappedType string) *SearchRequestBuilder {
	props := map[string]string{
		"order": "desc",
	}

	if unmappedType != "" {
		props["unmapped_type"] = unmappedType
	}

	b.sort[field] = props

	return b
}
1034970
func (rows *OCI8Rows) Columns() []string {
	names := make([]string, len(rows.defines))
	for i, define := range rows.defines {
		names[i] = define.name
	}
	return names
}
788306
func (qb *MySQLQueryBuilder) Desc() QueryBuilder {
	qb.Tokens = append(qb.Tokens, "DESC")
	return qb
}
724523
func (m Mat3x4) Cols() (col0, col1, col2, col3 Vec3) {
	return m.Col(0), m.Col(1), m.Col(2), m.Col(3)
}
1198
func (q *Query) Select(fields ...string) *Query {
	for _, f := range fields {
		if strings.TrimSpace(f) != "" {
			q.addColumns = append(q.addColumns, f)
		}
	}
	return q
}
915619
func (m SessionMock) Columns(keyspace, table string) (map[string]gocql.TypeInfo, error) {
	var r = m.Called(keyspace, table)

	return r.Get(0).(map[string]gocql.TypeInfo), r.Error(1)
}
769008
func (r *Row) StructScan(dest interface{}) error {
	if r.err != nil {
		return r.err
	}

	defer r.rows.Close()

	if !r.rows.Next() {
		if err := r.rows.Err(); err != nil {
			return err
		}
		return sql.ErrNoRows
	}
	if err := r.rows.StructScan(dest); err != nil {
		return err
	}
	// Make sure the query can be processed to completion with no errors.
	return r.rows.Close()
}
1325680
func (e *ExtensionDescriptor) DescName() string {
	// The full type name.
	typeName := e.TypeName()
	// Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix.
	for i, s := range typeName {
		typeName[i] = CamelCase(s)
	}
	return "E_" + strings.Join(typeName, "_")
}
9246
func (t *Table) C(cols ...string) ValExprBuilder {
	if len(cols) == 0 {
		return ValExprBuilder{makeErrVal("no columns specified")}
	}

	if len(cols) == 1 {
		name := cols[0]
		if _, ok := t.ColumnMap[name]; !ok {
			return ValExprBuilder{makeErrVal("unknown column: %s", name)}
		}
		return ValExprBuilder{&ColName{Name: name, Qualifier: t.aliasOrName()}}
	}
	list := make([]interface{}, len(cols))
	for i, name := range cols {
		if _, ok := t.ColumnMap[name]; !ok {
			list[i] = makeErrVal("unknown column: %s", name)
		} else {
			list[i] = &ColName{Name: name, Qualifier: t.aliasOrName()}
		}
	}
	return ValExprBuilder{makeValTuple(list)}
}
325837
func (d *Database) Columns(src interface{}, includePk bool) ([]string, error) {
	data, err := getFields(reflect.TypeOf(src))
	if err != nil {
		return nil, err
	}

	var names []string
	for _, elt := range data.columns {
		if !includePk && elt == data.pk {
			continue
		}
		names = append(names, elt)
	}

	return names, nil
}
890101
func (q Query) ToSQL(model *Model, addColumns ...string) (string, []interface{}) {
	sb := q.toSQLBuilder(model, addColumns...)
	return sb.String(), sb.Args()
}
72764
func SortOrderToSql(sortOrder []*SortOrder, allowedFields []Field) (sql string) {
	b := newQueryBuilder(allowedFields)

	for i, so := range sortOrder {
		if i > 0 {
			b.AppendSql(",")
		}

		b.AppendId(so.Field)

		if !so.Ascending {
			b.AppendSql(" DESC")
		}
	}

	return b.Sql()
}
30392
func BuildDesc(tt TT) string {
	desc := tt.Function
	if tt.Details != "" {
		desc = desc + ": " + tt.Details
	}
	if tt.Service != "" {
		desc = tt.Service + ": " + desc
	}
	return desc
}
1090841
func (session *Session) Cols(columns ...string) *Session {
	session.statement.Cols(columns...)
	return session
}
192994
func ParseQuery(query string) (OrderedValues, error) {
	ov := OrderedValues{}
	for query != "" {
		if err := parseQuery(&ov, &query); err != nil {
			return nil, err
		}
	}
	return ov, nil
}
741728
func (d *LogDatastore) Query(q dsq.Query) (dsq.Results, error) {
	log.Printf("%s: Query\n", d.Name)
	log.Printf("%s: q.Prefix: %s\n", d.Name, q.Prefix)
	log.Printf("%s: q.KeysOnly: %v\n", d.Name, q.KeysOnly)
	log.Printf("%s: q.Filters: %d\n", d.Name, len(q.Filters))
	log.Printf("%s: q.Orders: %d\n", d.Name, len(q.Orders))
	log.Printf("%s: q.Offset: %d\n", d.Name, q.Offset)

	return d.child.Query(q)
}