MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / BatchInsertChannels

Function BatchInsertChannels

model/channel.go:330–343  ·  view source on GitHub ↗
(channels []Channel)

Source from the content-addressed store, hash-verified

328}
329
330func BatchInsertChannels(channels []Channel) error {
331 var err error
332 err = DB.Create(&channels).Error
333 if err != nil {
334 return err
335 }
336 for _, channel_ := range channels {
337 err = channel_.AddAbilities()
338 if err != nil {
339 return err
340 }
341 }
342 return nil
343}
344
345func BatchDeleteChannels(ids []int) error {
346 //使用事务 删除channel表和channel_ability表

Callers 3

ImportChannelsFunction · 0.92
AddChannelFunction · 0.92
CopyChannelFunction · 0.92

Calls 1

AddAbilitiesMethod · 0.80

Tested by

no test coverage detected