feat(sqltypes): add nullable SQL types with automatic casting
CI / build-and-test (push) Successful in 1m54s
Release / release (push) Successful in 3m12s

* Introduced SqlNull type for nullable values with auto-casting.
* Implemented JSON, YAML, and XML marshaling/unmarshaling.
* Added specific types for common SQL types (e.g., SqlInt64, SqlString).
* Included utility functions for creating nullable types.
* Added SqlTimeStamp, SqlDate, and SqlTime types with custom formatting.
This commit is contained in:
Hein
2026-07-15 12:55:15 +02:00
parent f94fddddb1
commit 3d4e6d0939
40 changed files with 1240 additions and 330 deletions
+4 -4
View File
@@ -82,7 +82,7 @@ CREATE SEQUENCE IF NOT EXISTS public.identity_arc_stage_parts_id
START 1
CACHE 1;
CREATE SEQUENCE IF NOT EXISTS public.identity_persona_arc_persona_id
CREATE SEQUENCE IF NOT EXISTS public.identity_persona_arc_id
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
@@ -11401,15 +11401,15 @@ BEGIN
IF EXISTS (
SELECT 1 FROM pg_class c
INNER JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 'identity_persona_arc_persona_id'
WHERE c.relname = 'identity_persona_arc_id'
AND n.nspname = 'public'
AND c.relkind = 'S'
) THEN
SELECT COALESCE(MAX(persona_id), 0) + 1
SELECT COALESCE(MAX(id), 0) + 1
FROM public.persona_arc
INTO m_cnt;
PERFORM setval('public.identity_persona_arc_persona_id'::regclass, m_cnt);
PERFORM setval('public.identity_persona_arc_id'::regclass, m_cnt);
END IF;
END;
$$;