Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.09 KB

docs.md

File metadata and controls

36 lines (23 loc) · 1.09 KB

sqlite-jsonschema Documentation

A full reference to every function and module that sqlite-jsonschema offers.

As a reminder, sqlite-jsonschema follows semver and is pre v1, so breaking changes are to be expected.

API Reference

jsonschema_matches(schema, document)

Returns 1 if the given document matches the given schema, where schema is a valid JSON Schema. Returns 0 otherwise.

select jsonschema_matches('{"maxLength": 5}', json_quote('alex')); -- 1
select jsonschema_matches('{"maxLength": 5}', json_quote('alexxx')); -- 0

jsonschema_version()

Returns the semver version string of the current version of sqlite-jsonschema.

select jsonschema_version(); -- 'v0.1.0'

jsonschema_debug()

Returns a debug string of various info about sqlite-jsonschema, including the version string, build date, and commit hash.

select jsonschema_debug();
'Version: v0.1.0
Source: 247dca8f4cea1abdc30ed3e852c3e5b71374c177'