// NewUpdatesQueryBuilder creates a new UpdatesQueryBuilder.
357882
func NewUpdatesQueryBuilder(dbName string, td *tabletmanagerdatapb.TableDefinition) *UpdatesQueryBuilder {
	// Example: UPDATE test SET msg='a' WHERE id=0 AND sub_id=10
	//
	// Note: We cannot use INSERT INTO ... ON DUPLICATE KEY UPDATE here because
	// it's not recommended for tables with more than one unique (i.e. the
	// primary key) index. That's because the update function would also be
	// triggered if a unique, non-primary key index matches the row. In that
	// case, we would update the wrong row (it gets selected by the unique key
	// and not the primary key).
	return &UpdatesQueryBuilder{
		BaseQueryBuilder: BaseQueryBuilder{
			head: "UPDATE " + sqlescape.EscapeID(dbName) + "." + sqlescape.EscapeID(td.Name) + " SET ",
		},
		td: td,
		// Build list of non-primary key columns (required for update statements).
		nonPrimaryKeyColumns: orderedColumnsWithoutPrimaryKeyColumns(td),
	}
}
195419
func NewConnectionStringBuilder(endpoint, region, dbUser, dbName string, creds *credentials.Credentials) ConnectionStringBuilder {
	return ConnectionStringBuilder{
		dbName:   dbName,
		endpoint: endpoint,
		region:   region,
		user:     dbUser,
		creds:    creds,
	}
}
218058
func (c Client) UpdateBuild(ctx context.Context, build *buildv1.Build) error {
	_, err := c.Builds.Builds(apirequest.NamespaceValue(ctx)).Update(build)
	return err
}
134509
func (db *Database) commonCreateUpdate(value DBModel, builder func() string) error {
	defer db.clear()
	// if Model has been called, skip table name inference procedure
	if len(db.tables) == 0 {
		db.tables = append(db.tables, handleIdentifier(value.TableName()))
		db.models = append(db.models, value)
	}

	in := getStruct(value)
	// getFields handle anonymous nested fields
	fields := getFields(value)

	for _, structField := range fields {
		field := in.FieldByName(structField.Name)
		if value := fieldValue(field, structField); value != nil {
			db.updateCreateFields = append(db.updateCreateFields, getColumnName(structField))
			db.updateCreateValues = append(db.updateCreateValues, value)
		}
	}

	// Compile query
	var stmt *sql.Stmt
	var err error
	if stmt, err = db.db.Prepare(builder()); err != nil {
		return err
	}

	// Pass query parameters and executes the query
	// set db.rawRows to query results (of returning) in order to make it possible to scan rows into result
	if db.rawRows, err = stmt.Query(append(db.updateCreateValues, db.whereValues...)...); err != nil {
		return err
	}
	if err = db.Scan(value); err != nil {
		panic(err)
	}
	return nil
}
794257
func (s *RoleService) NewUpdateRoleParams(id string) *UpdateRoleParams {
	p := &UpdateRoleParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
690431
func newAEBackupInformationQueryBuilderWithKind(kind string) *aeBackupInformationQueryBuilder {
	q := datastore.NewQuery(kind)
	bldr := &aeBackupInformationQueryBuilder{q: q}
	bldr.Kind = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "Kind",
	}
	bldr.ID = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "__key__",
	}
	bldr.ActiveJobs = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "active_jobs",
	}
	bldr.CompleteTime = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "complete_time",
	}
	bldr.CompletedJobs = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "completed_jobs",
	}
	bldr.Destination = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "destination",
	}
	bldr.Filesystem = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "filesystem",
	}
	bldr.GSHandle = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "gs_handle",
	}
	bldr.Kinds = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "kinds",
	}
	bldr.Name = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "name",
	}
	bldr.OriginalApp = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "original_app",
	}
	bldr.StartTime = &aeBackupInformationQueryProperty{
		bldr: bldr,
		name: "start_time",
	}

	if plugger, ok := interface{}(bldr).(Plugger); ok {
		bldr.plugin = plugger.Plugin()
		bldr.plugin.Init("AEBackupInformation")
	}

	return bldr
}
93714
func (t *Table) SelectBuilder(columns ...string) *qb.SelectBuilder {
	return qb.Select(t.metadata.Name).Columns(columns...).Where(t.partKeyCmp...)
}
89021
func NewBuilder(opts Options) (*Builder, error) {
	opts.SetDefaults()
	if opts.RepositoryDescription.Name == "" {
		return nil, fmt.Errorf("builder: must set Name")
	}

	b := &Builder{
		opts:           opts,
		throttle:       make(chan int, opts.Parallelism),
		finishedShards: map[string]string{},
	}

	if b.opts.CTags == "" && b.opts.CTagsMustSucceed {
		return nil, fmt.Errorf("ctags binary not found, but CTagsMustSucceed set")
	}

	if strings.Contains(opts.CTags, "universal-ctags") {
		parser, err := ctags.NewParser(opts.CTags)
		if err != nil && opts.CTagsMustSucceed {
			return nil, fmt.Errorf("ctags.NewParser: %v", err)
		}

		b.parser = parser
	}
	if _, err := b.newShardBuilder(); err != nil {
		return nil, err
	}

	return b, nil
}
285287
func NewBuilderID(v1Bucket, builder string) (bid BuilderID) {
	bid.Project, bid.Bucket = deprecated.BucketNameToV2(v1Bucket)
	bid.Builder = builder
	return
}
1149801
func NewBuilder(w *Watcher, r *Runner) *Builder {
	return &Builder{watcher: w, runner: r}
}
748735
func (me *DefaultAdapter) UpdateExpressionSql(buf *SqlBuilder, update UpdateExpression) error {
	if err := me.Literal(buf, update.Col()); err != nil {
		return err
	}
	buf.WriteRune(me.SetOperatorRune)
	return me.Literal(buf, update.Val())
}
328022
func NewUpdateOne(ctx *middleware.Context, handler UpdateOneHandler) *UpdateOne {
	return &UpdateOne{Context: ctx, Handler: handler}
}
620717
func NewUpdateTenant(config tenantConfig) func(context.Context) error {
	return func(ctx context.Context) error {
		return UpdateTenant(ctx, config)
	}
}
508380
func NewStandardBuilder(db *DB, executor Executor) Builder {
	return &StandardBuilder{
		NewBaseBuilder(db, executor),
		NewBaseQueryBuilder(db),
	}
}
294546
func (sess *Session) UpdateBySql(query string, value ...interface{}) *UpdateStmt {
	b := UpdateBySql(query, value...)
	b.runner = sess
	b.EventReceiver = sess.EventReceiver
	b.Dialect = sess.Dialect
	return b
}
224109
func newBuilder(w io.Writer, opts *BuilderOpts) (*Builder, error) {
	if opts == nil {
		opts = defaultBuilderOpts
	}
	builderNodePool := &builderNodePool{}
	rv := &Builder{
		unfinished:      newUnfinishedNodes(builderNodePool),
		registry:        newRegistry(builderNodePool, opts.RegistryTableSize, opts.RegistryMRUSize),
		builderNodePool: builderNodePool,
		opts:            opts,
		lastAddr:        noneAddr,
	}

	var err error
	rv.encoder, err = loadEncoder(opts.Encoder, w)
	if err != nil {
		return nil, err
	}
	err = rv.encoder.start()
	if err != nil {
		return nil, err
	}
	return rv, nil
}
266560
func NewEmptyBuilder() *Builder {
	return &Builder{
		mu:       &sync.RWMutex{},
		hookEnvs: map[string]map[string]string{},
		envvars:  make(map[string]string),
	}
}