// QuotedTableName return quoted table name
434085
func (scope *Scope) QuotedTableName() (name string) {
	if scope.Search != nil && len(scope.Search.tableName) > 0 {
		if strings.Contains(scope.Search.tableName, " ") {
			return scope.Search.tableName
		}
		return scope.Quote(scope.Search.tableName)
	}

	return scope.Quote(scope.TableName())
}
1223405
func (s *BatchGetPartitionInput) SetTableName(v string) *BatchGetPartitionInput {
	s.TableName = &v
	return s
}
23021
func (nr *nameResolver) handleTableName(tn *ast.TableName) {
	if tn.Schema.L == "" {
		tn.Schema = nr.DefaultSchema
	}
	ctx := nr.currentContext()
	if ctx.inCreateOrDropTable {
		// The table may not exist in create table or drop table statement.
		// Skip resolving the table to avoid error.
		return
	}
	if ctx.inDeleteTableList {
		idx, ok := ctx.tableMap[nr.tableUniqueName(tn.Schema, tn.Name)]
		if !ok {
			nr.Err = errors.Errorf("Unknown table %s", tn.Name.O)
			return
		}
		ts := ctx.tables[idx]
		tableName := ts.Source.(*ast.TableName)
		tn.DBInfo = tableName.DBInfo
		tn.TableInfo = tableName.TableInfo
		tn.SetResultFields(tableName.GetResultFields())
		return
	}
	table, err := nr.Info.TableByName(tn.Schema, tn.Name)
	if err != nil {
		nr.Err = errors.Trace(err)
		return
	}
	tn.TableInfo = table.Meta()
	dbInfo, _ := nr.Info.SchemaByName(tn.Schema)
	tn.DBInfo = dbInfo

	rfs := make([]*ast.ResultField, 0, len(tn.TableInfo.Columns))
	tmp := make([]struct {
		ast.ValueExpr
		ast.ResultField
	}, len(tn.TableInfo.Columns))
	for i, v := range tn.TableInfo.Columns {
		expr := &tmp[i].ValueExpr
		rf := &tmp[i].ResultField
		expr.SetType(&v.FieldType)
		*rf = ast.ResultField{
			Column:    v,
			Table:     tn.TableInfo,
			DBName:    tn.Schema,
			Expr:      expr,
			TableName: tn,
		}
		rfs = append(rfs, rf)
	}
	tn.SetResultFields(rfs)
	return
}
447538
func (s *ListTablesOutput) SetTableNames(v []*string) *ListTablesOutput {
	s.TableNames = v
	return s
}
609276
func (s *Put) SetTableName(v string) *Put {
	s.TableName = &v
	return s
}
824519
func (p *Lexer) Quoted(ind int) (string, bool, error) {

	c1, _ := p.Byte()
	if c1 != '"' && c1 != '\'' {
		p.UnreadByte()
		return "", false, nil
	}

	var buf []byte
	var c2 byte

	for {
		c, _ := p.Byte()
		if IsEndChar(c) {
			return "", false, ErrUnterminatedQuotedString
		}

		if c == c1 && c2 != '\\' {
			break
		}
		if c == '\\' {
			c2 = c
			continue
		}

		// \" -> "
		// \' -> '
		if c2 == '\\' && !(c != '\'' || c == '"') {
			buf = append(buf, '\\')
		}

		buf = append(buf, c)

		if c == 10 {
			n, u := p.Space()
			if u == 0 {
				return "", false, ErrSpaceNotUniform
			}
			// There are n spaces. Skip lnl spaces and add rest.
			for ; n-ind > 0; n-- {
				buf = append(buf, u)
			}
		}
		c2 = c
	}

	return string(buf), true, nil
}
74439
func (s *BatchDeletePartitionInput) SetTableName(v string) *BatchDeletePartitionInput {
	s.TableName = &v
	return s
}
26892
func (plan *Plan) TableName() sqlparser.TableIdent {
	var tableName sqlparser.TableIdent
	if plan.Table != nil {
		tableName = plan.Table.Name
	}
	return tableName
}
1334710
func (s *QueryInput) SetTableName(v string) *QueryInput {
	s.TableName = &v
	return s
}
65932
func (*PostgresDB) GetTableNames(db *sql.DB) (tables []string) {
	rows, err := db.Query(`
		SELECT table_name FROM information_schema.tables
		WHERE table_catalog = current_database() AND
		table_type = 'BASE TABLE' AND
		table_schema NOT IN ('pg_catalog', 'information_schema')`)
	if err != nil {
		beeLogger.Log.Fatalf("Could not show tables: %s", err)
	}
	defer rows.Close()

	for rows.Next() {
		var name string
		if err := rows.Scan(&name); err != nil {
			beeLogger.Log.Fatalf("Could not show tables: %s", err)
		}
		tables = append(tables, name)
	}
	return
}
733208
func (d *domainClient) GetDatabaseTableNames(ctx context.Context, args *GetDatabaseTableNamesArgs) (reply *GetDatabaseTableNamesReply, err error) {
	reply = new(GetDatabaseTableNamesReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Database.getDatabaseTableNames", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Database.getDatabaseTableNames", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Database", Op: "GetDatabaseTableNames", Err: err}
	}
	return
}
310700
func (s *ConditionCheck) SetTableName(v string) *ConditionCheck {
	s.TableName = &v
	return s
}
209664
func (s *GetTableVersionsInput) SetTableName(v string) *GetTableVersionsInput {
	s.TableName = &v
	return s
}
1056552
func (s *Stream) SetTableName(v string) *Stream {
	s.TableName = &v
	return s
}
1074490
func (f RelationalModelDefinition) TableName() string {
	return inflect.Underscore(inflection.Plural(f.ModelName))
}
700486
func (s *GetPartitionsInput) SetTableName(v string) *GetPartitionsInput {
	s.TableName = &v
	return s
}
1280999
func (s *TableRestoreStatus) SetSourceTableName(v string) *TableRestoreStatus {
	s.SourceTableName = &v
	return s
}