data_root DeleteCollections method
Publish PHP Package / docker (push) Successful in 6s Details

This commit is contained in:
Pavel Merzlyakov 2024-12-06 18:27:57 +03:00
parent caa6f7f7f2
commit 4c80467780
1 changed files with 11 additions and 0 deletions

View File

@ -1012,4 +1012,15 @@ func Delete{{ s.name }}Diff(ctx context.Context, dbe metadb.Execer, ids {{ s.nam
{%~ endfor %}
return nil
}
func Delete{{ s.name }}Collections(ctx context.Context, dbe metadb.Execer, {{ delete_by|varname }} {{ delete_by.type|go_type }}) error {
{%~ for f in ctx.fields %}
{%~ if f.type is array %}
if err := Delete{{ f.type.value.name }}Collection(ctx, dbe, {{ delete_by|varname }}); err != nil {
return err
}
{%~ endif %}
{%~ endfor %}
return nil
}
{% endmacro root_delete %}