API Reference

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.

SQL API

#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();

#jsonschema_debug()

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

select jsonschema_debug();