Skip to content

Draft 7 with errors #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixed type references to be schema qualified
  • Loading branch information
ar45 committed Mar 1, 2023
commit 0922430203b6727b6eaefed17c78bf2d3bf4f384
6 changes: 3 additions & 3 deletions postgres-json-schema--0.2.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ $f$ LANGUAGE 'plpgsql' IMMUTABLE;

-- MOCK Placeholder
CREATE OR REPLACE FUNCTION get_json_schema_validations(schema jsonb, data jsonb, root_schema jsonb, schema_path text[], string_as_number bool)
RETURNS json_schema_validation_result[] AS $f$ BEGIN END; $f$ LANGUAGE plpgsql;
RETURNS @extschema@.json_schema_validation_result[] AS $f$ BEGIN END; $f$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION get_json_schema_validations(schema jsonb, data jsonb, string_as_number bool DEFAULT false)
RETURNS json_schema_validation_result[] AS $f$
RETURNS @extschema@.json_schema_validation_result[] AS $f$
SELECT @extschema@.get_json_schema_validations(schema, data, schema, ARRAY []::text[], string_as_number);
$f$ LANGUAGE SQL IMMUTABLE ;

Expand All @@ -102,7 +102,7 @@ CREATE OR REPLACE FUNCTION json_schema_check_constraint(
column_name text default ''
) RETURNS bool AS $$
DECLARE
result json_schema_validation_result[];
result @extschema@.json_schema_validation_result[];
BEGIN
result := @extschema@.get_json_schema_validations(schema, data, schema, '{}'::text[], string_as_number := string_as_number);
IF (NOT result) THEN
Expand Down