SQL/Blob: Add support for blob storage to SQL backend (#98192)

This commit is contained in:
Ryan McKinley
2025-01-08 23:08:10 +03:00
committed by GitHub
parent 3e68731600
commit 429da7fd68
18 changed files with 478 additions and 13 deletions
+24
View File
@@ -0,0 +1,24 @@
INSERT INTO `resource_blob`
(
`uuid`,
`created`,
`group`,
`resource`,
`namespace`,
`name`,
`value`,
`hash`,
`content_type`
)
VALUES (
'abc',
'2023-12-31 21:00:00 +0000 UTC',
'g',
'r',
'x',
'name',
'[97 98 99 100 101 102 103]',
'xxx',
'text/plain'
)
;
+13
View File
@@ -0,0 +1,13 @@
SELECT
`uuid`,
`value`,
`content_type`
FROM `resource_blob`
WHERE 1 = 1
AND `namespace` = 'x'
AND `group` = 'g'
AND `resource` = 'r'
AND `name` = 'name'
AND `uuid` = 'abc'
ORDER BY `created` DESC
LIMIT 1;
@@ -0,0 +1,11 @@
SELECT
`uuid`,
`value`,
`content_type`
FROM `resource_blob`
WHERE 1 = 1
AND `namespace` = 'x'
AND `group` = 'g'
AND `resource` = 'r'
ORDER BY `created` DESC
LIMIT 1;
@@ -0,0 +1,24 @@
INSERT INTO "resource_blob"
(
"uuid",
"created",
"group",
"resource",
"namespace",
"name",
"value",
"hash",
"content_type"
)
VALUES (
'abc',
'2023-12-31 21:00:00 +0000 UTC',
'g',
'r',
'x',
'name',
'[97 98 99 100 101 102 103]',
'xxx',
'text/plain'
)
;
@@ -0,0 +1,13 @@
SELECT
"uuid",
"value",
"content_type"
FROM "resource_blob"
WHERE 1 = 1
AND "namespace" = 'x'
AND "group" = 'g'
AND "resource" = 'r'
AND "name" = 'name'
AND "uuid" = 'abc'
ORDER BY "created" DESC
LIMIT 1;
@@ -0,0 +1,11 @@
SELECT
"uuid",
"value",
"content_type"
FROM "resource_blob"
WHERE 1 = 1
AND "namespace" = 'x'
AND "group" = 'g'
AND "resource" = 'r'
ORDER BY "created" DESC
LIMIT 1;
+24
View File
@@ -0,0 +1,24 @@
INSERT INTO "resource_blob"
(
"uuid",
"created",
"group",
"resource",
"namespace",
"name",
"value",
"hash",
"content_type"
)
VALUES (
'abc',
'2023-12-31 21:00:00 +0000 UTC',
'g',
'r',
'x',
'name',
'[97 98 99 100 101 102 103]',
'xxx',
'text/plain'
)
;
+13
View File
@@ -0,0 +1,13 @@
SELECT
"uuid",
"value",
"content_type"
FROM "resource_blob"
WHERE 1 = 1
AND "namespace" = 'x'
AND "group" = 'g'
AND "resource" = 'r'
AND "name" = 'name'
AND "uuid" = 'abc'
ORDER BY "created" DESC
LIMIT 1;
@@ -0,0 +1,11 @@
SELECT
"uuid",
"value",
"content_type"
FROM "resource_blob"
WHERE 1 = 1
AND "namespace" = 'x'
AND "group" = 'g'
AND "resource" = 'r'
ORDER BY "created" DESC
LIMIT 1;