// QuoteTo quotes the table or column names. i.e. if the quotes are [ and ]
//   name -> [name]
//   `name` -> [name]
//   [name] -> [name]
//   schema.name -> [schema].[name]
//   `schema`.`name` -> [schema].[name]
//   `schema`.name -> [schema].[name]
//   schema.`name` -> [schema].[name]
//   [schema].name -> [schema].[name]
//   schema.[name] -> [schema].[name]
//   name AS a  ->  [name] AS a
//   schema.name AS a  ->  [schema].[name] AS a
QuoteTo quotes the table or column names. i.e.
// QuoteTo quotes the table or column names . i . e . if the quotes are [ and ] // name - > [ name ] // ` name ` - > [ name ] // [ name ] - > [ name ] // schema . name - > [ schema ] . [ name ] // ` schema ` . ` name ` - > [ schema ] . [ name ] // ` schema ` . name - > [ schema ] . [ name ] // schema . ` name ` - > [ schema ] . [ name ] // [ schema ] . name - > [ schema ] . [ name ] // schema . [ name ] - > [ schema ] . [ name ] // name AS a - > [ name ] AS a // schema . name AS a - > [ schema ] . [ name ] AS a
func (q Quoter) QuoteTo(buf *strings.Builder, value string) error {
	var i int
	for i < len(value) {
		start := findStart(value, i)
		if start > i {
			if _, err := buf.WriteString(value[i:start]); err != nil {
				return err
			}
		}
		if start == len(value) {
			return nil
		}
		var nextEnd = findWord(value, start)
		if err := q.quoteWordTo(buf, value[start:nextEnd]); err != nil {
			return err
		}
		i = nextEnd
	}
	return nil
}
func ( q Quoter ) QuoteTo ( buf * strings . Builder , value string ) error { var i int for i < len ( value ) { start := findStart ( value , i ) if start > i { if _ , err := buf . WriteString ( value [ i : start ] ) ; err != nil { return err } } if start == len ( value ) { return nil } var nextEnd = findWord ( value , start ) if err := q . quoteWordTo ( buf , value [ start : nextEnd ] ) ; err != nil { return err } i = nextEnd } return nil }
QuoteTo quotes the table or column names.
QuoteTo quotes the table or column names .