{"id":18981390,"url":"https://github.com/awncorp/sql-validator","last_synced_at":"2026-03-11T19:31:14.488Z","repository":{"id":56840303,"uuid":"282344336","full_name":"awncorp/sql-validator","owner":"awncorp","description":"Validate JSON-SQL Schemas","archived":false,"fork":false,"pushed_at":"2020-08-10T04:42:08.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-11T15:51:38.127Z","etag":null,"topics":["json","json-schema","json-sql","perl","perl5","sql"],"latest_commit_sha":null,"homepage":"https://metacpan.org/release/SQL-Validator","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awncorp.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-25T00:59:12.000Z","updated_at":"2022-07-24T21:01:27.000Z","dependencies_parsed_at":"2022-08-28T22:00:10.973Z","dependency_job_id":null,"html_url":"https://github.com/awncorp/sql-validator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/awncorp/sql-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fsql-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fsql-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fsql-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fsql-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awncorp","download_url":"https://codeload.github.com/awncorp/sql-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fsql-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30395587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T18:46:22.935Z","status":"ssl_error","status_checked_at":"2026-03-11T18:46:17.045Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-schema","json-sql","perl","perl5","sql"],"created_at":"2024-11-08T16:09:43.143Z","updated_at":"2026-03-11T19:31:14.471Z","avatar_url":"https://github.com/awncorp.png","language":"Perl","readme":"NAME\n\n    SQL::Validator - Validate JSON-SQL\n\nABSTRACT\n\n    Validate JSON-SQL Schemas\n\nSYNOPSIS\n\n      use SQL::Validator;\n    \n      my $sql = SQL::Validator-\u003enew;\n    \n      # my $valid = $sql-\u003evalidate({\n      #   insert =\u003e {\n      #     into =\u003e {\n      #       table =\u003e 'users'\n      #     },\n      #     default =\u003e 1\n      #   }\n      # });\n    \n      # i.e. represents (INSERT INTO \"users\" DEFAULT VALUES)\n    \n      # die $sql-\u003eerror if !$valid;\n    \n      # $sql-\u003eerror-\u003ereport('insert');\n\nDESCRIPTION\n\n    This package provides a json-sql\n    \u003chttps://github.com/iamalnewkirk/json-sql#readme\u003e data structure\n    validation library based on the JSON-SQL json-schema\n    \u003chttps://json-schema.org\u003e standard.\n\nATTRIBUTES\n\n    This package has the following attributes:\n\n schema\n\n      schema(Any)\n\n    This attribute is read-only, accepts (Any) values, and is optional.\n\n validator\n\n      validator(InstanceOf[\"JSON::Validator\"])\n\n    This attribute is read-only, accepts (InstanceOf[\"JSON::Validator\"])\n    values, and is optional.\n\n version\n\n      version(Str)\n\n    This attribute is read-only, accepts (Str) values, and is optional.\n\nMETHODS\n\n    This package implements the following methods:\n\n error\n\n      error() : InstanceOf[\"SQL::Validator::Error\"]\n\n    The error method validates the JSON-SQL schema provided.\n\n    error example #1\n\n        # given: synopsis\n      \n        $sql-\u003evalidate({select =\u003e {}});\n      \n        my $error = $sql-\u003eerror;\n\n    error example #2\n\n        # given: synopsis\n      \n        $sql-\u003evalidate({select =\u003e { from =\u003e { table =\u003e 'users' } } });\n      \n        my $error = $sql-\u003eerror;\n\n validate\n\n      validate(HashRef $schema) : Bool\n\n    The validate method validates the JSON-SQL schema provided.\n\n    validate example #1\n\n        # given: synopsis\n      \n        my $valid = $sql-\u003evalidate({\n          insert =\u003e {\n            into =\u003e {\n              table =\u003e 'users'\n            },\n            default =\u003e 1\n          }\n        });\n      \n        # VALID\n\n    validate example #2\n\n        # given: synopsis\n      \n        my $valid = $sql-\u003evalidate({\n          insert =\u003e {\n            into =\u003e {\n              table =\u003e 'users'\n            },\n            default =\u003e 'true' # coerced booleans\n          }\n        });\n      \n        # VALID\n\n    validate example #3\n\n        # given: synopsis\n      \n        my $valid = $sql-\u003evalidate({\n          insert =\u003e {\n            into =\u003e 'users',\n            values =\u003e [1, 2, 3]\n          }\n        });\n      \n        # INVALID\n\nAUTHOR\n\n    Al Newkirk, awncorp@cpan.org\n\nLICENSE\n\n    Copyright (C) 2011-2019, Al Newkirk, et al.\n\n    This is free software; you can redistribute it and/or modify it under\n    the terms of the The Apache License, Version 2.0, as elucidated in the\n    \"license file\"\n    \u003chttps://github.com/iamalnewkirk/sql-validator/blob/master/LICENSE\u003e.\n\nPROJECT\n\n    Wiki \u003chttps://github.com/iamalnewkirk/sql-validator/wiki\u003e\n\n    Project \u003chttps://github.com/iamalnewkirk/sql-validator\u003e\n\n    Initiatives \u003chttps://github.com/iamalnewkirk/sql-validator/projects\u003e\n\n    Milestones \u003chttps://github.com/iamalnewkirk/sql-validator/milestones\u003e\n\n    Contributing\n    \u003chttps://github.com/iamalnewkirk/sql-validator/blob/master/CONTRIBUTE.md\u003e\n\n    Issues \u003chttps://github.com/iamalnewkirk/sql-validator/issues\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fsql-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawncorp%2Fsql-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fsql-validator/lists"}