NAME

JsonSQL::Schemas::select - JsonSQL 'select' JSON schema.

VERSION

version 0.41

SYNOPSIS

This is a JSON schema describing an SQL SELECT statement. It tries to support most of the commonly used features, including JOINs. You can instantiate this directly, but it is better to use the load_schema dispatcher from JsonSQL::Schemas::Schema.

To use this:

my $schema = JsonSQL::Schemas::select->new;
if ( eval { $schema->is_error } ) {
    return "Could not load JSON schema: $schema->{message}";
} else {
    my $schemaObj = parse_json($schema->{_json});
    ...
}

For this to be useful, you will have to create a JSON::Validator object to validate parsed JSON strings, or just use JsonSQL::Validator.

ATTRIBUTES

$jsonSchema

The SELECT schema as a JSON string.

METHODS

Constructor new -> JsonSQL::Schemas::select

Constructor method to return the $jsonSchema as a property of a new instance of this object.

AUTHOR

Chris Hoefler <bhoefler@draper.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Chris Hoefler.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.