| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745 |
- // Code generated by ent, DO NOT EDIT.
- package ent
- import (
- "context"
- "errors"
- "fmt"
- "time"
- "entgo.io/ent/dialect/sql"
- "entgo.io/ent/dialect/sql/sqlgraph"
- "entgo.io/ent/schema/field"
- "github.com/Wei-Shaw/sub2api/ent/batchimageitem"
- )
- // BatchImageItemCreate is the builder for creating a BatchImageItem entity.
- type BatchImageItemCreate struct {
- config
- mutation *BatchImageItemMutation
- hooks []Hook
- conflict []sql.ConflictOption
- }
- // SetJobID sets the "job_id" field.
- func (_c *BatchImageItemCreate) SetJobID(v string) *BatchImageItemCreate {
- _c.mutation.SetJobID(v)
- return _c
- }
- // SetCustomID sets the "custom_id" field.
- func (_c *BatchImageItemCreate) SetCustomID(v string) *BatchImageItemCreate {
- _c.mutation.SetCustomID(v)
- return _c
- }
- // SetStatus sets the "status" field.
- func (_c *BatchImageItemCreate) SetStatus(v string) *BatchImageItemCreate {
- _c.mutation.SetStatus(v)
- return _c
- }
- // SetRequestHash sets the "request_hash" field.
- func (_c *BatchImageItemCreate) SetRequestHash(v string) *BatchImageItemCreate {
- _c.mutation.SetRequestHash(v)
- return _c
- }
- // SetNillableRequestHash sets the "request_hash" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableRequestHash(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetRequestHash(*v)
- }
- return _c
- }
- // SetPromptPreview sets the "prompt_preview" field.
- func (_c *BatchImageItemCreate) SetPromptPreview(v string) *BatchImageItemCreate {
- _c.mutation.SetPromptPreview(v)
- return _c
- }
- // SetNillablePromptPreview sets the "prompt_preview" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillablePromptPreview(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetPromptPreview(*v)
- }
- return _c
- }
- // SetProviderSourceObject sets the "provider_source_object" field.
- func (_c *BatchImageItemCreate) SetProviderSourceObject(v string) *BatchImageItemCreate {
- _c.mutation.SetProviderSourceObject(v)
- return _c
- }
- // SetNillableProviderSourceObject sets the "provider_source_object" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableProviderSourceObject(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetProviderSourceObject(*v)
- }
- return _c
- }
- // SetSourceLineNumber sets the "source_line_number" field.
- func (_c *BatchImageItemCreate) SetSourceLineNumber(v int) *BatchImageItemCreate {
- _c.mutation.SetSourceLineNumber(v)
- return _c
- }
- // SetNillableSourceLineNumber sets the "source_line_number" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableSourceLineNumber(v *int) *BatchImageItemCreate {
- if v != nil {
- _c.SetSourceLineNumber(*v)
- }
- return _c
- }
- // SetSourceByteOffset sets the "source_byte_offset" field.
- func (_c *BatchImageItemCreate) SetSourceByteOffset(v int64) *BatchImageItemCreate {
- _c.mutation.SetSourceByteOffset(v)
- return _c
- }
- // SetNillableSourceByteOffset sets the "source_byte_offset" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableSourceByteOffset(v *int64) *BatchImageItemCreate {
- if v != nil {
- _c.SetSourceByteOffset(*v)
- }
- return _c
- }
- // SetSourceByteLength sets the "source_byte_length" field.
- func (_c *BatchImageItemCreate) SetSourceByteLength(v int64) *BatchImageItemCreate {
- _c.mutation.SetSourceByteLength(v)
- return _c
- }
- // SetNillableSourceByteLength sets the "source_byte_length" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableSourceByteLength(v *int64) *BatchImageItemCreate {
- if v != nil {
- _c.SetSourceByteLength(*v)
- }
- return _c
- }
- // SetMimeType sets the "mime_type" field.
- func (_c *BatchImageItemCreate) SetMimeType(v string) *BatchImageItemCreate {
- _c.mutation.SetMimeType(v)
- return _c
- }
- // SetNillableMimeType sets the "mime_type" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableMimeType(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetMimeType(*v)
- }
- return _c
- }
- // SetFileExtension sets the "file_extension" field.
- func (_c *BatchImageItemCreate) SetFileExtension(v string) *BatchImageItemCreate {
- _c.mutation.SetFileExtension(v)
- return _c
- }
- // SetNillableFileExtension sets the "file_extension" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableFileExtension(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetFileExtension(*v)
- }
- return _c
- }
- // SetImageCount sets the "image_count" field.
- func (_c *BatchImageItemCreate) SetImageCount(v int) *BatchImageItemCreate {
- _c.mutation.SetImageCount(v)
- return _c
- }
- // SetNillableImageCount sets the "image_count" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableImageCount(v *int) *BatchImageItemCreate {
- if v != nil {
- _c.SetImageCount(*v)
- }
- return _c
- }
- // SetErrorCode sets the "error_code" field.
- func (_c *BatchImageItemCreate) SetErrorCode(v string) *BatchImageItemCreate {
- _c.mutation.SetErrorCode(v)
- return _c
- }
- // SetNillableErrorCode sets the "error_code" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableErrorCode(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetErrorCode(*v)
- }
- return _c
- }
- // SetErrorMessage sets the "error_message" field.
- func (_c *BatchImageItemCreate) SetErrorMessage(v string) *BatchImageItemCreate {
- _c.mutation.SetErrorMessage(v)
- return _c
- }
- // SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableErrorMessage(v *string) *BatchImageItemCreate {
- if v != nil {
- _c.SetErrorMessage(*v)
- }
- return _c
- }
- // SetBilledAmount sets the "billed_amount" field.
- func (_c *BatchImageItemCreate) SetBilledAmount(v float64) *BatchImageItemCreate {
- _c.mutation.SetBilledAmount(v)
- return _c
- }
- // SetNillableBilledAmount sets the "billed_amount" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableBilledAmount(v *float64) *BatchImageItemCreate {
- if v != nil {
- _c.SetBilledAmount(*v)
- }
- return _c
- }
- // SetCreatedAt sets the "created_at" field.
- func (_c *BatchImageItemCreate) SetCreatedAt(v time.Time) *BatchImageItemCreate {
- _c.mutation.SetCreatedAt(v)
- return _c
- }
- // SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableCreatedAt(v *time.Time) *BatchImageItemCreate {
- if v != nil {
- _c.SetCreatedAt(*v)
- }
- return _c
- }
- // SetIndexedAt sets the "indexed_at" field.
- func (_c *BatchImageItemCreate) SetIndexedAt(v time.Time) *BatchImageItemCreate {
- _c.mutation.SetIndexedAt(v)
- return _c
- }
- // SetNillableIndexedAt sets the "indexed_at" field if the given value is not nil.
- func (_c *BatchImageItemCreate) SetNillableIndexedAt(v *time.Time) *BatchImageItemCreate {
- if v != nil {
- _c.SetIndexedAt(*v)
- }
- return _c
- }
- // Mutation returns the BatchImageItemMutation object of the builder.
- func (_c *BatchImageItemCreate) Mutation() *BatchImageItemMutation {
- return _c.mutation
- }
- // Save creates the BatchImageItem in the database.
- func (_c *BatchImageItemCreate) Save(ctx context.Context) (*BatchImageItem, error) {
- _c.defaults()
- return withHooks(ctx, _c.sqlSave, _c.mutation, _c.hooks)
- }
- // SaveX calls Save and panics if Save returns an error.
- func (_c *BatchImageItemCreate) SaveX(ctx context.Context) *BatchImageItem {
- v, err := _c.Save(ctx)
- if err != nil {
- panic(err)
- }
- return v
- }
- // Exec executes the query.
- func (_c *BatchImageItemCreate) Exec(ctx context.Context) error {
- _, err := _c.Save(ctx)
- return err
- }
- // ExecX is like Exec, but panics if an error occurs.
- func (_c *BatchImageItemCreate) ExecX(ctx context.Context) {
- if err := _c.Exec(ctx); err != nil {
- panic(err)
- }
- }
- // defaults sets the default values of the builder before save.
- func (_c *BatchImageItemCreate) defaults() {
- if _, ok := _c.mutation.ImageCount(); !ok {
- v := batchimageitem.DefaultImageCount
- _c.mutation.SetImageCount(v)
- }
- if _, ok := _c.mutation.CreatedAt(); !ok {
- v := batchimageitem.DefaultCreatedAt()
- _c.mutation.SetCreatedAt(v)
- }
- }
- // check runs all checks and user-defined validators on the builder.
- func (_c *BatchImageItemCreate) check() error {
- if _, ok := _c.mutation.JobID(); !ok {
- return &ValidationError{Name: "job_id", err: errors.New(`ent: missing required field "BatchImageItem.job_id"`)}
- }
- if v, ok := _c.mutation.JobID(); ok {
- if err := batchimageitem.JobIDValidator(v); err != nil {
- return &ValidationError{Name: "job_id", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.job_id": %w`, err)}
- }
- }
- if _, ok := _c.mutation.CustomID(); !ok {
- return &ValidationError{Name: "custom_id", err: errors.New(`ent: missing required field "BatchImageItem.custom_id"`)}
- }
- if v, ok := _c.mutation.CustomID(); ok {
- if err := batchimageitem.CustomIDValidator(v); err != nil {
- return &ValidationError{Name: "custom_id", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.custom_id": %w`, err)}
- }
- }
- if _, ok := _c.mutation.Status(); !ok {
- return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "BatchImageItem.status"`)}
- }
- if v, ok := _c.mutation.Status(); ok {
- if err := batchimageitem.StatusValidator(v); err != nil {
- return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.status": %w`, err)}
- }
- }
- if v, ok := _c.mutation.RequestHash(); ok {
- if err := batchimageitem.RequestHashValidator(v); err != nil {
- return &ValidationError{Name: "request_hash", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.request_hash": %w`, err)}
- }
- }
- if v, ok := _c.mutation.ProviderSourceObject(); ok {
- if err := batchimageitem.ProviderSourceObjectValidator(v); err != nil {
- return &ValidationError{Name: "provider_source_object", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.provider_source_object": %w`, err)}
- }
- }
- if v, ok := _c.mutation.MimeType(); ok {
- if err := batchimageitem.MimeTypeValidator(v); err != nil {
- return &ValidationError{Name: "mime_type", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.mime_type": %w`, err)}
- }
- }
- if v, ok := _c.mutation.FileExtension(); ok {
- if err := batchimageitem.FileExtensionValidator(v); err != nil {
- return &ValidationError{Name: "file_extension", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.file_extension": %w`, err)}
- }
- }
- if _, ok := _c.mutation.ImageCount(); !ok {
- return &ValidationError{Name: "image_count", err: errors.New(`ent: missing required field "BatchImageItem.image_count"`)}
- }
- if v, ok := _c.mutation.ErrorCode(); ok {
- if err := batchimageitem.ErrorCodeValidator(v); err != nil {
- return &ValidationError{Name: "error_code", err: fmt.Errorf(`ent: validator failed for field "BatchImageItem.error_code": %w`, err)}
- }
- }
- if _, ok := _c.mutation.CreatedAt(); !ok {
- return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "BatchImageItem.created_at"`)}
- }
- return nil
- }
- func (_c *BatchImageItemCreate) sqlSave(ctx context.Context) (*BatchImageItem, error) {
- if err := _c.check(); err != nil {
- return nil, err
- }
- _node, _spec := _c.createSpec()
- if err := sqlgraph.CreateNode(ctx, _c.driver, _spec); err != nil {
- if sqlgraph.IsConstraintError(err) {
- err = &ConstraintError{msg: err.Error(), wrap: err}
- }
- return nil, err
- }
- id := _spec.ID.Value.(int64)
- _node.ID = int64(id)
- _c.mutation.id = &_node.ID
- _c.mutation.done = true
- return _node, nil
- }
- func (_c *BatchImageItemCreate) createSpec() (*BatchImageItem, *sqlgraph.CreateSpec) {
- var (
- _node = &BatchImageItem{config: _c.config}
- _spec = sqlgraph.NewCreateSpec(batchimageitem.Table, sqlgraph.NewFieldSpec(batchimageitem.FieldID, field.TypeInt64))
- )
- _spec.OnConflict = _c.conflict
- if value, ok := _c.mutation.JobID(); ok {
- _spec.SetField(batchimageitem.FieldJobID, field.TypeString, value)
- _node.JobID = value
- }
- if value, ok := _c.mutation.CustomID(); ok {
- _spec.SetField(batchimageitem.FieldCustomID, field.TypeString, value)
- _node.CustomID = value
- }
- if value, ok := _c.mutation.Status(); ok {
- _spec.SetField(batchimageitem.FieldStatus, field.TypeString, value)
- _node.Status = value
- }
- if value, ok := _c.mutation.RequestHash(); ok {
- _spec.SetField(batchimageitem.FieldRequestHash, field.TypeString, value)
- _node.RequestHash = &value
- }
- if value, ok := _c.mutation.PromptPreview(); ok {
- _spec.SetField(batchimageitem.FieldPromptPreview, field.TypeString, value)
- _node.PromptPreview = &value
- }
- if value, ok := _c.mutation.ProviderSourceObject(); ok {
- _spec.SetField(batchimageitem.FieldProviderSourceObject, field.TypeString, value)
- _node.ProviderSourceObject = &value
- }
- if value, ok := _c.mutation.SourceLineNumber(); ok {
- _spec.SetField(batchimageitem.FieldSourceLineNumber, field.TypeInt, value)
- _node.SourceLineNumber = &value
- }
- if value, ok := _c.mutation.SourceByteOffset(); ok {
- _spec.SetField(batchimageitem.FieldSourceByteOffset, field.TypeInt64, value)
- _node.SourceByteOffset = &value
- }
- if value, ok := _c.mutation.SourceByteLength(); ok {
- _spec.SetField(batchimageitem.FieldSourceByteLength, field.TypeInt64, value)
- _node.SourceByteLength = &value
- }
- if value, ok := _c.mutation.MimeType(); ok {
- _spec.SetField(batchimageitem.FieldMimeType, field.TypeString, value)
- _node.MimeType = &value
- }
- if value, ok := _c.mutation.FileExtension(); ok {
- _spec.SetField(batchimageitem.FieldFileExtension, field.TypeString, value)
- _node.FileExtension = &value
- }
- if value, ok := _c.mutation.ImageCount(); ok {
- _spec.SetField(batchimageitem.FieldImageCount, field.TypeInt, value)
- _node.ImageCount = value
- }
- if value, ok := _c.mutation.ErrorCode(); ok {
- _spec.SetField(batchimageitem.FieldErrorCode, field.TypeString, value)
- _node.ErrorCode = &value
- }
- if value, ok := _c.mutation.ErrorMessage(); ok {
- _spec.SetField(batchimageitem.FieldErrorMessage, field.TypeString, value)
- _node.ErrorMessage = &value
- }
- if value, ok := _c.mutation.BilledAmount(); ok {
- _spec.SetField(batchimageitem.FieldBilledAmount, field.TypeFloat64, value)
- _node.BilledAmount = &value
- }
- if value, ok := _c.mutation.CreatedAt(); ok {
- _spec.SetField(batchimageitem.FieldCreatedAt, field.TypeTime, value)
- _node.CreatedAt = value
- }
- if value, ok := _c.mutation.IndexedAt(); ok {
- _spec.SetField(batchimageitem.FieldIndexedAt, field.TypeTime, value)
- _node.IndexedAt = &value
- }
- return _node, _spec
- }
- // OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
- // of the `INSERT` statement. For example:
- //
- // client.BatchImageItem.Create().
- // SetJobID(v).
- // OnConflict(
- // // Update the row with the new values
- // // the was proposed for insertion.
- // sql.ResolveWithNewValues(),
- // ).
- // // Override some of the fields with custom
- // // update values.
- // Update(func(u *ent.BatchImageItemUpsert) {
- // SetJobID(v+v).
- // }).
- // Exec(ctx)
- func (_c *BatchImageItemCreate) OnConflict(opts ...sql.ConflictOption) *BatchImageItemUpsertOne {
- _c.conflict = opts
- return &BatchImageItemUpsertOne{
- create: _c,
- }
- }
- // OnConflictColumns calls `OnConflict` and configures the columns
- // as conflict target. Using this option is equivalent to using:
- //
- // client.BatchImageItem.Create().
- // OnConflict(sql.ConflictColumns(columns...)).
- // Exec(ctx)
- func (_c *BatchImageItemCreate) OnConflictColumns(columns ...string) *BatchImageItemUpsertOne {
- _c.conflict = append(_c.conflict, sql.ConflictColumns(columns...))
- return &BatchImageItemUpsertOne{
- create: _c,
- }
- }
- type (
- // BatchImageItemUpsertOne is the builder for "upsert"-ing
- // one BatchImageItem node.
- BatchImageItemUpsertOne struct {
- create *BatchImageItemCreate
- }
- // BatchImageItemUpsert is the "OnConflict" setter.
- BatchImageItemUpsert struct {
- *sql.UpdateSet
- }
- )
- // SetJobID sets the "job_id" field.
- func (u *BatchImageItemUpsert) SetJobID(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldJobID, v)
- return u
- }
- // UpdateJobID sets the "job_id" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateJobID() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldJobID)
- return u
- }
- // SetCustomID sets the "custom_id" field.
- func (u *BatchImageItemUpsert) SetCustomID(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldCustomID, v)
- return u
- }
- // UpdateCustomID sets the "custom_id" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateCustomID() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldCustomID)
- return u
- }
- // SetStatus sets the "status" field.
- func (u *BatchImageItemUpsert) SetStatus(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldStatus, v)
- return u
- }
- // UpdateStatus sets the "status" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateStatus() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldStatus)
- return u
- }
- // SetRequestHash sets the "request_hash" field.
- func (u *BatchImageItemUpsert) SetRequestHash(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldRequestHash, v)
- return u
- }
- // UpdateRequestHash sets the "request_hash" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateRequestHash() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldRequestHash)
- return u
- }
- // ClearRequestHash clears the value of the "request_hash" field.
- func (u *BatchImageItemUpsert) ClearRequestHash() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldRequestHash)
- return u
- }
- // SetPromptPreview sets the "prompt_preview" field.
- func (u *BatchImageItemUpsert) SetPromptPreview(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldPromptPreview, v)
- return u
- }
- // UpdatePromptPreview sets the "prompt_preview" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdatePromptPreview() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldPromptPreview)
- return u
- }
- // ClearPromptPreview clears the value of the "prompt_preview" field.
- func (u *BatchImageItemUpsert) ClearPromptPreview() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldPromptPreview)
- return u
- }
- // SetProviderSourceObject sets the "provider_source_object" field.
- func (u *BatchImageItemUpsert) SetProviderSourceObject(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldProviderSourceObject, v)
- return u
- }
- // UpdateProviderSourceObject sets the "provider_source_object" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateProviderSourceObject() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldProviderSourceObject)
- return u
- }
- // ClearProviderSourceObject clears the value of the "provider_source_object" field.
- func (u *BatchImageItemUpsert) ClearProviderSourceObject() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldProviderSourceObject)
- return u
- }
- // SetSourceLineNumber sets the "source_line_number" field.
- func (u *BatchImageItemUpsert) SetSourceLineNumber(v int) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldSourceLineNumber, v)
- return u
- }
- // UpdateSourceLineNumber sets the "source_line_number" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateSourceLineNumber() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldSourceLineNumber)
- return u
- }
- // AddSourceLineNumber adds v to the "source_line_number" field.
- func (u *BatchImageItemUpsert) AddSourceLineNumber(v int) *BatchImageItemUpsert {
- u.Add(batchimageitem.FieldSourceLineNumber, v)
- return u
- }
- // ClearSourceLineNumber clears the value of the "source_line_number" field.
- func (u *BatchImageItemUpsert) ClearSourceLineNumber() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldSourceLineNumber)
- return u
- }
- // SetSourceByteOffset sets the "source_byte_offset" field.
- func (u *BatchImageItemUpsert) SetSourceByteOffset(v int64) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldSourceByteOffset, v)
- return u
- }
- // UpdateSourceByteOffset sets the "source_byte_offset" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateSourceByteOffset() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldSourceByteOffset)
- return u
- }
- // AddSourceByteOffset adds v to the "source_byte_offset" field.
- func (u *BatchImageItemUpsert) AddSourceByteOffset(v int64) *BatchImageItemUpsert {
- u.Add(batchimageitem.FieldSourceByteOffset, v)
- return u
- }
- // ClearSourceByteOffset clears the value of the "source_byte_offset" field.
- func (u *BatchImageItemUpsert) ClearSourceByteOffset() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldSourceByteOffset)
- return u
- }
- // SetSourceByteLength sets the "source_byte_length" field.
- func (u *BatchImageItemUpsert) SetSourceByteLength(v int64) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldSourceByteLength, v)
- return u
- }
- // UpdateSourceByteLength sets the "source_byte_length" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateSourceByteLength() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldSourceByteLength)
- return u
- }
- // AddSourceByteLength adds v to the "source_byte_length" field.
- func (u *BatchImageItemUpsert) AddSourceByteLength(v int64) *BatchImageItemUpsert {
- u.Add(batchimageitem.FieldSourceByteLength, v)
- return u
- }
- // ClearSourceByteLength clears the value of the "source_byte_length" field.
- func (u *BatchImageItemUpsert) ClearSourceByteLength() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldSourceByteLength)
- return u
- }
- // SetMimeType sets the "mime_type" field.
- func (u *BatchImageItemUpsert) SetMimeType(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldMimeType, v)
- return u
- }
- // UpdateMimeType sets the "mime_type" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateMimeType() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldMimeType)
- return u
- }
- // ClearMimeType clears the value of the "mime_type" field.
- func (u *BatchImageItemUpsert) ClearMimeType() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldMimeType)
- return u
- }
- // SetFileExtension sets the "file_extension" field.
- func (u *BatchImageItemUpsert) SetFileExtension(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldFileExtension, v)
- return u
- }
- // UpdateFileExtension sets the "file_extension" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateFileExtension() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldFileExtension)
- return u
- }
- // ClearFileExtension clears the value of the "file_extension" field.
- func (u *BatchImageItemUpsert) ClearFileExtension() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldFileExtension)
- return u
- }
- // SetImageCount sets the "image_count" field.
- func (u *BatchImageItemUpsert) SetImageCount(v int) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldImageCount, v)
- return u
- }
- // UpdateImageCount sets the "image_count" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateImageCount() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldImageCount)
- return u
- }
- // AddImageCount adds v to the "image_count" field.
- func (u *BatchImageItemUpsert) AddImageCount(v int) *BatchImageItemUpsert {
- u.Add(batchimageitem.FieldImageCount, v)
- return u
- }
- // SetErrorCode sets the "error_code" field.
- func (u *BatchImageItemUpsert) SetErrorCode(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldErrorCode, v)
- return u
- }
- // UpdateErrorCode sets the "error_code" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateErrorCode() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldErrorCode)
- return u
- }
- // ClearErrorCode clears the value of the "error_code" field.
- func (u *BatchImageItemUpsert) ClearErrorCode() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldErrorCode)
- return u
- }
- // SetErrorMessage sets the "error_message" field.
- func (u *BatchImageItemUpsert) SetErrorMessage(v string) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldErrorMessage, v)
- return u
- }
- // UpdateErrorMessage sets the "error_message" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateErrorMessage() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldErrorMessage)
- return u
- }
- // ClearErrorMessage clears the value of the "error_message" field.
- func (u *BatchImageItemUpsert) ClearErrorMessage() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldErrorMessage)
- return u
- }
- // SetBilledAmount sets the "billed_amount" field.
- func (u *BatchImageItemUpsert) SetBilledAmount(v float64) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldBilledAmount, v)
- return u
- }
- // UpdateBilledAmount sets the "billed_amount" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateBilledAmount() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldBilledAmount)
- return u
- }
- // AddBilledAmount adds v to the "billed_amount" field.
- func (u *BatchImageItemUpsert) AddBilledAmount(v float64) *BatchImageItemUpsert {
- u.Add(batchimageitem.FieldBilledAmount, v)
- return u
- }
- // ClearBilledAmount clears the value of the "billed_amount" field.
- func (u *BatchImageItemUpsert) ClearBilledAmount() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldBilledAmount)
- return u
- }
- // SetIndexedAt sets the "indexed_at" field.
- func (u *BatchImageItemUpsert) SetIndexedAt(v time.Time) *BatchImageItemUpsert {
- u.Set(batchimageitem.FieldIndexedAt, v)
- return u
- }
- // UpdateIndexedAt sets the "indexed_at" field to the value that was provided on create.
- func (u *BatchImageItemUpsert) UpdateIndexedAt() *BatchImageItemUpsert {
- u.SetExcluded(batchimageitem.FieldIndexedAt)
- return u
- }
- // ClearIndexedAt clears the value of the "indexed_at" field.
- func (u *BatchImageItemUpsert) ClearIndexedAt() *BatchImageItemUpsert {
- u.SetNull(batchimageitem.FieldIndexedAt)
- return u
- }
- // UpdateNewValues updates the mutable fields using the new values that were set on create.
- // Using this option is equivalent to using:
- //
- // client.BatchImageItem.Create().
- // OnConflict(
- // sql.ResolveWithNewValues(),
- // ).
- // Exec(ctx)
- func (u *BatchImageItemUpsertOne) UpdateNewValues() *BatchImageItemUpsertOne {
- u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues())
- u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
- if _, exists := u.create.mutation.CreatedAt(); exists {
- s.SetIgnore(batchimageitem.FieldCreatedAt)
- }
- }))
- return u
- }
- // Ignore sets each column to itself in case of conflict.
- // Using this option is equivalent to using:
- //
- // client.BatchImageItem.Create().
- // OnConflict(sql.ResolveWithIgnore()).
- // Exec(ctx)
- func (u *BatchImageItemUpsertOne) Ignore() *BatchImageItemUpsertOne {
- u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore())
- return u
- }
- // DoNothing configures the conflict_action to `DO NOTHING`.
- // Supported only by SQLite and PostgreSQL.
- func (u *BatchImageItemUpsertOne) DoNothing() *BatchImageItemUpsertOne {
- u.create.conflict = append(u.create.conflict, sql.DoNothing())
- return u
- }
- // Update allows overriding fields `UPDATE` values. See the BatchImageItemCreate.OnConflict
- // documentation for more info.
- func (u *BatchImageItemUpsertOne) Update(set func(*BatchImageItemUpsert)) *BatchImageItemUpsertOne {
- u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) {
- set(&BatchImageItemUpsert{UpdateSet: update})
- }))
- return u
- }
- // SetJobID sets the "job_id" field.
- func (u *BatchImageItemUpsertOne) SetJobID(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetJobID(v)
- })
- }
- // UpdateJobID sets the "job_id" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateJobID() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateJobID()
- })
- }
- // SetCustomID sets the "custom_id" field.
- func (u *BatchImageItemUpsertOne) SetCustomID(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetCustomID(v)
- })
- }
- // UpdateCustomID sets the "custom_id" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateCustomID() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateCustomID()
- })
- }
- // SetStatus sets the "status" field.
- func (u *BatchImageItemUpsertOne) SetStatus(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetStatus(v)
- })
- }
- // UpdateStatus sets the "status" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateStatus() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateStatus()
- })
- }
- // SetRequestHash sets the "request_hash" field.
- func (u *BatchImageItemUpsertOne) SetRequestHash(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetRequestHash(v)
- })
- }
- // UpdateRequestHash sets the "request_hash" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateRequestHash() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateRequestHash()
- })
- }
- // ClearRequestHash clears the value of the "request_hash" field.
- func (u *BatchImageItemUpsertOne) ClearRequestHash() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearRequestHash()
- })
- }
- // SetPromptPreview sets the "prompt_preview" field.
- func (u *BatchImageItemUpsertOne) SetPromptPreview(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetPromptPreview(v)
- })
- }
- // UpdatePromptPreview sets the "prompt_preview" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdatePromptPreview() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdatePromptPreview()
- })
- }
- // ClearPromptPreview clears the value of the "prompt_preview" field.
- func (u *BatchImageItemUpsertOne) ClearPromptPreview() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearPromptPreview()
- })
- }
- // SetProviderSourceObject sets the "provider_source_object" field.
- func (u *BatchImageItemUpsertOne) SetProviderSourceObject(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetProviderSourceObject(v)
- })
- }
- // UpdateProviderSourceObject sets the "provider_source_object" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateProviderSourceObject() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateProviderSourceObject()
- })
- }
- // ClearProviderSourceObject clears the value of the "provider_source_object" field.
- func (u *BatchImageItemUpsertOne) ClearProviderSourceObject() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearProviderSourceObject()
- })
- }
- // SetSourceLineNumber sets the "source_line_number" field.
- func (u *BatchImageItemUpsertOne) SetSourceLineNumber(v int) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetSourceLineNumber(v)
- })
- }
- // AddSourceLineNumber adds v to the "source_line_number" field.
- func (u *BatchImageItemUpsertOne) AddSourceLineNumber(v int) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddSourceLineNumber(v)
- })
- }
- // UpdateSourceLineNumber sets the "source_line_number" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateSourceLineNumber() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateSourceLineNumber()
- })
- }
- // ClearSourceLineNumber clears the value of the "source_line_number" field.
- func (u *BatchImageItemUpsertOne) ClearSourceLineNumber() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearSourceLineNumber()
- })
- }
- // SetSourceByteOffset sets the "source_byte_offset" field.
- func (u *BatchImageItemUpsertOne) SetSourceByteOffset(v int64) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetSourceByteOffset(v)
- })
- }
- // AddSourceByteOffset adds v to the "source_byte_offset" field.
- func (u *BatchImageItemUpsertOne) AddSourceByteOffset(v int64) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddSourceByteOffset(v)
- })
- }
- // UpdateSourceByteOffset sets the "source_byte_offset" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateSourceByteOffset() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateSourceByteOffset()
- })
- }
- // ClearSourceByteOffset clears the value of the "source_byte_offset" field.
- func (u *BatchImageItemUpsertOne) ClearSourceByteOffset() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearSourceByteOffset()
- })
- }
- // SetSourceByteLength sets the "source_byte_length" field.
- func (u *BatchImageItemUpsertOne) SetSourceByteLength(v int64) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetSourceByteLength(v)
- })
- }
- // AddSourceByteLength adds v to the "source_byte_length" field.
- func (u *BatchImageItemUpsertOne) AddSourceByteLength(v int64) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddSourceByteLength(v)
- })
- }
- // UpdateSourceByteLength sets the "source_byte_length" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateSourceByteLength() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateSourceByteLength()
- })
- }
- // ClearSourceByteLength clears the value of the "source_byte_length" field.
- func (u *BatchImageItemUpsertOne) ClearSourceByteLength() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearSourceByteLength()
- })
- }
- // SetMimeType sets the "mime_type" field.
- func (u *BatchImageItemUpsertOne) SetMimeType(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetMimeType(v)
- })
- }
- // UpdateMimeType sets the "mime_type" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateMimeType() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateMimeType()
- })
- }
- // ClearMimeType clears the value of the "mime_type" field.
- func (u *BatchImageItemUpsertOne) ClearMimeType() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearMimeType()
- })
- }
- // SetFileExtension sets the "file_extension" field.
- func (u *BatchImageItemUpsertOne) SetFileExtension(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetFileExtension(v)
- })
- }
- // UpdateFileExtension sets the "file_extension" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateFileExtension() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateFileExtension()
- })
- }
- // ClearFileExtension clears the value of the "file_extension" field.
- func (u *BatchImageItemUpsertOne) ClearFileExtension() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearFileExtension()
- })
- }
- // SetImageCount sets the "image_count" field.
- func (u *BatchImageItemUpsertOne) SetImageCount(v int) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetImageCount(v)
- })
- }
- // AddImageCount adds v to the "image_count" field.
- func (u *BatchImageItemUpsertOne) AddImageCount(v int) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddImageCount(v)
- })
- }
- // UpdateImageCount sets the "image_count" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateImageCount() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateImageCount()
- })
- }
- // SetErrorCode sets the "error_code" field.
- func (u *BatchImageItemUpsertOne) SetErrorCode(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetErrorCode(v)
- })
- }
- // UpdateErrorCode sets the "error_code" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateErrorCode() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateErrorCode()
- })
- }
- // ClearErrorCode clears the value of the "error_code" field.
- func (u *BatchImageItemUpsertOne) ClearErrorCode() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearErrorCode()
- })
- }
- // SetErrorMessage sets the "error_message" field.
- func (u *BatchImageItemUpsertOne) SetErrorMessage(v string) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetErrorMessage(v)
- })
- }
- // UpdateErrorMessage sets the "error_message" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateErrorMessage() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateErrorMessage()
- })
- }
- // ClearErrorMessage clears the value of the "error_message" field.
- func (u *BatchImageItemUpsertOne) ClearErrorMessage() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearErrorMessage()
- })
- }
- // SetBilledAmount sets the "billed_amount" field.
- func (u *BatchImageItemUpsertOne) SetBilledAmount(v float64) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetBilledAmount(v)
- })
- }
- // AddBilledAmount adds v to the "billed_amount" field.
- func (u *BatchImageItemUpsertOne) AddBilledAmount(v float64) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddBilledAmount(v)
- })
- }
- // UpdateBilledAmount sets the "billed_amount" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateBilledAmount() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateBilledAmount()
- })
- }
- // ClearBilledAmount clears the value of the "billed_amount" field.
- func (u *BatchImageItemUpsertOne) ClearBilledAmount() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearBilledAmount()
- })
- }
- // SetIndexedAt sets the "indexed_at" field.
- func (u *BatchImageItemUpsertOne) SetIndexedAt(v time.Time) *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetIndexedAt(v)
- })
- }
- // UpdateIndexedAt sets the "indexed_at" field to the value that was provided on create.
- func (u *BatchImageItemUpsertOne) UpdateIndexedAt() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateIndexedAt()
- })
- }
- // ClearIndexedAt clears the value of the "indexed_at" field.
- func (u *BatchImageItemUpsertOne) ClearIndexedAt() *BatchImageItemUpsertOne {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearIndexedAt()
- })
- }
- // Exec executes the query.
- func (u *BatchImageItemUpsertOne) Exec(ctx context.Context) error {
- if len(u.create.conflict) == 0 {
- return errors.New("ent: missing options for BatchImageItemCreate.OnConflict")
- }
- return u.create.Exec(ctx)
- }
- // ExecX is like Exec, but panics if an error occurs.
- func (u *BatchImageItemUpsertOne) ExecX(ctx context.Context) {
- if err := u.create.Exec(ctx); err != nil {
- panic(err)
- }
- }
- // Exec executes the UPSERT query and returns the inserted/updated ID.
- func (u *BatchImageItemUpsertOne) ID(ctx context.Context) (id int64, err error) {
- node, err := u.create.Save(ctx)
- if err != nil {
- return id, err
- }
- return node.ID, nil
- }
- // IDX is like ID, but panics if an error occurs.
- func (u *BatchImageItemUpsertOne) IDX(ctx context.Context) int64 {
- id, err := u.ID(ctx)
- if err != nil {
- panic(err)
- }
- return id
- }
- // BatchImageItemCreateBulk is the builder for creating many BatchImageItem entities in bulk.
- type BatchImageItemCreateBulk struct {
- config
- err error
- builders []*BatchImageItemCreate
- conflict []sql.ConflictOption
- }
- // Save creates the BatchImageItem entities in the database.
- func (_c *BatchImageItemCreateBulk) Save(ctx context.Context) ([]*BatchImageItem, error) {
- if _c.err != nil {
- return nil, _c.err
- }
- specs := make([]*sqlgraph.CreateSpec, len(_c.builders))
- nodes := make([]*BatchImageItem, len(_c.builders))
- mutators := make([]Mutator, len(_c.builders))
- for i := range _c.builders {
- func(i int, root context.Context) {
- builder := _c.builders[i]
- builder.defaults()
- var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
- mutation, ok := m.(*BatchImageItemMutation)
- if !ok {
- return nil, fmt.Errorf("unexpected mutation type %T", m)
- }
- if err := builder.check(); err != nil {
- return nil, err
- }
- builder.mutation = mutation
- var err error
- nodes[i], specs[i] = builder.createSpec()
- if i < len(mutators)-1 {
- _, err = mutators[i+1].Mutate(root, _c.builders[i+1].mutation)
- } else {
- spec := &sqlgraph.BatchCreateSpec{Nodes: specs}
- spec.OnConflict = _c.conflict
- // Invoke the actual operation on the latest mutation in the chain.
- if err = sqlgraph.BatchCreate(ctx, _c.driver, spec); err != nil {
- if sqlgraph.IsConstraintError(err) {
- err = &ConstraintError{msg: err.Error(), wrap: err}
- }
- }
- }
- if err != nil {
- return nil, err
- }
- mutation.id = &nodes[i].ID
- if specs[i].ID.Value != nil {
- id := specs[i].ID.Value.(int64)
- nodes[i].ID = int64(id)
- }
- mutation.done = true
- return nodes[i], nil
- })
- for i := len(builder.hooks) - 1; i >= 0; i-- {
- mut = builder.hooks[i](mut)
- }
- mutators[i] = mut
- }(i, ctx)
- }
- if len(mutators) > 0 {
- if _, err := mutators[0].Mutate(ctx, _c.builders[0].mutation); err != nil {
- return nil, err
- }
- }
- return nodes, nil
- }
- // SaveX is like Save, but panics if an error occurs.
- func (_c *BatchImageItemCreateBulk) SaveX(ctx context.Context) []*BatchImageItem {
- v, err := _c.Save(ctx)
- if err != nil {
- panic(err)
- }
- return v
- }
- // Exec executes the query.
- func (_c *BatchImageItemCreateBulk) Exec(ctx context.Context) error {
- _, err := _c.Save(ctx)
- return err
- }
- // ExecX is like Exec, but panics if an error occurs.
- func (_c *BatchImageItemCreateBulk) ExecX(ctx context.Context) {
- if err := _c.Exec(ctx); err != nil {
- panic(err)
- }
- }
- // OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
- // of the `INSERT` statement. For example:
- //
- // client.BatchImageItem.CreateBulk(builders...).
- // OnConflict(
- // // Update the row with the new values
- // // the was proposed for insertion.
- // sql.ResolveWithNewValues(),
- // ).
- // // Override some of the fields with custom
- // // update values.
- // Update(func(u *ent.BatchImageItemUpsert) {
- // SetJobID(v+v).
- // }).
- // Exec(ctx)
- func (_c *BatchImageItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *BatchImageItemUpsertBulk {
- _c.conflict = opts
- return &BatchImageItemUpsertBulk{
- create: _c,
- }
- }
- // OnConflictColumns calls `OnConflict` and configures the columns
- // as conflict target. Using this option is equivalent to using:
- //
- // client.BatchImageItem.Create().
- // OnConflict(sql.ConflictColumns(columns...)).
- // Exec(ctx)
- func (_c *BatchImageItemCreateBulk) OnConflictColumns(columns ...string) *BatchImageItemUpsertBulk {
- _c.conflict = append(_c.conflict, sql.ConflictColumns(columns...))
- return &BatchImageItemUpsertBulk{
- create: _c,
- }
- }
- // BatchImageItemUpsertBulk is the builder for "upsert"-ing
- // a bulk of BatchImageItem nodes.
- type BatchImageItemUpsertBulk struct {
- create *BatchImageItemCreateBulk
- }
- // UpdateNewValues updates the mutable fields using the new values that
- // were set on create. Using this option is equivalent to using:
- //
- // client.BatchImageItem.Create().
- // OnConflict(
- // sql.ResolveWithNewValues(),
- // ).
- // Exec(ctx)
- func (u *BatchImageItemUpsertBulk) UpdateNewValues() *BatchImageItemUpsertBulk {
- u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues())
- u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
- for _, b := range u.create.builders {
- if _, exists := b.mutation.CreatedAt(); exists {
- s.SetIgnore(batchimageitem.FieldCreatedAt)
- }
- }
- }))
- return u
- }
- // Ignore sets each column to itself in case of conflict.
- // Using this option is equivalent to using:
- //
- // client.BatchImageItem.Create().
- // OnConflict(sql.ResolveWithIgnore()).
- // Exec(ctx)
- func (u *BatchImageItemUpsertBulk) Ignore() *BatchImageItemUpsertBulk {
- u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore())
- return u
- }
- // DoNothing configures the conflict_action to `DO NOTHING`.
- // Supported only by SQLite and PostgreSQL.
- func (u *BatchImageItemUpsertBulk) DoNothing() *BatchImageItemUpsertBulk {
- u.create.conflict = append(u.create.conflict, sql.DoNothing())
- return u
- }
- // Update allows overriding fields `UPDATE` values. See the BatchImageItemCreateBulk.OnConflict
- // documentation for more info.
- func (u *BatchImageItemUpsertBulk) Update(set func(*BatchImageItemUpsert)) *BatchImageItemUpsertBulk {
- u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) {
- set(&BatchImageItemUpsert{UpdateSet: update})
- }))
- return u
- }
- // SetJobID sets the "job_id" field.
- func (u *BatchImageItemUpsertBulk) SetJobID(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetJobID(v)
- })
- }
- // UpdateJobID sets the "job_id" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateJobID() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateJobID()
- })
- }
- // SetCustomID sets the "custom_id" field.
- func (u *BatchImageItemUpsertBulk) SetCustomID(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetCustomID(v)
- })
- }
- // UpdateCustomID sets the "custom_id" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateCustomID() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateCustomID()
- })
- }
- // SetStatus sets the "status" field.
- func (u *BatchImageItemUpsertBulk) SetStatus(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetStatus(v)
- })
- }
- // UpdateStatus sets the "status" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateStatus() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateStatus()
- })
- }
- // SetRequestHash sets the "request_hash" field.
- func (u *BatchImageItemUpsertBulk) SetRequestHash(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetRequestHash(v)
- })
- }
- // UpdateRequestHash sets the "request_hash" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateRequestHash() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateRequestHash()
- })
- }
- // ClearRequestHash clears the value of the "request_hash" field.
- func (u *BatchImageItemUpsertBulk) ClearRequestHash() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearRequestHash()
- })
- }
- // SetPromptPreview sets the "prompt_preview" field.
- func (u *BatchImageItemUpsertBulk) SetPromptPreview(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetPromptPreview(v)
- })
- }
- // UpdatePromptPreview sets the "prompt_preview" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdatePromptPreview() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdatePromptPreview()
- })
- }
- // ClearPromptPreview clears the value of the "prompt_preview" field.
- func (u *BatchImageItemUpsertBulk) ClearPromptPreview() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearPromptPreview()
- })
- }
- // SetProviderSourceObject sets the "provider_source_object" field.
- func (u *BatchImageItemUpsertBulk) SetProviderSourceObject(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetProviderSourceObject(v)
- })
- }
- // UpdateProviderSourceObject sets the "provider_source_object" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateProviderSourceObject() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateProviderSourceObject()
- })
- }
- // ClearProviderSourceObject clears the value of the "provider_source_object" field.
- func (u *BatchImageItemUpsertBulk) ClearProviderSourceObject() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearProviderSourceObject()
- })
- }
- // SetSourceLineNumber sets the "source_line_number" field.
- func (u *BatchImageItemUpsertBulk) SetSourceLineNumber(v int) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetSourceLineNumber(v)
- })
- }
- // AddSourceLineNumber adds v to the "source_line_number" field.
- func (u *BatchImageItemUpsertBulk) AddSourceLineNumber(v int) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddSourceLineNumber(v)
- })
- }
- // UpdateSourceLineNumber sets the "source_line_number" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateSourceLineNumber() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateSourceLineNumber()
- })
- }
- // ClearSourceLineNumber clears the value of the "source_line_number" field.
- func (u *BatchImageItemUpsertBulk) ClearSourceLineNumber() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearSourceLineNumber()
- })
- }
- // SetSourceByteOffset sets the "source_byte_offset" field.
- func (u *BatchImageItemUpsertBulk) SetSourceByteOffset(v int64) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetSourceByteOffset(v)
- })
- }
- // AddSourceByteOffset adds v to the "source_byte_offset" field.
- func (u *BatchImageItemUpsertBulk) AddSourceByteOffset(v int64) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddSourceByteOffset(v)
- })
- }
- // UpdateSourceByteOffset sets the "source_byte_offset" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateSourceByteOffset() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateSourceByteOffset()
- })
- }
- // ClearSourceByteOffset clears the value of the "source_byte_offset" field.
- func (u *BatchImageItemUpsertBulk) ClearSourceByteOffset() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearSourceByteOffset()
- })
- }
- // SetSourceByteLength sets the "source_byte_length" field.
- func (u *BatchImageItemUpsertBulk) SetSourceByteLength(v int64) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetSourceByteLength(v)
- })
- }
- // AddSourceByteLength adds v to the "source_byte_length" field.
- func (u *BatchImageItemUpsertBulk) AddSourceByteLength(v int64) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddSourceByteLength(v)
- })
- }
- // UpdateSourceByteLength sets the "source_byte_length" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateSourceByteLength() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateSourceByteLength()
- })
- }
- // ClearSourceByteLength clears the value of the "source_byte_length" field.
- func (u *BatchImageItemUpsertBulk) ClearSourceByteLength() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearSourceByteLength()
- })
- }
- // SetMimeType sets the "mime_type" field.
- func (u *BatchImageItemUpsertBulk) SetMimeType(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetMimeType(v)
- })
- }
- // UpdateMimeType sets the "mime_type" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateMimeType() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateMimeType()
- })
- }
- // ClearMimeType clears the value of the "mime_type" field.
- func (u *BatchImageItemUpsertBulk) ClearMimeType() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearMimeType()
- })
- }
- // SetFileExtension sets the "file_extension" field.
- func (u *BatchImageItemUpsertBulk) SetFileExtension(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetFileExtension(v)
- })
- }
- // UpdateFileExtension sets the "file_extension" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateFileExtension() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateFileExtension()
- })
- }
- // ClearFileExtension clears the value of the "file_extension" field.
- func (u *BatchImageItemUpsertBulk) ClearFileExtension() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearFileExtension()
- })
- }
- // SetImageCount sets the "image_count" field.
- func (u *BatchImageItemUpsertBulk) SetImageCount(v int) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetImageCount(v)
- })
- }
- // AddImageCount adds v to the "image_count" field.
- func (u *BatchImageItemUpsertBulk) AddImageCount(v int) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddImageCount(v)
- })
- }
- // UpdateImageCount sets the "image_count" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateImageCount() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateImageCount()
- })
- }
- // SetErrorCode sets the "error_code" field.
- func (u *BatchImageItemUpsertBulk) SetErrorCode(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetErrorCode(v)
- })
- }
- // UpdateErrorCode sets the "error_code" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateErrorCode() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateErrorCode()
- })
- }
- // ClearErrorCode clears the value of the "error_code" field.
- func (u *BatchImageItemUpsertBulk) ClearErrorCode() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearErrorCode()
- })
- }
- // SetErrorMessage sets the "error_message" field.
- func (u *BatchImageItemUpsertBulk) SetErrorMessage(v string) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetErrorMessage(v)
- })
- }
- // UpdateErrorMessage sets the "error_message" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateErrorMessage() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateErrorMessage()
- })
- }
- // ClearErrorMessage clears the value of the "error_message" field.
- func (u *BatchImageItemUpsertBulk) ClearErrorMessage() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearErrorMessage()
- })
- }
- // SetBilledAmount sets the "billed_amount" field.
- func (u *BatchImageItemUpsertBulk) SetBilledAmount(v float64) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetBilledAmount(v)
- })
- }
- // AddBilledAmount adds v to the "billed_amount" field.
- func (u *BatchImageItemUpsertBulk) AddBilledAmount(v float64) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.AddBilledAmount(v)
- })
- }
- // UpdateBilledAmount sets the "billed_amount" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateBilledAmount() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateBilledAmount()
- })
- }
- // ClearBilledAmount clears the value of the "billed_amount" field.
- func (u *BatchImageItemUpsertBulk) ClearBilledAmount() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearBilledAmount()
- })
- }
- // SetIndexedAt sets the "indexed_at" field.
- func (u *BatchImageItemUpsertBulk) SetIndexedAt(v time.Time) *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.SetIndexedAt(v)
- })
- }
- // UpdateIndexedAt sets the "indexed_at" field to the value that was provided on create.
- func (u *BatchImageItemUpsertBulk) UpdateIndexedAt() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.UpdateIndexedAt()
- })
- }
- // ClearIndexedAt clears the value of the "indexed_at" field.
- func (u *BatchImageItemUpsertBulk) ClearIndexedAt() *BatchImageItemUpsertBulk {
- return u.Update(func(s *BatchImageItemUpsert) {
- s.ClearIndexedAt()
- })
- }
- // Exec executes the query.
- func (u *BatchImageItemUpsertBulk) Exec(ctx context.Context) error {
- if u.create.err != nil {
- return u.create.err
- }
- for i, b := range u.create.builders {
- if len(b.conflict) != 0 {
- return fmt.Errorf("ent: OnConflict was set for builder %d. Set it on the BatchImageItemCreateBulk instead", i)
- }
- }
- if len(u.create.conflict) == 0 {
- return errors.New("ent: missing options for BatchImageItemCreateBulk.OnConflict")
- }
- return u.create.Exec(ctx)
- }
- // ExecX is like Exec, but panics if an error occurs.
- func (u *BatchImageItemUpsertBulk) ExecX(ctx context.Context) {
- if err := u.create.Exec(ctx); err != nil {
- panic(err)
- }
- }
|