<commit_before>-- :name get-image-collection :? :1
select *
  from images_collections as cc
 where cc.id = :id
   and cc."user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-image :<! :1
insert into images ("user", name, collection, path, width, height, mimetype)
values ('00000000-0000-0000-0000-000000000000'::uuid, :name, :collection,
        :path, :width, :height, :mimetype)
returning *;

-- :name delete-image :! :n
delete from images
 where id = :id
   and "user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-images-collection
insert into images_collections (id, "user", name)
values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
    on conflict (id)
    do update set name = :name
returning *;

-- :name get-image
select * from images as i
 where i.id = :id
   and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-icons-collection
insert into icons_collections (id, "user", name)
values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
    on conflict (id)
    do update set name = :name
returning *;

-- :name get-icon
select * from icons as i
 where i.id = :id
   and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-icon :<! :1
insert into icons ("user", name, collection, metadata, content)
values ('00000000-0000-0000-0000-000000000000'::uuid,
        :name, :collection, :metadata, :content)
    on conflict (id)
    do update set name = :name,
                  content = :content,
                  metadata = :metadata,
                  collection = :collection,
                  "user" = '00000000-0000-0000-0000-000000000000'::uuid
returning *;
<commit_msg>Add missing :id column handling on collimp sql functions.<commit_after>-- :name get-image-collection :? :1
select *
  from images_collections as cc
 where cc.id = :id
   and cc."user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-image :<! :1
insert into images ("user", id, name, collection, path, width, height, mimetype)
values ('00000000-0000-0000-0000-000000000000'::uuid,
        :id, :name, :collection, :path, :width, :height, :mimetype)
returning *;

-- :name delete-image :! :n
delete from images
 where id = :id
   and "user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-images-collection
insert into images_collections (id, "user", name)
values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
    on conflict (id)
    do update set name = :name
returning *;

-- :name get-image
select * from images as i
 where i.id = :id
   and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-icons-collection
insert into icons_collections (id, "user", name)
values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
    on conflict (id)
    do update set name = :name
returning *;

-- :name get-icon
select * from icons as i
 where i.id = :id
   and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;

-- :name create-icon :<! :1
insert into icons ("user", id, name, collection, metadata, content)
values ('00000000-0000-0000-0000-000000000000'::uuid,
        :id, :name, :collection, :metadata, :content)
    on conflict (id)
    do update set name = :name,
                  content = :content,
                  metadata = :metadata,
                  collection = :collection,
                  "user" = '00000000-0000-0000-0000-000000000000'::uuid
returning *;

{'fraction_non_alphanumeric': 0.15098722415795587, 'fraction_numerical': 0.16898954703832753, 'mean_word_length': 3.3387909319899243, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 36, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5422898', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1091, 'n_words': 314}