diff --git a/src/sql/AliasGenerator.ts b/src/sql/AliasGenerator.ts index 6dffa8f..9d366ed 100644 --- a/src/sql/AliasGenerator.ts +++ b/src/sql/AliasGenerator.ts @@ -1,7 +1,16 @@ -export class AliasGenerator { +abstract class AliasGenerator { private aliasCounter: number = 0 + protected abstract prefix: string newAlias() { - return `table_${++this.aliasCounter}`; + return `${this.prefix}_${++this.aliasCounter}`; } } + +export class RowsetAliasGenerator extends AliasGenerator { + prefix = "rowset" +} + +export class ColumnAliasGenerator extends AliasGenerator { + prefix = "column" +} diff --git a/src/sql/SingleStoreQueryBuilder.ts b/src/sql/SingleStoreQueryBuilder.ts index 5380944..fa7a4f7 100644 --- a/src/sql/SingleStoreQueryBuilder.ts +++ b/src/sql/SingleStoreQueryBuilder.ts @@ -1,7 +1,7 @@ -import { Aggregate, BadRequest, ComparisonTarget, ComparisonValue, ExistsInCollection, Expression, Field, OrderBy, OrderByElement, PathElement, Query, Relationship } from "@hasura/ndc-sdk-typescript" +import { Aggregate, BadRequest, ComparisonTarget, ComparisonValue, ExistsInCollection, Expression, Field, NotSupported, OrderBy, OrderByElement, PathElement, Query, Relationship } from "@hasura/ndc-sdk-typescript" import { Configuration } from ".." import { SingleStoreQuery } from "./SingleStoreQuery" -import { AliasGenerator } from "./AliasGenerator" +import { RowsetAliasGenerator, ColumnAliasGenerator } from "./AliasGenerator" export class SingleStoreQueryBuilder { configuration: Configuration @@ -12,11 +12,13 @@ export class SingleStoreQueryBuilder { parentRelationship: Relationship | null aggregateRowsToObject = true defaultOrderByColumn: string | null = null - aliasGenerator: AliasGenerator = new AliasGenerator() + rowsetAliasGenerator: RowsetAliasGenerator = new RowsetAliasGenerator() + columnAliasGenerator: ColumnAliasGenerator = new ColumnAliasGenerator() subqueries: { [k: string]: SingleStoreQuery } = {} orderByElementToSubqueryAlias: Map = new Map() comparisonTargetToSubqueryAlias: Map = new Map() + orderByElementAlias: Map = new Map() sqlParts: string[] = [] parameters: any[] = [] @@ -46,7 +48,7 @@ export class SingleStoreQueryBuilder { if (this.aggregateRowsToObject) { this.defaultOrderByColumn = "row" } - this.sqlParts.push(this.selectFields(query.fields)) + this.sqlParts.push(this.selectFields(query.fields, query.order_by)) } else { throw new BadRequest("Neither aggregates nor fields are specified") } @@ -106,30 +108,67 @@ export class SingleStoreQueryBuilder { } } - private selectFields(fields: { [k: string]: Field }): string { - return `SELECT JSON_BUILD_OBJECT(${Object.entries(fields) - .map(([fieldName, field]): string => { - switch (field.type) { - case "column": - // TODO: escape - return `'${fieldName}', ${this.collection}.${field.column}` - case "relationship": - const tableName = this.aliasGenerator.newAlias() - const relationship = this.relationships[field.relationship] - - this.subqueries[tableName] = new SingleStoreQueryBuilder( - this.configuration, - this.variables, - relationship.target_collection, - this.relationships, - this.collection, - relationship - ).build(field.query) + private visitSelectField(field: Field): string { + switch (field.type) { + case "column": + // TODO: escape + return `${this.collection}.${field.column}` + case "relationship": + const tableName = this.rowsetAliasGenerator.newAlias() + const relationship = this.relationships[field.relationship] - // TODO: escape - return `'${fieldName}', ${tableName}.data` + this.subqueries[tableName] = new SingleStoreQueryBuilder( + this.configuration, + this.variables, + relationship.target_collection, + this.relationships, + this.collection, + relationship + ).build(field.query) + + // TODO: escape + return `${tableName}.data` + } + } + + private selectFields(fields: { [k: string]: Field }, orderBy: OrderBy | null | undefined): string { + const selectElements = [] + + if (this.aggregateRowsToObject) { + selectElements.push(`JSON_BUILD_OBJECT(${Object.entries(fields) + .map(([fieldName, field]): string => { + const column = this.visitSelectField(field) + return `'${fieldName}', ${column}` + }).join(", ")}) AS row`) + } else { + Object.entries(fields).forEach(([fieldName, field]) => { + const column = this.visitSelectField(field) + selectElements.push(`${column} AS ${fieldName}`) + }) + } + + orderBy?.elements.forEach(element => { + const alias = this.columnAliasGenerator.newAlias() + this.orderByElementAlias.set(element, alias) + + if (element.target.path.length > 0) { + // TODO escape + selectElements.push(`${this.orderByElementToSubqueryAlias.get(element)}.order_expr AS ${alias}`); + } else { + switch (element.target.type) { + case 'column': + // TODO escape + selectElements.push(`${this.collection}.${element.target.name} AS ${alias}`); + break + case 'single_column_aggregate': + throw new BadRequest("Empty path for single_column_aggregate orderby element"); + case 'star_count_aggregate': + throw new BadRequest("Empty path for star_column_aggregate orderby element"); } - }).join(", ")}) AS row` + } + }) + + return `SELECT ${selectElements.join(", ")}` } private subqueriesFromOrderBy(orderBy?: OrderBy | null) { @@ -157,35 +196,35 @@ export class SingleStoreQueryBuilder { this.relationships, this.collection, rel, - false + target.type == "star_count_aggregate" ).build(query) - var tableName = this.aliasGenerator.newAlias() + var tableName = this.rowsetAliasGenerator.newAlias() switch (target.type) { case "column": // TODO: escape subquery = new SingleStoreQuery( - `SELECT ANY_VALUE(${tableName}.${target.name}) AS order_expr FROM ((${subquery.sql}) AS ${tableName})`, + `SELECT ANY_VALUE(${tableName}.${colName}) AS order_expr FROM((${subquery.sql}) AS ${tableName})`, subquery.parameters ) break; case "single_column_aggregate": // TODO: escape subquery = new SingleStoreQuery( - `SELECT ${this.mapAggregate(target.function)}(${tableName}.${target.column}) AS order_expr FROM ((${subquery}) AS ${tableName})`, + `SELECT ${this.mapAggregate(target.function)}(${tableName}.${colName}) AS order_expr FROM((${subquery.sql}) AS ${tableName})`, subquery.parameters ) break; case "star_count_aggregate": // TODO: escape subquery = new SingleStoreQuery( - `SELECT COUNT(*) AS order_expr FROM ((${subquery}) AS ${tableName})`, + `SELECT COUNT(*) AS order_expr FROM((${subquery.sql}) AS ${tableName})`, subquery.parameters ) break; } - tableName = this.aliasGenerator.newAlias() + tableName = this.rowsetAliasGenerator.newAlias() this.subqueries[tableName] = subquery this.orderByElementToSubqueryAlias.set(element, tableName) }) @@ -194,7 +233,7 @@ export class SingleStoreQueryBuilder { private pathToQuery(path: PathElement[], fieldName: string): Query { var res: Query = { fields: { - fieldName: { + [fieldName]: { type: "column", column: fieldName } @@ -205,7 +244,7 @@ export class SingleStoreQueryBuilder { for (let i = path.length - 1; i >= 1; i--) { res = { fields: { - fieldName: { + [fieldName]: { type: "relationship", query: res, relationship: path[i].relationship, @@ -227,7 +266,7 @@ export class SingleStoreQueryBuilder { private join() { Object.keys(this.subqueries).forEach(alias => { const subquery = this.subqueries[alias] - this.parameters.push(subquery.parameters) + this.parameters = this.parameters.concat(subquery.parameters) this.sqlParts.push(`LEFT OUTER JOIN LATERAL ( ${subquery.sql} ) AS ${alias} ON TRUE`) @@ -301,16 +340,16 @@ ${subquery.sql} const relationship: Relationship = this.relationships[collectionInfo.relationship] return `EXISTS ( -SELECT 1 FROM ${relationship.target_collection} + SELECT 1 FROM ${relationship.target_collection} ${this.visitWhere(relationship.target_collection, expression.predicate, collection, relationship)} LIMIT 1 -)` + )` case "unrelated": return `EXISTS ( -SELECT 1 FROM ${collectionInfo.collection} -${this.visitWhere(collection, expression.predicate, null, null)} + SELECT 1 FROM ${collectionInfo.collection} +${this.visitWhere(collectionInfo.collection, expression.predicate, null, null)} LIMIT 1 -)` + )` default: throw new BadRequest("Unknown exists type"); } @@ -330,8 +369,7 @@ LIMIT 1 return `${collection}.${target.name}`; } case 'root_collection_column': - // TODO: escape - return `${this.collection}.${target.name}`; + throw new NotSupported("Referencing root collection is not supported") } } @@ -396,14 +434,14 @@ LIMIT 1 false ).build(query) - var tableName = this.aliasGenerator.newAlias() + var tableName = this.rowsetAliasGenerator.newAlias() subquery = new SingleStoreQuery( // TODO escape `SELECT ANY_VALUE(${tableName}.${target.name}) AS comp_expr FROM ((${subquery.sql}) AS ${tableName})`, subquery.parameters ) - tableName = this.aliasGenerator.newAlias() + tableName = this.rowsetAliasGenerator.newAlias() this.subqueries[tableName] = subquery this.comparisonTargetToSubqueryAlias.set(target, tableName) } @@ -416,34 +454,26 @@ LIMIT 1 } private orderBy(orderBy?: OrderBy | null) { + this.sqlParts.push(this.visitOrderBy(orderBy)); + } + + private visitOrderBy(orderBy?: OrderBy | null): string { if (orderBy && orderBy.elements.length > 0) { - this.sqlParts.push(`ORDER BY ${orderBy.elements.map(element => { + return `ORDER BY ${orderBy.elements.map(element => { const direction = element.order_direction === 'asc' ? 'ASC' : 'DESC'; - if (element.target.path.length > 0) { - // TODO escape - return `${this.orderByElementToSubqueryAlias.get(element)}.order_expr ${direction} `; - } else { - switch (element.target.type) { - case 'column': - // TODO escape - return `${this.collection}.${element.target.name} ${direction} `; - case 'single_column_aggregate': - throw new BadRequest("Empty path for single_column_aggregate orderby element"); - case 'star_count_aggregate': - throw new BadRequest("Empty path for star_column_aggregate orderby element"); - } - } - }).join(", ")}`) + return `${this.orderByElementAlias.get(element)} ${direction} `; + }).join(", ") + } ${this.defaultOrderByColumn ? `, ${this.defaultOrderByColumn}` : ""} ` } else if (this.defaultOrderByColumn) { - this.sqlParts.push(`ORDER BY ${this.defaultOrderByColumn}`) + return `ORDER BY ${this.defaultOrderByColumn} ` + } else { + return ""; } } private limit(limit?: number | null) { if (limit) { this.sqlParts.push(`LIMIT ${limit}`) - } else { - this.sqlParts.push(`LIMIT ${Number.MAX_SAFE_INTEGER}`) } } @@ -533,9 +563,10 @@ LIMIT 1 * [ 1 ] */ build(query: Query): SingleStoreQuery { - this.select(query) this.subqueriesFromOrderBy(query.order_by) this.subqueriesFromExpression(query.predicate) + + this.select(query) this.from() this.join() this.where(query.predicate) @@ -545,11 +576,12 @@ LIMIT 1 var sql = this.sqlParts.join('\n') + const table = this.rowsetAliasGenerator.newAlias() if (this.aggregateRowsToObject) { - sql = `SELECT JSON_BUILD_OBJECT('rows', JSON_AGG(row)) AS data -FROM ( + sql = `SELECT JSON_BUILD_OBJECT('rows', JSON_AGG(row ${this.visitOrderBy(query.order_by)})) AS data +FROM( ${sql} -)` +) AS ${table}` } return { diff --git a/test-snapshots/capabilities b/test-snapshots/capabilities new file mode 100644 index 0000000..6325438 --- /dev/null +++ b/test-snapshots/capabilities @@ -0,0 +1,18 @@ +{ + "version": "0.1.2", + "capabilities": { + "query": { + "aggregates": {}, + "variables": {}, + "explain": {} + }, + "mutation": { + "transactional": {}, + "explain": {} + }, + "relationships": { + "relation_comparisons": {}, + "order_by_aggregate": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/10009cedee9a81be/expected.json b/test-snapshots/query/10009cedee9a81be/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/10009cedee9a81be/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10009cedee9a81be/request.json b/test-snapshots/query/10009cedee9a81be/request.json new file mode 100644 index 0000000..f406e6f --- /dev/null +++ b/test-snapshots/query/10009cedee9a81be/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-10-22" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1010830712e91403/expected.json b/test-snapshots/query/1010830712e91403/expected.json new file mode 100644 index 0000000..e9cccaa --- /dev/null +++ b/test-snapshots/query/1010830712e91403/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1010830712e91403/request.json b/test-snapshots/query/1010830712e91403/request.json new file mode 100644 index 0000000..5540e85 --- /dev/null +++ b/test-snapshots/query/1010830712e91403/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/103404ef229d429f/expected.json b/test-snapshots/query/103404ef229d429f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/103404ef229d429f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/103404ef229d429f/request.json b/test-snapshots/query/103404ef229d429f/request.json new file mode 100644 index 0000000..a9a0fde --- /dev/null +++ b/test-snapshots/query/103404ef229d429f/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/10524d1dc4679497/expected.json b/test-snapshots/query/10524d1dc4679497/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/10524d1dc4679497/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10524d1dc4679497/request.json b/test-snapshots/query/10524d1dc4679497/request.json new file mode 100644 index 0000000..ee8f867 --- /dev/null +++ b/test-snapshots/query/10524d1dc4679497/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/10583ebd64b0c44a/expected.json b/test-snapshots/query/10583ebd64b0c44a/expected.json new file mode 100644 index 0000000..a3b3cad --- /dev/null +++ b/test-snapshots/query/10583ebd64b0c44a/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 8, + "TrackId": 1007 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10583ebd64b0c44a/request.json b/test-snapshots/query/10583ebd64b0c44a/request.json new file mode 100644 index 0000000..6fc42f4 --- /dev/null +++ b/test-snapshots/query/10583ebd64b0c44a/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1007 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/10b30879cd945dca/expected.json b/test-snapshots/query/10b30879cd945dca/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/10b30879cd945dca/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10b30879cd945dca/request.json b/test-snapshots/query/10b30879cd945dca/request.json new file mode 100644 index 0000000..5695a6d --- /dev/null +++ b/test-snapshots/query/10b30879cd945dca/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/10d320d0a0e952ac/expected.json b/test-snapshots/query/10d320d0a0e952ac/expected.json new file mode 100644 index 0000000..e64783c --- /dev/null +++ b/test-snapshots/query/10d320d0a0e952ac/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 105, + "ArtistId": 90, + "Title": "No Prayer For The Dying" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10d320d0a0e952ac/request.json b/test-snapshots/query/10d320d0a0e952ac/request.json new file mode 100644 index 0000000..ea93f83 --- /dev/null +++ b/test-snapshots/query/10d320d0a0e952ac/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "No Prayer For The Dying" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/10e4bf61e43107b6/expected.json b/test-snapshots/query/10e4bf61e43107b6/expected.json new file mode 100644 index 0000000..dbafa3e --- /dev/null +++ b/test-snapshots/query/10e4bf61e43107b6/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6228": "Opera" + }, + { + "Name_6228": "Classical" + }, + { + "Name_6228": "Alternative" + }, + { + "Name_6228": "Comedy" + }, + { + "Name_6228": "Drama" + }, + { + "Name_6228": "Sci Fi & Fantasy" + }, + { + "Name_6228": "TV Shows" + }, + { + "Name_6228": "Science Fiction" + }, + { + "Name_6228": "Hip Hop/Rap" + }, + { + "Name_6228": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10e4bf61e43107b6/request.json b/test-snapshots/query/10e4bf61e43107b6/request.json new file mode 100644 index 0000000..d9ea51f --- /dev/null +++ b/test-snapshots/query/10e4bf61e43107b6/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_6228": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/10e975484ec62e/expected.json b/test-snapshots/query/10e975484ec62e/expected.json new file mode 100644 index 0000000..7d10553 --- /dev/null +++ b/test-snapshots/query/10e975484ec62e/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Klanova 9/506", + "BillingCity": "Prague", + "BillingCountry": "Czech Republic", + "BillingPostalCode": "14700", + "BillingState": null, + "CustomerId": 5, + "InvoiceDate": "2010-03-12", + "InvoiceId": 100, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/10e975484ec62e/request.json b/test-snapshots/query/10e975484ec62e/request.json new file mode 100644 index 0000000..f0e3f2e --- /dev/null +++ b/test-snapshots/query/10e975484ec62e/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/110a91a72259add3/expected.json b/test-snapshots/query/110a91a72259add3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/110a91a72259add3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/110a91a72259add3/request.json b/test-snapshots/query/110a91a72259add3/request.json new file mode 100644 index 0000000..a597ccb --- /dev/null +++ b/test-snapshots/query/110a91a72259add3/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1122387e276f4ac5/expected.json b/test-snapshots/query/1122387e276f4ac5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1122387e276f4ac5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1122387e276f4ac5/request.json b/test-snapshots/query/1122387e276f4ac5/request.json new file mode 100644 index 0000000..0fed58e --- /dev/null +++ b/test-snapshots/query/1122387e276f4ac5/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263288 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1135674e0386a700/expected.json b/test-snapshots/query/1135674e0386a700/expected.json new file mode 100644 index 0000000..498aaa2 --- /dev/null +++ b/test-snapshots/query/1135674e0386a700/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 83, + "Bytes": 2930596, + "Composer": "jimmy van heusen/sammy cahn", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 89730, + "Name": "Love And Marriage", + "TrackId": 1042, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 4856954, + "Composer": "bart howard", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 149263, + "Name": "Fly Me To The Moon", + "TrackId": 1045, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 4913383, + "Composer": "carl sigman/gilbert becaud/pierre leroyer", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 149995, + "Name": "What Now My Love", + "TrackId": 1039, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5055295, + "Composer": "berthold kaempfert/charles singleton/eddie snyder", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 155794, + "Name": "Strangers In The Night", + "TrackId": 1034, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5210643, + "Composer": "carson c. parks", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 158615, + "Name": "Something Stupid", + "TrackId": 1037, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5240043, + "Composer": "george gershwin/ira gershwin", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 161227, + "Name": "They Can't Take That Away From Me", + "TrackId": 1043, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5548581, + "Composer": "jim croce", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 169900, + "Name": "Bad, Bad Leroy Brown", + "TrackId": 1053, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5557537, + "Composer": "orlando murden/ronald miller", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 171154, + "Name": "For Once In My Life", + "TrackId": 1041, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5633730, + "Composer": "carolyn leigh/cy coleman", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 173583, + "Name": "The Best Is Yet To Come", + "TrackId": 1047, + "UnitPrice": 0.99 + }, + { + "AlbumId": 83, + "Bytes": 5693242, + "Composer": "hans bradtke/heinz meier/johnny mercer", + "GenreId": 12, + "MediaTypeId": 1, + "Milliseconds": 174994, + "Name": "Summer Love", + "TrackId": 1040, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1135674e0386a700/request.json b/test-snapshots/query/1135674e0386a700/request.json new file mode 100644 index 0000000..cec9d4c --- /dev/null +++ b/test-snapshots/query/1135674e0386a700/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1163693c08b1a63e/expected.json b/test-snapshots/query/1163693c08b1a63e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1163693c08b1a63e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1163693c08b1a63e/request.json b/test-snapshots/query/1163693c08b1a63e/request.json new file mode 100644 index 0000000..efedada --- /dev/null +++ b/test-snapshots/query/1163693c08b1a63e/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/118f9590f02fdd49/expected.json b/test-snapshots/query/118f9590f02fdd49/expected.json new file mode 100644 index 0000000..7071b48 --- /dev/null +++ b/test-snapshots/query/118f9590f02fdd49/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "GenreId_count": 25, + "GenreId_distinct_count": 25, + "Name_count": 25, + "Name_distinct_count": 25 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/118f9590f02fdd49/request.json b/test-snapshots/query/118f9590f02fdd49/request.json new file mode 100644 index 0000000..aa06e35 --- /dev/null +++ b/test-snapshots/query/118f9590f02fdd49/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Genre", + "query": { + "aggregates": { + "GenreId_count": { + "type": "column_count", + "column": "GenreId", + "distinct": false + }, + "GenreId_distinct_count": { + "type": "column_count", + "column": "GenreId", + "distinct": true + }, + "Name_count": { + "type": "column_count", + "column": "Name", + "distinct": false + }, + "Name_distinct_count": { + "type": "column_count", + "column": "Name", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1194578c805ea566/expected.json b/test-snapshots/query/1194578c805ea566/expected.json new file mode 100644 index 0000000..2d85721 --- /dev/null +++ b/test-snapshots/query/1194578c805ea566/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1194578c805ea566/request.json b/test-snapshots/query/1194578c805ea566/request.json new file mode 100644 index 0000000..841d388 --- /dev/null +++ b/test-snapshots/query/1194578c805ea566/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/119cfe586b09bbe/expected.json b/test-snapshots/query/119cfe586b09bbe/expected.json new file mode 100644 index 0000000..196f338 --- /dev/null +++ b/test-snapshots/query/119cfe586b09bbe/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_8215": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "Title_8215": "Mozart: Chamber Music" + }, + { + "Title_8215": "Monteverdi: L'Orfeo" + }, + { + "Title_8215": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "Title_8215": "Respighi:Pines of Rome" + }, + { + "Title_8215": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "Title_8215": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "Title_8215": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "Title_8215": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "Title_8215": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/119cfe586b09bbe/request.json b/test-snapshots/query/119cfe586b09bbe/request.json new file mode 100644 index 0000000..f707b5c --- /dev/null +++ b/test-snapshots/query/119cfe586b09bbe/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_8215": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/11ae666fddceef87/expected.json b/test-snapshots/query/11ae666fddceef87/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/11ae666fddceef87/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/11ae666fddceef87/request.json b/test-snapshots/query/11ae666fddceef87/request.json new file mode 100644 index 0000000..8d4d61d --- /dev/null +++ b/test-snapshots/query/11ae666fddceef87/request.json @@ -0,0 +1,171 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 5G3" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "andrew@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 262-3443" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/11aec23a837de16e/expected.json b/test-snapshots/query/11aec23a837de16e/expected.json new file mode 100644 index 0000000..6945296 --- /dev/null +++ b/test-snapshots/query/11aec23a837de16e/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 141, + "ArtistId": 100, + "Title": "Greatest Hits" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/11aec23a837de16e/request.json b/test-snapshots/query/11aec23a837de16e/request.json new file mode 100644 index 0000000..20bb627 --- /dev/null +++ b/test-snapshots/query/11aec23a837de16e/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/11c5c6520a729c03/expected.json b/test-snapshots/query/11c5c6520a729c03/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/11c5c6520a729c03/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/11c5c6520a729c03/request.json b/test-snapshots/query/11c5c6520a729c03/request.json new file mode 100644 index 0000000..017df25 --- /dev/null +++ b/test-snapshots/query/11c5c6520a729c03/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/11dfee5ede1ece70/expected.json b/test-snapshots/query/11dfee5ede1ece70/expected.json new file mode 100644 index 0000000..e809809 --- /dev/null +++ b/test-snapshots/query/11dfee5ede1ece70/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/11dfee5ede1ece70/request.json b/test-snapshots/query/11dfee5ede1ece70/request.json new file mode 100644 index 0000000..4826b0d --- /dev/null +++ b/test-snapshots/query/11dfee5ede1ece70/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/11e46e310809134/expected.json b/test-snapshots/query/11e46e310809134/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/11e46e310809134/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/11e46e310809134/request.json b/test-snapshots/query/11e46e310809134/request.json new file mode 100644 index 0000000..700a6b3 --- /dev/null +++ b/test-snapshots/query/11e46e310809134/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1219216ab7cce942/expected.json b/test-snapshots/query/1219216ab7cce942/expected.json new file mode 100644 index 0000000..6c40dde --- /dev/null +++ b/test-snapshots/query/1219216ab7cce942/expected.json @@ -0,0 +1,140 @@ +[ + { + "rows": [ + { + "ArtistId_2175": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "Name_6023": "AC/DC" + }, + { + "ArtistId_2175": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 13, + "ArtistId": 10, + "Title": "The Best Of Billy Cobham" + } + ] + }, + "Name_6023": "Billy Cobham" + }, + { + "ArtistId_2175": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 141, + "ArtistId": 100, + "Title": "Greatest Hits" + } + ] + }, + "Name_6023": "Lenny Kravitz" + }, + { + "ArtistId_2175": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 142, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId": 143, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + }, + "Name_6023": "Lulu Santos" + }, + { + "ArtistId_2175": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 144, + "ArtistId": 102, + "Title": "Misplaced Childhood" + } + ] + }, + "Name_6023": "Marillion" + }, + { + "ArtistId_2175": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 145, + "ArtistId": 103, + "Title": "Barulhinho Bom" + } + ] + }, + "Name_6023": "Marisa Monte" + }, + { + "ArtistId_2175": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 146, + "ArtistId": 104, + "Title": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + }, + "Name_6023": "Marvin Gaye" + }, + { + "ArtistId_2175": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 147, + "ArtistId": 105, + "Title": "The Best Of Men At Work" + } + ] + }, + "Name_6023": "Men At Work" + }, + { + "ArtistId_2175": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 160, + "ArtistId": 106, + "Title": "Ace Of Spades" + } + ] + }, + "Name_6023": "Motörhead" + }, + { + "ArtistId_2175": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_6023": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1219216ab7cce942/request.json b/test-snapshots/query/1219216ab7cce942/request.json new file mode 100644 index 0000000..b7e6168 --- /dev/null +++ b/test-snapshots/query/1219216ab7cce942/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_2175": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_6023": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/125f291647d2f5bc/expected.json b/test-snapshots/query/125f291647d2f5bc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/125f291647d2f5bc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/125f291647d2f5bc/request.json b/test-snapshots/query/125f291647d2f5bc/request.json new file mode 100644 index 0000000..5a9c426 --- /dev/null +++ b/test-snapshots/query/125f291647d2f5bc/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/12a6d3cfde20a001/expected.json b/test-snapshots/query/12a6d3cfde20a001/expected.json new file mode 100644 index 0000000..1345b60 --- /dev/null +++ b/test-snapshots/query/12a6d3cfde20a001/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/12a6d3cfde20a001/request.json b/test-snapshots/query/12a6d3cfde20a001/request.json new file mode 100644 index 0000000..312e88c --- /dev/null +++ b/test-snapshots/query/12a6d3cfde20a001/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/12b763e2e9df555d/expected.json b/test-snapshots/query/12b763e2e9df555d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/12b763e2e9df555d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/12b763e2e9df555d/request.json b/test-snapshots/query/12b763e2e9df555d/request.json new file mode 100644 index 0000000..09453ba --- /dev/null +++ b/test-snapshots/query/12b763e2e9df555d/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/12d929342f2c91ca/expected.json b/test-snapshots/query/12d929342f2c91ca/expected.json new file mode 100644 index 0000000..7dc14ee --- /dev/null +++ b/test-snapshots/query/12d929342f2c91ca/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_0897": 1, + "ArtistId_8445": 1 + }, + { + "AlbumId_0897": 2, + "ArtistId_8445": 2 + }, + { + "AlbumId_0897": 3, + "ArtistId_8445": 2 + }, + { + "AlbumId_0897": 4, + "ArtistId_8445": 1 + }, + { + "AlbumId_0897": 5, + "ArtistId_8445": 3 + }, + { + "AlbumId_0897": 6, + "ArtistId_8445": 4 + }, + { + "AlbumId_0897": 7, + "ArtistId_8445": 5 + }, + { + "AlbumId_0897": 8, + "ArtistId_8445": 6 + }, + { + "AlbumId_0897": 9, + "ArtistId_8445": 7 + }, + { + "AlbumId_0897": 10, + "ArtistId_8445": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/12d929342f2c91ca/request.json b/test-snapshots/query/12d929342f2c91ca/request.json new file mode 100644 index 0000000..34b2a70 --- /dev/null +++ b/test-snapshots/query/12d929342f2c91ca/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_0897": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_8445": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/12e15a44a8a36182/expected.json b/test-snapshots/query/12e15a44a8a36182/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/12e15a44a8a36182/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/12e15a44a8a36182/request.json b/test-snapshots/query/12e15a44a8a36182/request.json new file mode 100644 index 0000000..e0a7d35 --- /dev/null +++ b/test-snapshots/query/12e15a44a8a36182/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/12f701071acbf394/expected.json b/test-snapshots/query/12f701071acbf394/expected.json new file mode 100644 index 0000000..71efd24 --- /dev/null +++ b/test-snapshots/query/12f701071acbf394/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "MediaTypeId_avg_2884": 3, + "MediaTypeId_count_9324": 5, + "MediaTypeId_sum_5529": 15, + "Name_max_9674": "Purchased AAC audio file" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/12f701071acbf394/request.json b/test-snapshots/query/12f701071acbf394/request.json new file mode 100644 index 0000000..8f065dc --- /dev/null +++ b/test-snapshots/query/12f701071acbf394/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "Name_max_9674": { + "type": "single_column", + "column": "Name", + "function": "max" + }, + "MediaTypeId_avg_2884": { + "type": "single_column", + "column": "MediaTypeId", + "function": "avg" + }, + "MediaTypeId_count_9324": { + "type": "single_column", + "column": "MediaTypeId", + "function": "count" + }, + "MediaTypeId_sum_5529": { + "type": "single_column", + "column": "MediaTypeId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1304578a1e48f99f/expected.json b/test-snapshots/query/1304578a1e48f99f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1304578a1e48f99f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1304578a1e48f99f/request.json b/test-snapshots/query/1304578a1e48f99f/request.json new file mode 100644 index 0000000..229ba17 --- /dev/null +++ b/test-snapshots/query/1304578a1e48f99f/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Callahan" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/131cb6e168fe688a/expected.json b/test-snapshots/query/131cb6e168fe688a/expected.json new file mode 100644 index 0000000..02cfb91 --- /dev/null +++ b/test-snapshots/query/131cb6e168fe688a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_7696": 1 + }, + { + "ArtistId_7696": 2 + }, + { + "ArtistId_7696": 3 + }, + { + "ArtistId_7696": 4 + }, + { + "ArtistId_7696": 5 + }, + { + "ArtistId_7696": 6 + }, + { + "ArtistId_7696": 7 + }, + { + "ArtistId_7696": 8 + }, + { + "ArtistId_7696": 9 + }, + { + "ArtistId_7696": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/131cb6e168fe688a/request.json b/test-snapshots/query/131cb6e168fe688a/request.json new file mode 100644 index 0000000..4a123cb --- /dev/null +++ b/test-snapshots/query/131cb6e168fe688a/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_7696": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1322fa94868989ca/expected.json b/test-snapshots/query/1322fa94868989ca/expected.json new file mode 100644 index 0000000..3117a23 --- /dev/null +++ b/test-snapshots/query/1322fa94868989ca/expected.json @@ -0,0 +1,134 @@ +[ + { + "rows": [ + { + "Address_0299": "683 10 Street SW", + "BirthDate_0481": "1947-09-19", + "City_2541": "Calgary", + "Country_2226": "Canada", + "Email_2146": "margaret@chinookcorp.com", + "EmployeeId_0825": 4, + "Fax_8251": "+1 (403) 263-4289", + "FirstName_7168": "Margaret", + "HireDate_9433": "2003-05-03", + "LastName_4481": "Park", + "PostalCode_2292": "T2P 5G3", + "ReportsTo_2472": 2, + "State_0688": "AB", + "Title_1251": "Sales Support Agent" + }, + { + "Address_0299": "825 8 Ave SW", + "BirthDate_0481": "1958-12-08", + "City_2541": "Calgary", + "Country_2226": "Canada", + "Email_2146": "nancy@chinookcorp.com", + "EmployeeId_0825": 2, + "Fax_8251": "+1 (403) 262-3322", + "FirstName_7168": "Nancy", + "HireDate_9433": "2002-05-01", + "LastName_4481": "Edwards", + "PostalCode_2292": "T2P 2T3", + "ReportsTo_2472": 1, + "State_0688": "AB", + "Title_1251": "Sales Manager" + }, + { + "Address_0299": "11120 Jasper Ave NW", + "BirthDate_0481": "1962-02-18", + "City_2541": "Edmonton", + "Country_2226": "Canada", + "Email_2146": "andrew@chinookcorp.com", + "EmployeeId_0825": 1, + "Fax_8251": "+1 (780) 428-3457", + "FirstName_7168": "Andrew", + "HireDate_9433": "2002-08-14", + "LastName_4481": "Adams", + "PostalCode_2292": "T5K 2N1", + "ReportsTo_2472": null, + "State_0688": "AB", + "Title_1251": "General Manager" + }, + { + "Address_0299": "7727B 41 Ave", + "BirthDate_0481": "1965-03-03", + "City_2541": "Calgary", + "Country_2226": "Canada", + "Email_2146": "steve@chinookcorp.com", + "EmployeeId_0825": 5, + "Fax_8251": "1 (780) 836-9543", + "FirstName_7168": "Steve", + "HireDate_9433": "2003-10-17", + "LastName_4481": "Johnson", + "PostalCode_2292": "T3B 1Y7", + "ReportsTo_2472": 2, + "State_0688": "AB", + "Title_1251": "Sales Support Agent" + }, + { + "Address_0299": "923 7 ST NW", + "BirthDate_0481": "1968-01-09", + "City_2541": "Lethbridge", + "Country_2226": "Canada", + "Email_2146": "laura@chinookcorp.com", + "EmployeeId_0825": 8, + "Fax_8251": "+1 (403) 467-8772", + "FirstName_7168": "Laura", + "HireDate_9433": "2004-03-04", + "LastName_4481": "Callahan", + "PostalCode_2292": "T1H 1Y8", + "ReportsTo_2472": 6, + "State_0688": "AB", + "Title_1251": "IT Staff" + }, + { + "Address_0299": "590 Columbia Boulevard West", + "BirthDate_0481": "1970-05-29", + "City_2541": "Lethbridge", + "Country_2226": "Canada", + "Email_2146": "robert@chinookcorp.com", + "EmployeeId_0825": 7, + "Fax_8251": "+1 (403) 456-8485", + "FirstName_7168": "Robert", + "HireDate_9433": "2004-01-02", + "LastName_4481": "King", + "PostalCode_2292": "T1K 5N8", + "ReportsTo_2472": 6, + "State_0688": "AB", + "Title_1251": "IT Staff" + }, + { + "Address_0299": "5827 Bowness Road NW", + "BirthDate_0481": "1973-07-01", + "City_2541": "Calgary", + "Country_2226": "Canada", + "Email_2146": "michael@chinookcorp.com", + "EmployeeId_0825": 6, + "Fax_8251": "+1 (403) 246-9899", + "FirstName_7168": "Michael", + "HireDate_9433": "2003-10-17", + "LastName_4481": "Mitchell", + "PostalCode_2292": "T3B 0C5", + "ReportsTo_2472": 1, + "State_0688": "AB", + "Title_1251": "IT Manager" + }, + { + "Address_0299": "1111 6 Ave SW", + "BirthDate_0481": "1973-08-29", + "City_2541": "Calgary", + "Country_2226": "Canada", + "Email_2146": "jane@chinookcorp.com", + "EmployeeId_0825": 3, + "Fax_8251": "+1 (403) 262-6712", + "FirstName_7168": "Jane", + "HireDate_9433": "2002-04-01", + "LastName_4481": "Peacock", + "PostalCode_2292": "T2P 5M5", + "ReportsTo_2472": 2, + "State_0688": "AB", + "Title_1251": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1322fa94868989ca/request.json b/test-snapshots/query/1322fa94868989ca/request.json new file mode 100644 index 0000000..d36666a --- /dev/null +++ b/test-snapshots/query/1322fa94868989ca/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_0299": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_0481": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_2541": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2226": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_2146": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_0825": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_8251": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7168": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_9433": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_4481": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Title_1251": { + "type": "column", + "column": "Title", + "fields": null + }, + "PostalCode_2292": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_2472": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_0688": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BirthDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/133f0a7106a8756f/expected.json b/test-snapshots/query/133f0a7106a8756f/expected.json new file mode 100644 index 0000000..859ef9d --- /dev/null +++ b/test-snapshots/query/133f0a7106a8756f/expected.json @@ -0,0 +1,194 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + }, + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + }, + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_1299": 1, + "UnitPrice_6703": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/133f0a7106a8756f/request.json b/test-snapshots/query/133f0a7106a8756f/request.json new file mode 100644 index 0000000..b979373 --- /dev/null +++ b/test-snapshots/query/133f0a7106a8756f/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "Quantity_1299": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "UnitPrice_6703": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/134cf2befe50be2e/expected.json b/test-snapshots/query/134cf2befe50be2e/expected.json new file mode 100644 index 0000000..149a0d3 --- /dev/null +++ b/test-snapshots/query/134cf2befe50be2e/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2009-03-06", + "Total_3257": 5.94 + }, + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2009-10-25", + "Total_3257": 0.99 + }, + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2011-04-18", + "Total_3257": 1.98 + }, + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2011-05-29", + "Total_3257": 18.86 + }, + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2012-01-27", + "Total_3257": 8.91 + }, + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2013-09-02", + "Total_3257": 1.98 + }, + { + "BillingAddress_5335": "319 N. Frances Street", + "BillingCity_9329": "Madison", + "BillingPostalCode_7087": "53703", + "CustomerId_9960": 25, + "InvoiceDate_4151": "2013-12-05", + "Total_3257": 3.96 + }, + { + "BillingAddress_5335": "1 Microsoft Way", + "BillingCity_9329": "Redmond", + "BillingPostalCode_7087": "98052-8300", + "CustomerId_9960": 17, + "InvoiceDate_4151": "2009-03-04", + "Total_3257": 1.98 + }, + { + "BillingAddress_5335": "1 Microsoft Way", + "BillingCity_9329": "Redmond", + "BillingPostalCode_7087": "98052-8300", + "CustomerId_9960": 17, + "InvoiceDate_4151": "2009-06-06", + "Total_3257": 3.96 + }, + { + "BillingAddress_5335": "1 Microsoft Way", + "BillingCity_9329": "Redmond", + "BillingPostalCode_7087": "98052-8300", + "CustomerId_9960": 17, + "InvoiceDate_4151": "2009-09-08", + "Total_3257": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/134cf2befe50be2e/request.json b/test-snapshots/query/134cf2befe50be2e/request.json new file mode 100644 index 0000000..de1f239 --- /dev/null +++ b/test-snapshots/query/134cf2befe50be2e/request.json @@ -0,0 +1,52 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_5335": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_9329": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "InvoiceDate_4151": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "BillingPostalCode_7087": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "Total_3257": { + "type": "column", + "column": "Total", + "fields": null + }, + "CustomerId_9960": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/137905ab39bb72d9/expected.json b/test-snapshots/query/137905ab39bb72d9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/137905ab39bb72d9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/137905ab39bb72d9/request.json b/test-snapshots/query/137905ab39bb72d9/request.json new file mode 100644 index 0000000..b39d4db --- /dev/null +++ b/test-snapshots/query/137905ab39bb72d9/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/137f8dd2625373b6/expected.json b/test-snapshots/query/137f8dd2625373b6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/137f8dd2625373b6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/137f8dd2625373b6/request.json b/test-snapshots/query/137f8dd2625373b6/request.json new file mode 100644 index 0000000..724e51d --- /dev/null +++ b/test-snapshots/query/137f8dd2625373b6/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock (We Salute You)" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/137fee844b9aaea/expected.json b/test-snapshots/query/137fee844b9aaea/expected.json new file mode 100644 index 0000000..a0ce596 --- /dev/null +++ b/test-snapshots/query/137fee844b9aaea/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 100, + "Name": "Lenny Kravitz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/137fee844b9aaea/request.json b/test-snapshots/query/137fee844b9aaea/request.json new file mode 100644 index 0000000..76d9dbd --- /dev/null +++ b/test-snapshots/query/137fee844b9aaea/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/13a2200680bbf170/expected.json b/test-snapshots/query/13a2200680bbf170/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/13a2200680bbf170/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/13a2200680bbf170/request.json b/test-snapshots/query/13a2200680bbf170/request.json new file mode 100644 index 0000000..7826dcb --- /dev/null +++ b/test-snapshots/query/13a2200680bbf170/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8080" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/13c750ac40623089/expected.json b/test-snapshots/query/13c750ac40623089/expected.json new file mode 100644 index 0000000..e4f4358 --- /dev/null +++ b/test-snapshots/query/13c750ac40623089/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_6591": 50 + }, + { + "ArtistId_6591": 179 + }, + { + "ArtistId_6591": 230 + }, + { + "ArtistId_6591": 90 + }, + { + "ArtistId_6591": 90 + }, + { + "ArtistId_6591": 90 + }, + { + "ArtistId_6591": 219 + }, + { + "ArtistId_6591": 99 + }, + { + "ArtistId_6591": 132 + }, + { + "ArtistId_6591": 106 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/13c750ac40623089/request.json b/test-snapshots/query/13c750ac40623089/request.json new file mode 100644 index 0000000..a5047aa --- /dev/null +++ b/test-snapshots/query/13c750ac40623089/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "ArtistId_6591": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1405df6fdd15f666/expected.json b/test-snapshots/query/1405df6fdd15f666/expected.json new file mode 100644 index 0000000..6d62f37 --- /dev/null +++ b/test-snapshots/query/1405df6fdd15f666/expected.json @@ -0,0 +1,266 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_InvoiceCustomerId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1405df6fdd15f666/request.json b/test-snapshots/query/1405df6fdd15f666/request.json new file mode 100644 index 0000000..417ddcd --- /dev/null +++ b/test-snapshots/query/1405df6fdd15f666/request.json @@ -0,0 +1,93 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1409b33b4a897c95/expected.json b/test-snapshots/query/1409b33b4a897c95/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1409b33b4a897c95/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1409b33b4a897c95/request.json b/test-snapshots/query/1409b33b4a897c95/request.json new file mode 100644 index 0000000..a0e2d1b --- /dev/null +++ b/test-snapshots/query/1409b33b4a897c95/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/14173a0956368bfc/expected.json b/test-snapshots/query/14173a0956368bfc/expected.json new file mode 100644 index 0000000..f0a164f --- /dev/null +++ b/test-snapshots/query/14173a0956368bfc/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_7231": 1, + "TrackId_5048": 3503 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3502 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3501 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3500 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3499 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3498 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3497 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3496 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3495 + }, + { + "PlaylistId_7231": 1, + "TrackId_5048": 3494 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/14173a0956368bfc/request.json b/test-snapshots/query/14173a0956368bfc/request.json new file mode 100644 index 0000000..bc6da91 --- /dev/null +++ b/test-snapshots/query/14173a0956368bfc/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_7231": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_5048": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/14d0f0825922b058/expected.json b/test-snapshots/query/14d0f0825922b058/expected.json new file mode 100644 index 0000000..8d06385 --- /dev/null +++ b/test-snapshots/query/14d0f0825922b058/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_8787": 1, + "TrackId_6728": 3503 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3502 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3501 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3500 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3499 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3498 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3497 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3496 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3495 + }, + { + "PlaylistId_8787": 1, + "TrackId_6728": 3494 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/14d0f0825922b058/request.json b/test-snapshots/query/14d0f0825922b058/request.json new file mode 100644 index 0000000..f16a470 --- /dev/null +++ b/test-snapshots/query/14d0f0825922b058/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8787": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_6728": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/14db25d1e47e039a/expected.json b/test-snapshots/query/14db25d1e47e039a/expected.json new file mode 100644 index 0000000..740bdbb --- /dev/null +++ b/test-snapshots/query/14db25d1e47e039a/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2009-04-04", + "InvoiceId": 22, + "Total": 1.98 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2009-05-15", + "InvoiceId": 33, + "Total": 13.86 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2010-01-13", + "InvoiceId": 88, + "Total": 17.91 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2011-08-20", + "InvoiceId": 217, + "Total": 1.98 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2011-11-22", + "InvoiceId": 240, + "Total": 3.96 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2012-02-24", + "InvoiceId": 262, + "Total": 5.94 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2012-10-14", + "InvoiceId": 314, + "Total": 0.99 + }, + { + "BillingAddress": "Rua da Assunção 53", + "BillingCity": "Lisbon", + "BillingCountry": "Portugal", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 34, + "InvoiceDate": "2009-05-05", + "InvoiceId": 28, + "Total": 1.98 + }, + { + "BillingAddress": "Rua da Assunção 53", + "BillingCity": "Lisbon", + "BillingCountry": "Portugal", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 34, + "InvoiceDate": "2009-08-07", + "InvoiceId": 51, + "Total": 3.96 + }, + { + "BillingAddress": "Rua da Assunção 53", + "BillingCity": "Lisbon", + "BillingCountry": "Portugal", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 34, + "InvoiceDate": "2009-11-09", + "InvoiceId": 73, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/14db25d1e47e039a/request.json b/test-snapshots/query/14db25d1e47e039a/request.json new file mode 100644 index 0000000..91743ad --- /dev/null +++ b/test-snapshots/query/14db25d1e47e039a/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/151277db9b6a9d2c/expected.json b/test-snapshots/query/151277db9b6a9d2c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/151277db9b6a9d2c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/151277db9b6a9d2c/request.json b/test-snapshots/query/151277db9b6a9d2c/request.json new file mode 100644 index 0000000..1a385bf --- /dev/null +++ b/test-snapshots/query/151277db9b6a9d2c/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/15340af994ee7fa0/expected.json b/test-snapshots/query/15340af994ee7fa0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/15340af994ee7fa0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15340af994ee7fa0/request.json b/test-snapshots/query/15340af994ee7fa0/request.json new file mode 100644 index 0000000..7feb6a6 --- /dev/null +++ b/test-snapshots/query/15340af994ee7fa0/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/15363c2e7949a6ab/expected.json b/test-snapshots/query/15363c2e7949a6ab/expected.json new file mode 100644 index 0000000..7cd90e9 --- /dev/null +++ b/test-snapshots/query/15363c2e7949a6ab/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_2332": 1, + "TrackId_6194": 3503 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3502 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3501 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3500 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3499 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3498 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3497 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3496 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3495 + }, + { + "PlaylistId_2332": 1, + "TrackId_6194": 3494 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15363c2e7949a6ab/request.json b/test-snapshots/query/15363c2e7949a6ab/request.json new file mode 100644 index 0000000..131f9e3 --- /dev/null +++ b/test-snapshots/query/15363c2e7949a6ab/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_2332": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_6194": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/153d528d0d601263/expected.json b/test-snapshots/query/153d528d0d601263/expected.json new file mode 100644 index 0000000..bcf0cf7 --- /dev/null +++ b/test-snapshots/query/153d528d0d601263/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/153d528d0d601263/request.json b/test-snapshots/query/153d528d0d601263/request.json new file mode 100644 index 0000000..30caff0 --- /dev/null +++ b/test-snapshots/query/153d528d0d601263/request.json @@ -0,0 +1,131 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Google Inc." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1541ddbd5b3276cd/expected.json b/test-snapshots/query/1541ddbd5b3276cd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1541ddbd5b3276cd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1541ddbd5b3276cd/request.json b/test-snapshots/query/1541ddbd5b3276cd/request.json new file mode 100644 index 0000000..7332732 --- /dev/null +++ b/test-snapshots/query/1541ddbd5b3276cd/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1569287a93deb34c/expected.json b/test-snapshots/query/1569287a93deb34c/expected.json new file mode 100644 index 0000000..8bdcff0 --- /dev/null +++ b/test-snapshots/query/1569287a93deb34c/expected.json @@ -0,0 +1,616 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 1.99 + }, + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "1 Infinite Loop", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 8.91 + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 10.91 + }, + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "1 Microsoft Way", + "BillingCountry_4146": "USA", + "BillingState_3975": "WA", + "Total_5827": 5.94 + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "1033 N Park Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "AZ", + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "11, Place Bellecour", + "BillingCountry_4146": "France", + "BillingState_3975": null, + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "110 Raeburn Pl", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "113 Lupus St", + "BillingCountry_4146": "United Kingdom", + "BillingState_3975": null, + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 1.99 + }, + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "12,Community Centre", + "BillingCountry_4146": "India", + "BillingState_3975": null, + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 3.98 + }, + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "120 S Orange Ave", + "BillingCountry_4146": "USA", + "BillingState_3975": "FL", + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 3.98 + }, + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "1498 rue Bélanger", + "BillingCountry_4146": "Canada", + "BillingState_3975": "QC", + "Total_5827": 8.91 + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 0.99 + }, + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 1.98 + }, + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 13.86 + }, + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 3.96 + }, + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 5.94 + }, + { + "BillingAddress_8466": "1600 Amphitheatre Parkway", + "BillingCountry_4146": "USA", + "BillingState_3975": "CA", + "Total_5827": 8.91 + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1569287a93deb34c/request.json b/test-snapshots/query/1569287a93deb34c/request.json new file mode 100644 index 0000000..37612e5 --- /dev/null +++ b/test-snapshots/query/1569287a93deb34c/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress_8466": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "Total_5827": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCountry_4146": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingState_3975": { + "type": "column", + "column": "BillingState", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/156e4e126d9c15e2/expected.json b/test-snapshots/query/156e4e126d9c15e2/expected.json new file mode 100644 index 0000000..b94cec6 --- /dev/null +++ b/test-snapshots/query/156e4e126d9c15e2/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "TrackId_avg_1341": 1767.081698221, + "TrackId_max_4627": 3503, + "TrackId_median_1457": 1773, + "TrackId_sum_7036": 15400117 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/156e4e126d9c15e2/request.json b/test-snapshots/query/156e4e126d9c15e2/request.json new file mode 100644 index 0000000..2a13727 --- /dev/null +++ b/test-snapshots/query/156e4e126d9c15e2/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "TrackId_sum_7036": { + "type": "single_column", + "column": "TrackId", + "function": "sum" + }, + "TrackId_avg_1341": { + "type": "single_column", + "column": "TrackId", + "function": "avg" + }, + "TrackId_median_1457": { + "type": "single_column", + "column": "TrackId", + "function": "median" + }, + "TrackId_max_4627": { + "type": "single_column", + "column": "TrackId", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/157e3da39b274761/expected.json b/test-snapshots/query/157e3da39b274761/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/157e3da39b274761/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/157e3da39b274761/request.json b/test-snapshots/query/157e3da39b274761/request.json new file mode 100644 index 0000000..843d134 --- /dev/null +++ b/test-snapshots/query/157e3da39b274761/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/15812b3b436a2fab/expected.json b/test-snapshots/query/15812b3b436a2fab/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/15812b3b436a2fab/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15812b3b436a2fab/request.json b/test-snapshots/query/15812b3b436a2fab/request.json new file mode 100644 index 0000000..a93604b --- /dev/null +++ b/test-snapshots/query/15812b3b436a2fab/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 0131 315 3300" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tucson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Steve" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/158153054d262573/expected.json b/test-snapshots/query/158153054d262573/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/158153054d262573/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/158153054d262573/request.json b/test-snapshots/query/158153054d262573/request.json new file mode 100644 index 0000000..a881a26 --- /dev/null +++ b/test-snapshots/query/158153054d262573/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1585a870bafa6537/expected.json b/test-snapshots/query/1585a870bafa6537/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1585a870bafa6537/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1585a870bafa6537/request.json b/test-snapshots/query/1585a870bafa6537/request.json new file mode 100644 index 0000000..9d6c9ec --- /dev/null +++ b/test-snapshots/query/1585a870bafa6537/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/15a537c0160fcc7e/expected.json b/test-snapshots/query/15a537c0160fcc7e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/15a537c0160fcc7e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15a537c0160fcc7e/request.json b/test-snapshots/query/15a537c0160fcc7e/request.json new file mode 100644 index 0000000..adeebb2 --- /dev/null +++ b/test-snapshots/query/15a537c0160fcc7e/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Park" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/15dae0c9f40adea9/expected.json b/test-snapshots/query/15dae0c9f40adea9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/15dae0c9f40adea9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15dae0c9f40adea9/request.json b/test-snapshots/query/15dae0c9f40adea9/request.json new file mode 100644 index 0000000..4bac8cd --- /dev/null +++ b/test-snapshots/query/15dae0c9f40adea9/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Deep Cuts" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/15df96b07e42e2d0/expected.json b/test-snapshots/query/15df96b07e42e2d0/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/15df96b07e42e2d0/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15df96b07e42e2d0/request.json b/test-snapshots/query/15df96b07e42e2d0/request.json new file mode 100644 index 0000000..fa0396f --- /dev/null +++ b/test-snapshots/query/15df96b07e42e2d0/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/15e4c533f867db9e/expected.json b/test-snapshots/query/15e4c533f867db9e/expected.json new file mode 100644 index 0000000..21a36b5 --- /dev/null +++ b/test-snapshots/query/15e4c533f867db9e/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1001 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/15e4c533f867db9e/request.json b/test-snapshots/query/15e4c533f867db9e/request.json new file mode 100644 index 0000000..72c89e9 --- /dev/null +++ b/test-snapshots/query/15e4c533f867db9e/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/160595d7ed376102/expected.json b/test-snapshots/query/160595d7ed376102/expected.json new file mode 100644 index 0000000..2154438 --- /dev/null +++ b/test-snapshots/query/160595d7ed376102/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/160595d7ed376102/request.json b/test-snapshots/query/160595d7ed376102/request.json new file mode 100644 index 0000000..014a2ee --- /dev/null +++ b/test-snapshots/query/160595d7ed376102/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/161c7ca83bd78452/expected.json b/test-snapshots/query/161c7ca83bd78452/expected.json new file mode 100644 index 0000000..a31b8ed --- /dev/null +++ b/test-snapshots/query/161c7ca83bd78452/expected.json @@ -0,0 +1,256 @@ +[ + { + "rows": [ + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 15, + "Total_3434": 1.98 + }, + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 210, + "Total_3434": 1.98 + }, + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 233, + "Total_3434": 3.96 + }, + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 255, + "Total_3434": 5.94 + }, + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 26, + "Total_3434": 13.86 + }, + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 307, + "Total_3434": 1.99 + }, + { + "BillingAddress_0080": "1 Infinite Loop", + "BillingPostalCode_2481": "95014", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3001": 81, + "Total_3434": 8.91 + }, + { + "BillingAddress_0080": "1 Microsoft Way", + "BillingPostalCode_2481": "98052-8300", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_3001": 111, + "Total_3434": 0.99 + }, + { + "BillingAddress_0080": "1 Microsoft Way", + "BillingPostalCode_2481": "98052-8300", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_3001": 14, + "Total_3434": 1.98 + }, + { + "BillingAddress_0080": "1 Microsoft Way", + "BillingPostalCode_2481": "98052-8300", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_3001": 232, + "Total_3434": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/161c7ca83bd78452/request.json b/test-snapshots/query/161c7ca83bd78452/request.json new file mode 100644 index 0000000..8f86ebc --- /dev/null +++ b/test-snapshots/query/161c7ca83bd78452/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_0080": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "Total_3434": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceId_3001": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingPostalCode_2481": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/161ca240994978ff/expected.json b/test-snapshots/query/161ca240994978ff/expected.json new file mode 100644 index 0000000..7c688cd --- /dev/null +++ b/test-snapshots/query/161ca240994978ff/expected.json @@ -0,0 +1,296 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Infinite Loop", + "City_4050": "Cupertino", + "Company_5727": "Apple Inc.", + "Country_3713": "USA", + "CustomerId_2369": 19, + "Email_2529": "tgoyer@apple.com", + "Fax_4172": "+1 (408) 996-1011", + "FirstName_3588": "Tim", + "LastName_3912": "Goyer", + "Phone_7381": "+1 (408) 996-1010", + "PostalCode_6169": "95014", + "SupportRepId_8444": 3 + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Microsoft Way", + "City_4050": "Redmond", + "Company_5727": "Microsoft Corporation", + "Country_3713": "USA", + "CustomerId_2369": 17, + "Email_2529": "jacksmith@microsoft.com", + "Fax_4172": "+1 (425) 882-8081", + "FirstName_3588": "Jack", + "LastName_3912": "Smith", + "Phone_7381": "+1 (425) 882-8080", + "PostalCode_6169": "98052-8300", + "SupportRepId_8444": 5 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Microsoft Way", + "City_4050": "Redmond", + "Company_5727": "Microsoft Corporation", + "Country_3713": "USA", + "CustomerId_2369": 17, + "Email_2529": "jacksmith@microsoft.com", + "Fax_4172": "+1 (425) 882-8081", + "FirstName_3588": "Jack", + "LastName_3912": "Smith", + "Phone_7381": "+1 (425) 882-8080", + "PostalCode_6169": "98052-8300", + "SupportRepId_8444": 5 + } + ] + }, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_0855": "1 Microsoft Way", + "City_4050": "Redmond", + "Company_5727": "Microsoft Corporation", + "Country_3713": "USA", + "CustomerId_2369": 17, + "Email_2529": "jacksmith@microsoft.com", + "Fax_4172": "+1 (425) 882-8081", + "FirstName_3588": "Jack", + "LastName_3912": "Smith", + "Phone_7381": "+1 (425) 882-8080", + "PostalCode_6169": "98052-8300", + "SupportRepId_8444": 5 + } + ] + }, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/161ca240994978ff/request.json b/test-snapshots/query/161ca240994978ff/request.json new file mode 100644 index 0000000..02a9941 --- /dev/null +++ b/test-snapshots/query/161ca240994978ff/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address_0855": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_4050": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_5727": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_3713": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_2369": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_2529": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_4172": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_3588": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_3912": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_7381": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_6169": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "SupportRepId_8444": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1645bc42e6011bd4/expected.json b/test-snapshots/query/1645bc42e6011bd4/expected.json new file mode 100644 index 0000000..0912f69 --- /dev/null +++ b/test-snapshots/query/1645bc42e6011bd4/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_1802": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "Title_1802": "Mozart: Chamber Music" + }, + { + "Title_1802": "Monteverdi: L'Orfeo" + }, + { + "Title_1802": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "Title_1802": "Respighi:Pines of Rome" + }, + { + "Title_1802": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "Title_1802": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "Title_1802": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "Title_1802": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "Title_1802": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1645bc42e6011bd4/request.json b/test-snapshots/query/1645bc42e6011bd4/request.json new file mode 100644 index 0000000..792748f --- /dev/null +++ b/test-snapshots/query/1645bc42e6011bd4/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_1802": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/164f43214c6d3409/expected.json b/test-snapshots/query/164f43214c6d3409/expected.json new file mode 100644 index 0000000..b758114 --- /dev/null +++ b/test-snapshots/query/164f43214c6d3409/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_2220": 155 + }, + { + "ArtistId_2220": 168 + }, + { + "ArtistId_2220": 212 + }, + { + "ArtistId_2220": 255 + }, + { + "ArtistId_2220": 181 + }, + { + "ArtistId_2220": 211 + }, + { + "ArtistId_2220": 154 + }, + { + "ArtistId_2220": 75 + }, + { + "ArtistId_2220": 73 + }, + { + "ArtistId_2220": 74 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/164f43214c6d3409/request.json b/test-snapshots/query/164f43214c6d3409/request.json new file mode 100644 index 0000000..3062c1b --- /dev/null +++ b/test-snapshots/query/164f43214c6d3409/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_2220": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/165206e6f6a8c33c/expected.json b/test-snapshots/query/165206e6f6a8c33c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/165206e6f6a8c33c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/165206e6f6a8c33c/request.json b/test-snapshots/query/165206e6f6a8c33c/request.json new file mode 100644 index 0000000..0cc8ec2 --- /dev/null +++ b/test-snapshots/query/165206e6f6a8c33c/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210834 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6706347 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/166f61cbac5a1483/expected.json b/test-snapshots/query/166f61cbac5a1483/expected.json new file mode 100644 index 0000000..f98321c --- /dev/null +++ b/test-snapshots/query/166f61cbac5a1483/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 537, + "Quantity": 1, + "TrackId": 3258, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 538, + "Quantity": 1, + "TrackId": 3260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 539, + "Quantity": 1, + "TrackId": 3264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 540, + "Quantity": 1, + "TrackId": 3268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 541, + "Quantity": 1, + "TrackId": 3272, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 542, + "Quantity": 1, + "TrackId": 3276, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 543, + "Quantity": 1, + "TrackId": 3280, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/166f61cbac5a1483/request.json b/test-snapshots/query/166f61cbac5a1483/request.json new file mode 100644 index 0000000..d9a6286 --- /dev/null +++ b/test-snapshots/query/166f61cbac5a1483/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/167770f3967fcef7/expected.json b/test-snapshots/query/167770f3967fcef7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/167770f3967fcef7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/167770f3967fcef7/request.json b/test-snapshots/query/167770f3967fcef7/request.json new file mode 100644 index 0000000..5871117 --- /dev/null +++ b/test-snapshots/query/167770f3967fcef7/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/16877cc2476b3ca/expected.json b/test-snapshots/query/16877cc2476b3ca/expected.json new file mode 100644 index 0000000..baa9b91 --- /dev/null +++ b/test-snapshots/query/16877cc2476b3ca/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16877cc2476b3ca/request.json b/test-snapshots/query/16877cc2476b3ca/request.json new file mode 100644 index 0000000..81f4182 --- /dev/null +++ b/test-snapshots/query/16877cc2476b3ca/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/16a0c301bd2b739e/expected.json b/test-snapshots/query/16a0c301bd2b739e/expected.json new file mode 100644 index 0000000..a4b9381 --- /dev/null +++ b/test-snapshots/query/16a0c301bd2b739e/expected.json @@ -0,0 +1,110 @@ +[ + { + "rows": [ + { + "BirthDate_9037": "1968-01-09", + "City_1076": "Lethbridge", + "Country_7115": "Canada", + "Email_8376": "laura@chinookcorp.com", + "Fax_0259": "+1 (403) 467-8772", + "FirstName_5723": "Laura", + "HireDate_5631": "2004-03-04", + "LastName_7866": "Callahan", + "Phone_7280": "+1 (403) 467-3351", + "ReportsTo_8893": 6, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1970-05-29", + "City_1076": "Lethbridge", + "Country_7115": "Canada", + "Email_8376": "robert@chinookcorp.com", + "Fax_0259": "+1 (403) 456-8485", + "FirstName_5723": "Robert", + "HireDate_5631": "2004-01-02", + "LastName_7866": "King", + "Phone_7280": "+1 (403) 456-9986", + "ReportsTo_8893": 6, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1965-03-03", + "City_1076": "Calgary", + "Country_7115": "Canada", + "Email_8376": "steve@chinookcorp.com", + "Fax_0259": "1 (780) 836-9543", + "FirstName_5723": "Steve", + "HireDate_5631": "2003-10-17", + "LastName_7866": "Johnson", + "Phone_7280": "1 (780) 836-9987", + "ReportsTo_8893": 2, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1973-07-01", + "City_1076": "Calgary", + "Country_7115": "Canada", + "Email_8376": "michael@chinookcorp.com", + "Fax_0259": "+1 (403) 246-9899", + "FirstName_5723": "Michael", + "HireDate_5631": "2003-10-17", + "LastName_7866": "Mitchell", + "Phone_7280": "+1 (403) 246-9887", + "ReportsTo_8893": 1, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1947-09-19", + "City_1076": "Calgary", + "Country_7115": "Canada", + "Email_8376": "margaret@chinookcorp.com", + "Fax_0259": "+1 (403) 263-4289", + "FirstName_5723": "Margaret", + "HireDate_5631": "2003-05-03", + "LastName_7866": "Park", + "Phone_7280": "+1 (403) 263-4423", + "ReportsTo_8893": 2, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1962-02-18", + "City_1076": "Edmonton", + "Country_7115": "Canada", + "Email_8376": "andrew@chinookcorp.com", + "Fax_0259": "+1 (780) 428-3457", + "FirstName_5723": "Andrew", + "HireDate_5631": "2002-08-14", + "LastName_7866": "Adams", + "Phone_7280": "+1 (780) 428-9482", + "ReportsTo_8893": null, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1958-12-08", + "City_1076": "Calgary", + "Country_7115": "Canada", + "Email_8376": "nancy@chinookcorp.com", + "Fax_0259": "+1 (403) 262-3322", + "FirstName_5723": "Nancy", + "HireDate_5631": "2002-05-01", + "LastName_7866": "Edwards", + "Phone_7280": "+1 (403) 262-3443", + "ReportsTo_8893": 1, + "State_8831": "AB" + }, + { + "BirthDate_9037": "1973-08-29", + "City_1076": "Calgary", + "Country_7115": "Canada", + "Email_8376": "jane@chinookcorp.com", + "Fax_0259": "+1 (403) 262-6712", + "FirstName_5723": "Jane", + "HireDate_5631": "2002-04-01", + "LastName_7866": "Peacock", + "Phone_7280": "+1 (403) 262-3443", + "ReportsTo_8893": 2, + "State_8831": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16a0c301bd2b739e/request.json b/test-snapshots/query/16a0c301bd2b739e/request.json new file mode 100644 index 0000000..8506b42 --- /dev/null +++ b/test-snapshots/query/16a0c301bd2b739e/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "ReportsTo_8893": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "BirthDate_9037": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_1076": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_7115": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_8376": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_8831": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_0259": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_5723": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_5631": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_7866": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_7280": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/16a1f272313cde5c/expected.json b/test-snapshots/query/16a1f272313cde5c/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/16a1f272313cde5c/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16a1f272313cde5c/request.json b/test-snapshots/query/16a1f272313cde5c/request.json new file mode 100644 index 0000000..1e18459 --- /dev/null +++ b/test-snapshots/query/16a1f272313cde5c/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/16a4f80ac1733f55/expected.json b/test-snapshots/query/16a4f80ac1733f55/expected.json new file mode 100644 index 0000000..b43b129 --- /dev/null +++ b/test-snapshots/query/16a4f80ac1733f55/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "Name": "Audiobooks", + "PlaylistId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16a4f80ac1733f55/request.json b/test-snapshots/query/16a4f80ac1733f55/request.json new file mode 100644 index 0000000..c7f8d3b --- /dev/null +++ b/test-snapshots/query/16a4f80ac1733f55/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/16c2f5be4ac9883/expected.json b/test-snapshots/query/16c2f5be4ac9883/expected.json new file mode 100644 index 0000000..5d3c393 --- /dev/null +++ b/test-snapshots/query/16c2f5be4ac9883/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_0726": 1, + "Name_1125": "MPEG audio file" + }, + { + "MediaTypeId_0726": 2, + "Name_1125": "Protected AAC audio file" + }, + { + "MediaTypeId_0726": 3, + "Name_1125": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_0726": 4, + "Name_1125": "Purchased AAC audio file" + }, + { + "MediaTypeId_0726": 5, + "Name_1125": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16c2f5be4ac9883/request.json b/test-snapshots/query/16c2f5be4ac9883/request.json new file mode 100644 index 0000000..20e8973 --- /dev/null +++ b/test-snapshots/query/16c2f5be4ac9883/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_0726": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_1125": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/16cbf681ed95d85c/expected.json b/test-snapshots/query/16cbf681ed95d85c/expected.json new file mode 100644 index 0000000..15a015b --- /dev/null +++ b/test-snapshots/query/16cbf681ed95d85c/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1142": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16cbf681ed95d85c/request.json b/test-snapshots/query/16cbf681ed95d85c/request.json new file mode 100644 index 0000000..dfac5dc --- /dev/null +++ b/test-snapshots/query/16cbf681ed95d85c/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "GenreId_1142": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/16fb392fdb0c0984/expected.json b/test-snapshots/query/16fb392fdb0c0984/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/16fb392fdb0c0984/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/16fb392fdb0c0984/request.json b/test-snapshots/query/16fb392fdb0c0984/request.json new file mode 100644 index 0000000..a50051e --- /dev/null +++ b/test-snapshots/query/16fb392fdb0c0984/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "margaret@chinookcorp.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 1Y7" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1709b56cce539c80/expected.json b/test-snapshots/query/1709b56cce539c80/expected.json new file mode 100644 index 0000000..c357ce8 --- /dev/null +++ b/test-snapshots/query/1709b56cce539c80/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 18, + "Name": "Science Fiction" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1709b56cce539c80/request.json b/test-snapshots/query/1709b56cce539c80/request.json new file mode 100644 index 0000000..eec9cc7 --- /dev/null +++ b/test-snapshots/query/1709b56cce539c80/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Science Fiction" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/17149e2296370b4b/expected.json b/test-snapshots/query/17149e2296370b4b/expected.json new file mode 100644 index 0000000..2d43e33 --- /dev/null +++ b/test-snapshots/query/17149e2296370b4b/expected.json @@ -0,0 +1,286 @@ +[ + { + "rows": [ + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 15, + "Total_7738": 1.98 + }, + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 210, + "Total_7738": 1.98 + }, + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 233, + "Total_7738": 3.96 + }, + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 255, + "Total_7738": 5.94 + }, + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 26, + "Total_7738": 13.86 + }, + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 307, + "Total_7738": 1.99 + }, + { + "BillingAddress_7370": "1 Infinite Loop", + "BillingCity_4954": "Cupertino", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "95014", + "BillingState_7592": "CA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_8750": 81, + "Total_7738": 8.91 + }, + { + "BillingAddress_7370": "1 Microsoft Way", + "BillingCity_4954": "Redmond", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "98052-8300", + "BillingState_7592": "WA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_8750": 111, + "Total_7738": 0.99 + }, + { + "BillingAddress_7370": "1 Microsoft Way", + "BillingCity_4954": "Redmond", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "98052-8300", + "BillingState_7592": "WA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_8750": 14, + "Total_7738": 1.98 + }, + { + "BillingAddress_7370": "1 Microsoft Way", + "BillingCity_4954": "Redmond", + "BillingCountry_4985": "USA", + "BillingPostalCode_0533": "98052-8300", + "BillingState_7592": "WA", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_8750": 232, + "Total_7738": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/17149e2296370b4b/request.json b/test-snapshots/query/17149e2296370b4b/request.json new file mode 100644 index 0000000..cf2a32a --- /dev/null +++ b/test-snapshots/query/17149e2296370b4b/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_7370": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_4954": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_4985": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_0533": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_7592": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "Total_7738": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceId_8750": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/172f5e7731565f78/expected.json b/test-snapshots/query/172f5e7731565f78/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/172f5e7731565f78/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/172f5e7731565f78/request.json b/test-snapshots/query/172f5e7731565f78/request.json new file mode 100644 index 0000000..fe923aa --- /dev/null +++ b/test-snapshots/query/172f5e7731565f78/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 5M5" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "825 8 Ave SW" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/173408c9ede7becc/expected.json b/test-snapshots/query/173408c9ede7becc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/173408c9ede7becc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/173408c9ede7becc/request.json b/test-snapshots/query/173408c9ede7becc/request.json new file mode 100644 index 0000000..426c688 --- /dev/null +++ b/test-snapshots/query/173408c9ede7becc/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1735cc298bbfcd16/expected.json b/test-snapshots/query/1735cc298bbfcd16/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/1735cc298bbfcd16/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1735cc298bbfcd16/request.json b/test-snapshots/query/1735cc298bbfcd16/request.json new file mode 100644 index 0000000..23f0919 --- /dev/null +++ b/test-snapshots/query/1735cc298bbfcd16/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6599424 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/174816587fca4938/expected.json b/test-snapshots/query/174816587fca4938/expected.json new file mode 100644 index 0000000..ef26921 --- /dev/null +++ b/test-snapshots/query/174816587fca4938/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_0300": 10 + }, + { + "PlaylistId_0300": 3 + }, + { + "PlaylistId_0300": 18 + }, + { + "PlaylistId_0300": 9 + }, + { + "PlaylistId_0300": 1 + }, + { + "PlaylistId_0300": 8 + }, + { + "PlaylistId_0300": 2 + }, + { + "PlaylistId_0300": 7 + }, + { + "PlaylistId_0300": 17 + }, + { + "PlaylistId_0300": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/174816587fca4938/request.json b/test-snapshots/query/174816587fca4938/request.json new file mode 100644 index 0000000..770266c --- /dev/null +++ b/test-snapshots/query/174816587fca4938/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "PlaylistId_0300": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/17518e590df679ca/expected.json b/test-snapshots/query/17518e590df679ca/expected.json new file mode 100644 index 0000000..36fe10a --- /dev/null +++ b/test-snapshots/query/17518e590df679ca/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Composer_1999": "Samuel Rosa", + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": null, + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": null, + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": null, + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": "L. Muggerud", + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": null, + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": "L. Muggerud", + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": null, + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": "Gilberto Gil", + "MediaTypeId_4847": 1 + }, + { + "Composer_1999": null, + "MediaTypeId_4847": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/17518e590df679ca/request.json b/test-snapshots/query/17518e590df679ca/request.json new file mode 100644 index 0000000..71ef844 --- /dev/null +++ b/test-snapshots/query/17518e590df679ca/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Composer_1999": { + "type": "column", + "column": "Composer", + "fields": null + }, + "MediaTypeId_4847": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/179151d099cd0d57/expected.json b/test-snapshots/query/179151d099cd0d57/expected.json new file mode 100644 index 0000000..fae5dd7 --- /dev/null +++ b/test-snapshots/query/179151d099cd0d57/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-03-04", + "Total_9082": 1.98 + } + ] + }, + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-03-04", + "Total_9082": 1.98 + } + ] + }, + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_6755": "1 Infinite Loop", + "BillingCity_4649": "Cupertino", + "BillingCountry_8527": "USA", + "CustomerId_8285": 19, + "InvoiceDate_8744": "2009-04-14", + "Total_9082": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/179151d099cd0d57/request.json b/test-snapshots/query/179151d099cd0d57/request.json new file mode 100644 index 0000000..ba1524b --- /dev/null +++ b/test-snapshots/query/179151d099cd0d57/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress_6755": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_4649": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_8527": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "Total_9082": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceDate_8744": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "CustomerId_8285": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/17ab3fe62aac44c9/expected.json b/test-snapshots/query/17ab3fe62aac44c9/expected.json new file mode 100644 index 0000000..9f6a071 --- /dev/null +++ b/test-snapshots/query/17ab3fe62aac44c9/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_9725": "90’s Music" + }, + { + "Name_9725": "Audiobooks" + }, + { + "Name_9725": "Audiobooks" + }, + { + "Name_9725": "Brazilian Music" + }, + { + "Name_9725": "Classical" + }, + { + "Name_9725": "Classical 101 - Deep Cuts" + }, + { + "Name_9725": "Classical 101 - Next Steps" + }, + { + "Name_9725": "Classical 101 - The Basics" + }, + { + "Name_9725": "Grunge" + }, + { + "Name_9725": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/17ab3fe62aac44c9/request.json b/test-snapshots/query/17ab3fe62aac44c9/request.json new file mode 100644 index 0000000..044ed88 --- /dev/null +++ b/test-snapshots/query/17ab3fe62aac44c9/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_9725": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/17f72e3cd20fec6b/expected.json b/test-snapshots/query/17f72e3cd20fec6b/expected.json new file mode 100644 index 0000000..9dd58b9 --- /dev/null +++ b/test-snapshots/query/17f72e3cd20fec6b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Country_0972": "Canada", + "LastName_1165": "Adams", + "PostalCode_7432": "T5K 2N1" + }, + { + "Country_0972": "Canada", + "LastName_1165": "Edwards", + "PostalCode_7432": "T2P 2T3" + }, + { + "Country_0972": "Canada", + "LastName_1165": "Mitchell", + "PostalCode_7432": "T3B 0C5" + }, + { + "Country_0972": "Canada", + "LastName_1165": "Johnson", + "PostalCode_7432": "T3B 1Y7" + }, + { + "Country_0972": "Canada", + "LastName_1165": "Park", + "PostalCode_7432": "T2P 5G3" + }, + { + "Country_0972": "Canada", + "LastName_1165": "Peacock", + "PostalCode_7432": "T2P 5M5" + }, + { + "Country_0972": "Canada", + "LastName_1165": "Callahan", + "PostalCode_7432": "T1H 1Y8" + }, + { + "Country_0972": "Canada", + "LastName_1165": "King", + "PostalCode_7432": "T1K 5N8" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/17f72e3cd20fec6b/request.json b/test-snapshots/query/17f72e3cd20fec6b/request.json new file mode 100644 index 0000000..143ca1d --- /dev/null +++ b/test-snapshots/query/17f72e3cd20fec6b/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_7432": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Country_0972": { + "type": "column", + "column": "Country", + "fields": null + }, + "LastName_1165": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/180922431b802cb8/expected.json b/test-snapshots/query/180922431b802cb8/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/180922431b802cb8/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/180922431b802cb8/request.json b/test-snapshots/query/180922431b802cb8/request.json new file mode 100644 index 0000000..ee6506a --- /dev/null +++ b/test-snapshots/query/180922431b802cb8/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1814f862f28ab1c3/expected.json b/test-snapshots/query/1814f862f28ab1c3/expected.json new file mode 100644 index 0000000..33f203e --- /dev/null +++ b/test-snapshots/query/1814f862f28ab1c3/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "MediaTypeId_count_6574": 5 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/1814f862f28ab1c3/request.json b/test-snapshots/query/1814f862f28ab1c3/request.json new file mode 100644 index 0000000..26be0e8 --- /dev/null +++ b/test-snapshots/query/1814f862f28ab1c3/request.json @@ -0,0 +1,15 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "MediaTypeId_count_6574": { + "type": "single_column", + "column": "MediaTypeId", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/189031bc8ad651e0/expected.json b/test-snapshots/query/189031bc8ad651e0/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/189031bc8ad651e0/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/189031bc8ad651e0/request.json b/test-snapshots/query/189031bc8ad651e0/request.json new file mode 100644 index 0000000..4207dbc --- /dev/null +++ b/test-snapshots/query/189031bc8ad651e0/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-07-20" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/189b19c89b0fd259/expected.json b/test-snapshots/query/189b19c89b0fd259/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/189b19c89b0fd259/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/189b19c89b0fd259/request.json b/test-snapshots/query/189b19c89b0fd259/request.json new file mode 100644 index 0000000..5aea439 --- /dev/null +++ b/test-snapshots/query/189b19c89b0fd259/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/18b009911797b4e2/expected.json b/test-snapshots/query/18b009911797b4e2/expected.json new file mode 100644 index 0000000..b7c896a --- /dev/null +++ b/test-snapshots/query/18b009911797b4e2/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 8, + "TrackId": 7 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/18b009911797b4e2/request.json b/test-snapshots/query/18b009911797b4e2/request.json new file mode 100644 index 0000000..d3ece4a --- /dev/null +++ b/test-snapshots/query/18b009911797b4e2/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/18bd1f192c4b0e65/expected.json b/test-snapshots/query/18bd1f192c4b0e65/expected.json new file mode 100644 index 0000000..57839b5 --- /dev/null +++ b/test-snapshots/query/18bd1f192c4b0e65/expected.json @@ -0,0 +1,204 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 1, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 9, + "UnitPrice_0125": 0.99 + }, + { + "Quantity_7842": 1, + "TrackId_9233": 9, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 13, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 6, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 8, + "UnitPrice_0125": 0.99 + }, + { + "Quantity_7842": 1, + "TrackId_9233": 8, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 12, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 10, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Quantity_7842": 1, + "TrackId_9233": 14, + "UnitPrice_0125": 0.99 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/18bd1f192c4b0e65/request.json b/test-snapshots/query/18bd1f192c4b0e65/request.json new file mode 100644 index 0000000..7d374a7 --- /dev/null +++ b/test-snapshots/query/18bd1f192c4b0e65/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "UnitPrice_0125": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "TrackId_9233": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Quantity_7842": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/18c5ed01bd56df01/expected.json b/test-snapshots/query/18c5ed01bd56df01/expected.json new file mode 100644 index 0000000..d2573f2 --- /dev/null +++ b/test-snapshots/query/18c5ed01bd56df01/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "Address_3829": "5112 48 Street", + "CustomerId_3773": 33, + "Fax_6650": null, + "State_9032": "NT", + "SupportRepId_1436": 3 + }, + { + "Address_3829": "700 W Pender Street", + "CustomerId_3773": 15, + "Fax_6650": "+1 (604) 688-8756", + "State_9032": "BC", + "SupportRepId_1436": 3 + }, + { + "Address_3829": "113 Lupus St", + "CustomerId_3773": 53, + "Fax_6650": null, + "State_9032": null, + "SupportRepId_1436": 3 + }, + { + "Address_3829": "202 Hoxton Street", + "CustomerId_3773": 52, + "Fax_6650": null, + "State_9032": null, + "SupportRepId_1436": 3 + }, + { + "Address_3829": "796 Dundas Street West", + "CustomerId_3773": 29, + "Fax_6650": null, + "State_9032": "ON", + "SupportRepId_1436": 3 + }, + { + "Address_3829": "230 Elgin Street", + "CustomerId_3773": 30, + "Fax_6650": null, + "State_9032": "ON", + "SupportRepId_1436": 3 + }, + { + "Address_3829": "1498 rue Bélanger", + "CustomerId_3773": 3, + "Fax_6650": null, + "State_9032": "QC", + "SupportRepId_1436": 3 + }, + { + "Address_3829": "Erzsébet krt. 58.", + "CustomerId_3773": 45, + "Fax_6650": null, + "State_9032": null, + "SupportRepId_1436": 3 + }, + { + "Address_3829": "1 Infinite Loop", + "CustomerId_3773": 19, + "Fax_6650": "+1 (408) 996-1011", + "State_9032": "CA", + "SupportRepId_1436": 3 + }, + { + "Address_3829": "162 E Superior Street", + "CustomerId_3773": 24, + "Fax_6650": null, + "State_9032": "IL", + "SupportRepId_1436": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/18c5ed01bd56df01/request.json b/test-snapshots/query/18c5ed01bd56df01/request.json new file mode 100644 index 0000000..c0d8f1c --- /dev/null +++ b/test-snapshots/query/18c5ed01bd56df01/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_3829": { + "type": "column", + "column": "Address", + "fields": null + }, + "Fax_6650": { + "type": "column", + "column": "Fax", + "fields": null + }, + "SupportRepId_1436": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "State_9032": { + "type": "column", + "column": "State", + "fields": null + }, + "CustomerId_3773": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/18fffcf1cb3fd3a6/expected.json b/test-snapshots/query/18fffcf1cb3fd3a6/expected.json new file mode 100644 index 0000000..d9b2c68 --- /dev/null +++ b/test-snapshots/query/18fffcf1cb3fd3a6/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/18fffcf1cb3fd3a6/request.json b/test-snapshots/query/18fffcf1cb3fd3a6/request.json new file mode 100644 index 0000000..4616b82 --- /dev/null +++ b/test-snapshots/query/18fffcf1cb3fd3a6/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1970fec26e2c30c9/expected.json b/test-snapshots/query/1970fec26e2c30c9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1970fec26e2c30c9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1970fec26e2c30c9/request.json b/test-snapshots/query/1970fec26e2c30c9/request.json new file mode 100644 index 0000000..dc4e6fd --- /dev/null +++ b/test-snapshots/query/1970fec26e2c30c9/request.json @@ -0,0 +1,142 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Johnson" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/197147c57a78bd7c/expected.json b/test-snapshots/query/197147c57a78bd7c/expected.json new file mode 100644 index 0000000..5b3bffe --- /dev/null +++ b/test-snapshots/query/197147c57a78bd7c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + }, + { + "PlaylistId_3197": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/197147c57a78bd7c/request.json b/test-snapshots/query/197147c57a78bd7c/request.json new file mode 100644 index 0000000..e2eb98a --- /dev/null +++ b/test-snapshots/query/197147c57a78bd7c/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_3197": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/198e0262d7a83103/expected.json b/test-snapshots/query/198e0262d7a83103/expected.json new file mode 100644 index 0000000..c00e7b8 --- /dev/null +++ b/test-snapshots/query/198e0262d7a83103/expected.json @@ -0,0 +1,136 @@ +[ + { + "rows": [ + { + "Address_2055": "Via Degli Scipioni, 43", + "City_2618": "Rome", + "Company_3355": null, + "Country_1277": "Italy", + "CustomerId_6700": 47, + "Email_4722": "lucas.mancini@yahoo.it", + "Fax_3984": null, + "LastName_7799": "Mancini", + "Phone_4145": "+39 06 39733434", + "State_2993": "RM", + "SupportRepId_6850": 5 + }, + { + "Address_2055": "Ullevålsveien 14", + "City_2618": "Oslo", + "Company_3355": null, + "Country_1277": "Norway", + "CustomerId_6700": 4, + "Email_4722": "bjorn.hansen@yahoo.no", + "Fax_3984": null, + "LastName_7799": "Hansen", + "Phone_4145": "+47 22 44 22 22", + "State_2993": null, + "SupportRepId_6850": 4 + }, + { + "Address_2055": "Theodor-Heuss-Straße 34", + "City_2618": "Stuttgart", + "Company_3355": null, + "Country_1277": "Germany", + "CustomerId_6700": 2, + "Email_4722": "leonekohler@surfeu.de", + "Fax_3984": null, + "LastName_7799": "Köhler", + "Phone_4145": "+49 0711 2842222", + "State_2993": null, + "SupportRepId_6850": 5 + }, + { + "Address_2055": "Tauentzienstraße 8", + "City_2618": "Berlin", + "Company_3355": null, + "Country_1277": "Germany", + "CustomerId_6700": 36, + "Email_4722": "hannah.schneider@yahoo.de", + "Fax_3984": null, + "LastName_7799": "Schneider", + "Phone_4145": "+49 030 26550280", + "State_2993": null, + "SupportRepId_6850": 5 + }, + { + "Address_2055": "Sønder Boulevard 51", + "City_2618": "Copenhagen", + "Company_3355": null, + "Country_1277": "Denmark", + "CustomerId_6700": 9, + "Email_4722": "kara.nielsen@jubii.dk", + "Fax_3984": null, + "LastName_7799": "Nielsen", + "Phone_4145": "+453 3331 9991", + "State_2993": null, + "SupportRepId_6850": 4 + }, + { + "Address_2055": "Rua Dr. Falcão Filho, 155", + "City_2618": "São Paulo", + "Company_3355": "Woodstock Discos", + "Country_1277": "Brazil", + "CustomerId_6700": 10, + "Email_4722": "eduardo@woodstock.com.br", + "Fax_3984": "+55 (11) 3033-4564", + "LastName_7799": "Martins", + "Phone_4145": "+55 (11) 3033-5446", + "State_2993": "SP", + "SupportRepId_6850": 4 + }, + { + "Address_2055": "Rua dos Campeões Europeus de Viena, 4350", + "City_2618": "Porto", + "Company_3355": null, + "Country_1277": "Portugal", + "CustomerId_6700": 35, + "Email_4722": "masampaio@sapo.pt", + "Fax_3984": null, + "LastName_7799": "Sampaio", + "Phone_4145": "+351 (225) 022-448", + "State_2993": null, + "SupportRepId_6850": 4 + }, + { + "Address_2055": "Rua da Assunção 53", + "City_2618": "Lisbon", + "Company_3355": null, + "Country_1277": "Portugal", + "CustomerId_6700": 34, + "Email_4722": "jfernandes@yahoo.pt", + "Fax_3984": null, + "LastName_7799": "Fernandes", + "Phone_4145": "+351 (213) 466-111", + "State_2993": null, + "SupportRepId_6850": 4 + }, + { + "Address_2055": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_2618": "Vienne", + "Company_3355": null, + "Country_1277": "Austria", + "CustomerId_6700": 7, + "Email_4722": "astrid.gruber@apple.at", + "Fax_3984": null, + "LastName_7799": "Gruber", + "Phone_4145": "+43 01 5134505", + "State_2993": null, + "SupportRepId_6850": 5 + }, + { + "Address_2055": "Rilská 3174/6", + "City_2618": "Prague", + "Company_3355": null, + "Country_1277": "Czech Republic", + "CustomerId_6700": 6, + "Email_4722": "hholy@gmail.com", + "Fax_3984": null, + "LastName_7799": "Holý", + "Phone_4145": "+420 2 4177 0449", + "State_2993": null, + "SupportRepId_6850": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/198e0262d7a83103/request.json b/test-snapshots/query/198e0262d7a83103/request.json new file mode 100644 index 0000000..4d21b64 --- /dev/null +++ b/test-snapshots/query/198e0262d7a83103/request.json @@ -0,0 +1,93 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_2055": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_2618": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_3355": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_1277": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_6700": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_4722": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_3984": { + "type": "column", + "column": "Fax", + "fields": null + }, + "SupportRepId_6850": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "LastName_7799": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_4145": { + "type": "column", + "column": "Phone", + "fields": null + }, + "State_2993": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/19a815be5aeb3532/expected.json b/test-snapshots/query/19a815be5aeb3532/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/19a815be5aeb3532/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/19a815be5aeb3532/request.json b/test-snapshots/query/19a815be5aeb3532/request.json new file mode 100644 index 0000000..9ed0666 --- /dev/null +++ b/test-snapshots/query/19a815be5aeb3532/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-03-04" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "steve@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Robert" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/19b583a60a070019/expected.json b/test-snapshots/query/19b583a60a070019/expected.json new file mode 100644 index 0000000..9a4c917 --- /dev/null +++ b/test-snapshots/query/19b583a60a070019/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2010-01-08", + "InvoiceId": 84, + "Total": 1.98 + }, + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2010-04-12", + "InvoiceId": 107, + "Total": 3.96 + }, + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2010-07-15", + "InvoiceId": 129, + "Total": 5.94 + }, + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2011-03-05", + "InvoiceId": 181, + "Total": 0.99 + }, + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2012-08-26", + "InvoiceId": 302, + "Total": 1.98 + }, + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2012-10-06", + "InvoiceId": 313, + "Total": 16.86 + }, + { + "BillingAddress": "68, Rue Jouvence", + "BillingCity": "Dijon", + "BillingCountry": "France", + "BillingPostalCode": "21000", + "BillingState": null, + "CustomerId": 43, + "InvoiceDate": "2013-06-06", + "InvoiceId": 368, + "Total": 8.91 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-02-02", + "InvoiceId": 9, + "Total": 3.96 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-05-07", + "InvoiceId": 31, + "Total": 5.94 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-12-26", + "InvoiceId": 83, + "Total": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/19b583a60a070019/request.json b/test-snapshots/query/19b583a60a070019/request.json new file mode 100644 index 0000000..0dae6c4 --- /dev/null +++ b/test-snapshots/query/19b583a60a070019/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "France" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/19f3040feeb17137/expected.json b/test-snapshots/query/19f3040feeb17137/expected.json new file mode 100644 index 0000000..2d85721 --- /dev/null +++ b/test-snapshots/query/19f3040feeb17137/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/19f3040feeb17137/request.json b/test-snapshots/query/19f3040feeb17137/request.json new file mode 100644 index 0000000..38805c2 --- /dev/null +++ b/test-snapshots/query/19f3040feeb17137/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1a16455caa5d9110/expected.json b/test-snapshots/query/1a16455caa5d9110/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1a16455caa5d9110/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1a16455caa5d9110/request.json b/test-snapshots/query/1a16455caa5d9110/request.json new file mode 100644 index 0000000..de3ace5 --- /dev/null +++ b/test-snapshots/query/1a16455caa5d9110/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1a4fd6a7b63a9002/expected.json b/test-snapshots/query/1a4fd6a7b63a9002/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1a4fd6a7b63a9002/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1a4fd6a7b63a9002/request.json b/test-snapshots/query/1a4fd6a7b63a9002/request.json new file mode 100644 index 0000000..4368cb3 --- /dev/null +++ b/test-snapshots/query/1a4fd6a7b63a9002/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1a5aa23d8f542750/expected.json b/test-snapshots/query/1a5aa23d8f542750/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1a5aa23d8f542750/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1a5aa23d8f542750/request.json b/test-snapshots/query/1a5aa23d8f542750/request.json new file mode 100644 index 0000000..9c5cb3e --- /dev/null +++ b/test-snapshots/query/1a5aa23d8f542750/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1a66639c7997ce39/expected.json b/test-snapshots/query/1a66639c7997ce39/expected.json new file mode 100644 index 0000000..deefe55 --- /dev/null +++ b/test-snapshots/query/1a66639c7997ce39/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 144, + "ArtistId": 102, + "Title": "Misplaced Childhood" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1a66639c7997ce39/request.json b/test-snapshots/query/1a66639c7997ce39/request.json new file mode 100644 index 0000000..8ff374c --- /dev/null +++ b/test-snapshots/query/1a66639c7997ce39/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1a67d368d16d58fb/expected.json b/test-snapshots/query/1a67d368d16d58fb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1a67d368d16d58fb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1a67d368d16d58fb/request.json b/test-snapshots/query/1a67d368d16d58fb/request.json new file mode 100644 index 0000000..15c1da9 --- /dev/null +++ b/test-snapshots/query/1a67d368d16d58fb/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1a94f4a3c579319a/expected.json b/test-snapshots/query/1a94f4a3c579319a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1a94f4a3c579319a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1a94f4a3c579319a/request.json b/test-snapshots/query/1a94f4a3c579319a/request.json new file mode 100644 index 0000000..749fbb9 --- /dev/null +++ b/test-snapshots/query/1a94f4a3c579319a/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1ab035c24519c77b/expected.json b/test-snapshots/query/1ab035c24519c77b/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/1ab035c24519c77b/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1ab035c24519c77b/request.json b/test-snapshots/query/1ab035c24519c77b/request.json new file mode 100644 index 0000000..abac78a --- /dev/null +++ b/test-snapshots/query/1ab035c24519c77b/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1acbd083637750b9/expected.json b/test-snapshots/query/1acbd083637750b9/expected.json new file mode 100644 index 0000000..396cbd0 --- /dev/null +++ b/test-snapshots/query/1acbd083637750b9/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_4623": 25, + "Name_9575": "Opera" + }, + { + "GenreId_4623": 24, + "Name_9575": "Classical" + }, + { + "GenreId_4623": 23, + "Name_9575": "Alternative" + }, + { + "GenreId_4623": 22, + "Name_9575": "Comedy" + }, + { + "GenreId_4623": 21, + "Name_9575": "Drama" + }, + { + "GenreId_4623": 20, + "Name_9575": "Sci Fi & Fantasy" + }, + { + "GenreId_4623": 19, + "Name_9575": "TV Shows" + }, + { + "GenreId_4623": 18, + "Name_9575": "Science Fiction" + }, + { + "GenreId_4623": 17, + "Name_9575": "Hip Hop/Rap" + }, + { + "GenreId_4623": 16, + "Name_9575": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1acbd083637750b9/request.json b/test-snapshots/query/1acbd083637750b9/request.json new file mode 100644 index 0000000..72400ea --- /dev/null +++ b/test-snapshots/query/1acbd083637750b9/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_4623": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_9575": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1b24f962377c02d6/expected.json b/test-snapshots/query/1b24f962377c02d6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1b24f962377c02d6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1b24f962377c02d6/request.json b/test-snapshots/query/1b24f962377c02d6/request.json new file mode 100644 index 0000000..7a8ab1e --- /dev/null +++ b/test-snapshots/query/1b24f962377c02d6/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1033 N Park Ave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1b446391324e0c22/expected.json b/test-snapshots/query/1b446391324e0c22/expected.json new file mode 100644 index 0000000..1d5b1ea --- /dev/null +++ b/test-snapshots/query/1b446391324e0c22/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1b446391324e0c22/request.json b/test-snapshots/query/1b446391324e0c22/request.json new file mode 100644 index 0000000..6d0e244 --- /dev/null +++ b/test-snapshots/query/1b446391324e0c22/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1b567bd58b4d1d3/expected.json b/test-snapshots/query/1b567bd58b4d1d3/expected.json new file mode 100644 index 0000000..bbcbf85 --- /dev/null +++ b/test-snapshots/query/1b567bd58b4d1d3/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Composer_2686": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 174, + "ArtistId": 114, + "Title": "Tribute" + } + ] + }, + "GenreId_3359": 3, + "MediaTypeId_4784": 1, + "TrackId_9955": 2107 + }, + { + "Composer_2686": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 174, + "ArtistId": 114, + "Title": "Tribute" + } + ] + }, + "GenreId_3359": 3, + "MediaTypeId_4784": 1, + "TrackId_9955": 2108 + }, + { + "Composer_2686": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 174, + "ArtistId": 114, + "Title": "Tribute" + } + ] + }, + "GenreId_3359": 3, + "MediaTypeId_4784": 1, + "TrackId_9955": 2109 + }, + { + "Composer_2686": "A. Jamal", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 157, + "ArtistId": 68, + "Title": "Miles Ahead" + } + ] + }, + "GenreId_3359": 2, + "MediaTypeId_4784": 1, + "TrackId_9955": 1908 + }, + { + "Composer_2686": "A.Bouchard/J.Bouchard/S.Pearlman", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 35, + "ArtistId": 50, + "Title": "Garage Inc. (Disc 1)" + } + ] + }, + "GenreId_3359": 3, + "MediaTypeId_4784": 1, + "TrackId_9955": 415 + }, + { + "Composer_2686": "A.Isbell/A.Jones/O.Redding", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 210, + "ArtistId": 137, + "Title": "Live [Disc 2]" + } + ] + }, + "GenreId_3359": 6, + "MediaTypeId_4784": 1, + "TrackId_9955": 2589 + }, + { + "Composer_2686": "AC/DC", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "GenreId_3359": 1, + "MediaTypeId_4784": 1, + "TrackId_9955": 15 + }, + { + "Composer_2686": "AC/DC", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "GenreId_3359": 1, + "MediaTypeId_4784": 1, + "TrackId_9955": 16 + }, + { + "Composer_2686": "AC/DC", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "GenreId_3359": 1, + "MediaTypeId_4784": 1, + "TrackId_9955": 17 + }, + { + "Composer_2686": "AC/DC", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "GenreId_3359": 1, + "MediaTypeId_4784": 1, + "TrackId_9955": 18 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1b567bd58b4d1d3/request.json b/test-snapshots/query/1b567bd58b4d1d3/request.json new file mode 100644 index 0000000..e340972 --- /dev/null +++ b/test-snapshots/query/1b567bd58b4d1d3/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "TrackId_9955": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "MediaTypeId_4784": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Composer_2686": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_3359": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1b795bdd1abb4aaa/expected.json b/test-snapshots/query/1b795bdd1abb4aaa/expected.json new file mode 100644 index 0000000..d1bcc1a --- /dev/null +++ b/test-snapshots/query/1b795bdd1abb4aaa/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1b795bdd1abb4aaa/request.json b/test-snapshots/query/1b795bdd1abb4aaa/request.json new file mode 100644 index 0000000..1e98ef5 --- /dev/null +++ b/test-snapshots/query/1b795bdd1abb4aaa/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1b8c10fd4da86e65/expected.json b/test-snapshots/query/1b8c10fd4da86e65/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1b8c10fd4da86e65/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1b8c10fd4da86e65/request.json b/test-snapshots/query/1b8c10fd4da86e65/request.json new file mode 100644 index 0000000..e503334 --- /dev/null +++ b/test-snapshots/query/1b8c10fd4da86e65/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8596840 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1ba9ee3c7509e8c9/expected.json b/test-snapshots/query/1ba9ee3c7509e8c9/expected.json new file mode 100644 index 0000000..2a9723e --- /dev/null +++ b/test-snapshots/query/1ba9ee3c7509e8c9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Audiobooks", + "PlaylistId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1ba9ee3c7509e8c9/request.json b/test-snapshots/query/1ba9ee3c7509e8c9/request.json new file mode 100644 index 0000000..71636a3 --- /dev/null +++ b/test-snapshots/query/1ba9ee3c7509e8c9/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1bbff19b192f3e3/expected.json b/test-snapshots/query/1bbff19b192f3e3/expected.json new file mode 100644 index 0000000..7dcee57 --- /dev/null +++ b/test-snapshots/query/1bbff19b192f3e3/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1bbff19b192f3e3/request.json b/test-snapshots/query/1bbff19b192f3e3/request.json new file mode 100644 index 0000000..d971db9 --- /dev/null +++ b/test-snapshots/query/1bbff19b192f3e3/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1033 N Park Ave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1bc4be6dcbf63070/expected.json b/test-snapshots/query/1bc4be6dcbf63070/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1bc4be6dcbf63070/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1bc4be6dcbf63070/request.json b/test-snapshots/query/1bc4be6dcbf63070/request.json new file mode 100644 index 0000000..b807d9c --- /dev/null +++ b/test-snapshots/query/1bc4be6dcbf63070/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1be8e7a717fdc038/expected.json b/test-snapshots/query/1be8e7a717fdc038/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1be8e7a717fdc038/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1be8e7a717fdc038/request.json b/test-snapshots/query/1be8e7a717fdc038/request.json new file mode 100644 index 0000000..8432887 --- /dev/null +++ b/test-snapshots/query/1be8e7a717fdc038/request.json @@ -0,0 +1,188 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-8485" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1c18fdfea57ca94f/expected.json b/test-snapshots/query/1c18fdfea57ca94f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1c18fdfea57ca94f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1c18fdfea57ca94f/request.json b/test-snapshots/query/1c18fdfea57ca94f/request.json new file mode 100644 index 0000000..2945016 --- /dev/null +++ b/test-snapshots/query/1c18fdfea57ca94f/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1c35eae573935eb1/expected.json b/test-snapshots/query/1c35eae573935eb1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1c35eae573935eb1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1c35eae573935eb1/request.json b/test-snapshots/query/1c35eae573935eb1/request.json new file mode 100644 index 0000000..9089a2a --- /dev/null +++ b/test-snapshots/query/1c35eae573935eb1/request.json @@ -0,0 +1,46 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1c4686f65692cfd/expected.json b/test-snapshots/query/1c4686f65692cfd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1c4686f65692cfd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1c4686f65692cfd/request.json b/test-snapshots/query/1c4686f65692cfd/request.json new file mode 100644 index 0000000..081e0ce --- /dev/null +++ b/test-snapshots/query/1c4686f65692cfd/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1c75da2a820153c1/expected.json b/test-snapshots/query/1c75da2a820153c1/expected.json new file mode 100644 index 0000000..de56753 --- /dev/null +++ b/test-snapshots/query/1c75da2a820153c1/expected.json @@ -0,0 +1,40 @@ +[ + { + "rows": [ + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1c75da2a820153c1/request.json b/test-snapshots/query/1c75da2a820153c1/request.json new file mode 100644 index 0000000..c82bab9 --- /dev/null +++ b/test-snapshots/query/1c75da2a820153c1/request.json @@ -0,0 +1,157 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1c83cb4a0add5462/expected.json b/test-snapshots/query/1c83cb4a0add5462/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1c83cb4a0add5462/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1c83cb4a0add5462/request.json b/test-snapshots/query/1c83cb4a0add5462/request.json new file mode 100644 index 0000000..cfaf348 --- /dev/null +++ b/test-snapshots/query/1c83cb4a0add5462/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1c931e4df7ce2ce3/expected.json b/test-snapshots/query/1c931e4df7ce2ce3/expected.json new file mode 100644 index 0000000..82f74df --- /dev/null +++ b/test-snapshots/query/1c931e4df7ce2ce3/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "Address_1629": "Praça Pio X, 119", + "City_1754": "Rio de Janeiro", + "Company_5834": "Riotur", + "Country_4418": "Brazil", + "CustomerId_6563": 12, + "Email_5766": "roberto.almeida@riotur.gov.br", + "FirstName_4955": "Roberto", + "LastName_3267": "Almeida", + "Phone_0444": "+55 (21) 2271-7000", + "PostalCode_4421": "20040-020", + "State_0793": "RJ", + "SupportRepId_8340": 3 + }, + { + "Address_1629": "302 S 700 E", + "City_1754": "Salt Lake City", + "Company_5834": null, + "Country_4418": "USA", + "CustomerId_6563": 28, + "Email_5766": "jubarnett@gmail.com", + "FirstName_4955": "Julia", + "LastName_3267": "Barnett", + "Phone_0444": "+1 (801) 531-7272", + "PostalCode_4421": "84102", + "State_0793": "UT", + "SupportRepId_8340": 5 + }, + { + "Address_1629": "4, Rue Milton", + "City_1754": "Paris", + "Company_5834": null, + "Country_4418": "France", + "CustomerId_6563": 39, + "Email_5766": "camille.bernard@yahoo.fr", + "FirstName_4955": "Camille", + "LastName_3267": "Bernard", + "Phone_0444": "+33 01 49 70 65 65", + "PostalCode_4421": "75009", + "State_0793": null, + "SupportRepId_8340": 4 + }, + { + "Address_1629": "627 Broadway", + "City_1754": "New York", + "Company_5834": null, + "Country_4418": "USA", + "CustomerId_6563": 18, + "Email_5766": "michelleb@aol.com", + "FirstName_4955": "Michelle", + "LastName_3267": "Brooks", + "Phone_0444": "+1 (212) 221-3546", + "PostalCode_4421": "10012-2612", + "State_0793": "NY", + "SupportRepId_8340": 3 + }, + { + "Address_1629": "796 Dundas Street West", + "City_1754": "Toronto", + "Company_5834": null, + "Country_4418": "Canada", + "CustomerId_6563": 29, + "Email_5766": "robbrown@shaw.ca", + "FirstName_4955": "Robert", + "LastName_3267": "Brown", + "Phone_0444": "+1 (416) 363-8888", + "PostalCode_4421": "M6J 1V1", + "State_0793": "ON", + "SupportRepId_8340": 3 + }, + { + "Address_1629": "801 W 4th Street", + "City_1754": "Reno", + "Company_5834": null, + "Country_4418": "USA", + "CustomerId_6563": 21, + "Email_5766": "kachase@hotmail.com", + "FirstName_4955": "Kathy", + "LastName_3267": "Chase", + "Phone_0444": "+1 (775) 223-7665", + "PostalCode_4421": "89503", + "State_0793": "NV", + "SupportRepId_8340": 5 + }, + { + "Address_1629": "2211 W Berry Street", + "City_1754": "Fort Worth", + "Company_5834": null, + "Country_4418": "USA", + "CustomerId_6563": 26, + "Email_5766": "ricunningham@hotmail.com", + "FirstName_4955": "Richard", + "LastName_3267": "Cunningham", + "Phone_0444": "+1 (817) 924-7272", + "PostalCode_4421": "76110", + "State_0793": "TX", + "SupportRepId_8340": 4 + }, + { + "Address_1629": "11, Place Bellecour", + "City_1754": "Lyon", + "Company_5834": null, + "Country_4418": "France", + "CustomerId_6563": 41, + "Email_5766": "marc.dubois@hotmail.com", + "FirstName_4955": "Marc", + "LastName_3267": "Dubois", + "Phone_0444": "+33 04 78 30 30 30", + "PostalCode_4421": "69002", + "State_0793": null, + "SupportRepId_8340": 5 + }, + { + "Address_1629": "Rua da Assunção 53", + "City_1754": "Lisbon", + "Company_5834": null, + "Country_4418": "Portugal", + "CustomerId_6563": 34, + "Email_5766": "jfernandes@yahoo.pt", + "FirstName_4955": "João", + "LastName_3267": "Fernandes", + "Phone_0444": "+351 (213) 466-111", + "PostalCode_4421": null, + "State_0793": null, + "SupportRepId_8340": 4 + }, + { + "Address_1629": "230 Elgin Street", + "City_1754": "Ottawa", + "Company_5834": null, + "Country_4418": "Canada", + "CustomerId_6563": 30, + "Email_5766": "edfrancis@yachoo.ca", + "FirstName_4955": "Edward", + "LastName_3267": "Francis", + "Phone_0444": "+1 (613) 234-3322", + "PostalCode_4421": "K2P 1L7", + "State_0793": "ON", + "SupportRepId_8340": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1c931e4df7ce2ce3/request.json b/test-snapshots/query/1c931e4df7ce2ce3/request.json new file mode 100644 index 0000000..683ee3f --- /dev/null +++ b/test-snapshots/query/1c931e4df7ce2ce3/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_1629": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_1754": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_5834": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_4418": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_6563": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_5766": { + "type": "column", + "column": "Email", + "fields": null + }, + "SupportRepId_8340": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FirstName_4955": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_3267": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_0444": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_4421": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_0793": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1cc33f924fa98395/expected.json b/test-snapshots/query/1cc33f924fa98395/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/1cc33f924fa98395/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1cc33f924fa98395/request.json b/test-snapshots/query/1cc33f924fa98395/request.json new file mode 100644 index 0000000..f424bea --- /dev/null +++ b/test-snapshots/query/1cc33f924fa98395/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.98 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1cc6be6019502e83/expected.json b/test-snapshots/query/1cc6be6019502e83/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1cc6be6019502e83/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1cc6be6019502e83/request.json b/test-snapshots/query/1cc6be6019502e83/request.json new file mode 100644 index 0000000..241df79 --- /dev/null +++ b/test-snapshots/query/1cc6be6019502e83/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1ccc84e8d97e6946/expected.json b/test-snapshots/query/1ccc84e8d97e6946/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/1ccc84e8d97e6946/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1ccc84e8d97e6946/request.json b/test-snapshots/query/1ccc84e8d97e6946/request.json new file mode 100644 index 0000000..4366721 --- /dev/null +++ b/test-snapshots/query/1ccc84e8d97e6946/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 263-4423" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1cce88201e8f947c/expected.json b/test-snapshots/query/1cce88201e8f947c/expected.json new file mode 100644 index 0000000..17575ba --- /dev/null +++ b/test-snapshots/query/1cce88201e8f947c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + }, + { + "Quantity_5770": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1cce88201e8f947c/request.json b/test-snapshots/query/1cce88201e8f947c/request.json new file mode 100644 index 0000000..23e9524 --- /dev/null +++ b/test-snapshots/query/1cce88201e8f947c/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_5770": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1cfdd226b0891fcd/expected.json b/test-snapshots/query/1cfdd226b0891fcd/expected.json new file mode 100644 index 0000000..ff71bb6 --- /dev/null +++ b/test-snapshots/query/1cfdd226b0891fcd/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_4013": 208, + "ArtistId_0253": 136, + "Title_7714": "[1997] Black Light Syndrome" + }, + { + "AlbumId_4013": 240, + "ArtistId_0253": 150, + "Title_7714": "Zooropa" + }, + { + "AlbumId_4013": 267, + "ArtistId_0253": 202, + "Title_7714": "Worlds" + }, + { + "AlbumId_4013": 334, + "ArtistId_0253": 264, + "Title_7714": "Weill: The Seven Deadly Sins" + }, + { + "AlbumId_4013": 8, + "ArtistId_0253": 6, + "Title_7714": "Warner 25 Anos" + }, + { + "AlbumId_4013": 239, + "ArtistId_0253": 150, + "Title_7714": "War" + }, + { + "AlbumId_4013": 175, + "ArtistId_0253": 115, + "Title_7714": "Walking Into Clarksdale" + }, + { + "AlbumId_4013": 287, + "ArtistId_0253": 221, + "Title_7714": "Wagner: Favourite Overtures" + }, + { + "AlbumId_4013": 182, + "ArtistId_0253": 118, + "Title_7714": "Vs." + }, + { + "AlbumId_4013": 53, + "ArtistId_0253": 21, + "Title_7714": "Vozes do MPB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1cfdd226b0891fcd/request.json b/test-snapshots/query/1cfdd226b0891fcd/request.json new file mode 100644 index 0000000..5d35b08 --- /dev/null +++ b/test-snapshots/query/1cfdd226b0891fcd/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_4013": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_0253": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_7714": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1d0a5fe6e9fe0b8e/expected.json b/test-snapshots/query/1d0a5fe6e9fe0b8e/expected.json new file mode 100644 index 0000000..e6988b0 --- /dev/null +++ b/test-snapshots/query/1d0a5fe6e9fe0b8e/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_3936": 412, + "InvoiceLineId_9571": 2240, + "TrackId_5978": 3177 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2226, + "TrackId_5978": 3046 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2227, + "TrackId_5978": 3055 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2228, + "TrackId_5978": 3064 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2229, + "TrackId_5978": 3073 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2230, + "TrackId_5978": 3082 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2231, + "TrackId_5978": 3091 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2232, + "TrackId_5978": 3100 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2233, + "TrackId_5978": 3109 + }, + { + "InvoiceId_3936": 411, + "InvoiceLineId_9571": 2234, + "TrackId_5978": 3118 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d0a5fe6e9fe0b8e/request.json b/test-snapshots/query/1d0a5fe6e9fe0b8e/request.json new file mode 100644 index 0000000..60a0217 --- /dev/null +++ b/test-snapshots/query/1d0a5fe6e9fe0b8e/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_3936": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_9571": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "TrackId_5978": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1d0e5cfc0172b60d/expected.json b/test-snapshots/query/1d0e5cfc0172b60d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1d0e5cfc0172b60d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d0e5cfc0172b60d/request.json b/test-snapshots/query/1d0e5cfc0172b60d/request.json new file mode 100644 index 0000000..8c48149 --- /dev/null +++ b/test-snapshots/query/1d0e5cfc0172b60d/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1d0ef2a268aab0a/expected.json b/test-snapshots/query/1d0ef2a268aab0a/expected.json new file mode 100644 index 0000000..139da0b --- /dev/null +++ b/test-snapshots/query/1d0ef2a268aab0a/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d0ef2a268aab0a/request.json b/test-snapshots/query/1d0ef2a268aab0a/request.json new file mode 100644 index 0000000..5e21aae --- /dev/null +++ b/test-snapshots/query/1d0ef2a268aab0a/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1d1e35798e5d17e/expected.json b/test-snapshots/query/1d1e35798e5d17e/expected.json new file mode 100644 index 0000000..7552f53 --- /dev/null +++ b/test-snapshots/query/1d1e35798e5d17e/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "Email_0187": "puja_srivastava@yahoo.in", + "PostalCode_9783": "560001", + "SupportRepId_7069": 3 + }, + { + "Email_0187": "manoj.pareek@rediff.com", + "PostalCode_9783": "110017", + "SupportRepId_7069": 3 + }, + { + "Email_0187": "mark.taylor@yahoo.au", + "PostalCode_9783": "2010", + "SupportRepId_7069": 4 + }, + { + "Email_0187": "luisrojas@yahoo.cl", + "PostalCode_9783": null, + "SupportRepId_7069": 5 + }, + { + "Email_0187": "fernadaramos4@uol.com.br", + "PostalCode_9783": "71020-677", + "SupportRepId_7069": 4 + }, + { + "Email_0187": "roberto.almeida@riotur.gov.br", + "PostalCode_9783": "20040-020", + "SupportRepId_7069": 3 + }, + { + "Email_0187": "luisg@embraer.com.br", + "PostalCode_9783": "12227-000", + "SupportRepId_7069": 3 + }, + { + "Email_0187": "alero@uol.com.br", + "PostalCode_9783": "01310-200", + "SupportRepId_7069": 5 + }, + { + "Email_0187": "eduardo@woodstock.com.br", + "PostalCode_9783": "01007-010", + "SupportRepId_7069": 4 + }, + { + "Email_0187": "diego.gutierrez@yahoo.ar", + "PostalCode_9783": "1106", + "SupportRepId_7069": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d1e35798e5d17e/request.json b/test-snapshots/query/1d1e35798e5d17e/request.json new file mode 100644 index 0000000..f461b65 --- /dev/null +++ b/test-snapshots/query/1d1e35798e5d17e/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Email_0187": { + "type": "column", + "column": "Email", + "fields": null + }, + "SupportRepId_7069": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "PostalCode_9783": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1d2db30b0bd38d66/expected.json b/test-snapshots/query/1d2db30b0bd38d66/expected.json new file mode 100644 index 0000000..900eca7 --- /dev/null +++ b/test-snapshots/query/1d2db30b0bd38d66/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 10 + }, + { + "PlaylistId": 1, + "TrackId": 11 + }, + { + "PlaylistId": 1, + "TrackId": 12 + }, + { + "PlaylistId": 1, + "TrackId": 13 + }, + { + "PlaylistId": 1, + "TrackId": 14 + }, + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 1, + "TrackId": 6 + }, + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 1, + "TrackId": 8 + }, + { + "PlaylistId": 1, + "TrackId": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d2db30b0bd38d66/request.json b/test-snapshots/query/1d2db30b0bd38d66/request.json new file mode 100644 index 0000000..573a3ae --- /dev/null +++ b/test-snapshots/query/1d2db30b0bd38d66/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1d36906fa4a29c0c/expected.json b/test-snapshots/query/1d36906fa4a29c0c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1d36906fa4a29c0c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d36906fa4a29c0c/request.json b/test-snapshots/query/1d36906fa4a29c0c/request.json new file mode 100644 index 0000000..958e2c9 --- /dev/null +++ b/test-snapshots/query/1d36906fa4a29c0c/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Peacock" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1d4e5d521f51693c/expected.json b/test-snapshots/query/1d4e5d521f51693c/expected.json new file mode 100644 index 0000000..689817f --- /dev/null +++ b/test-snapshots/query/1d4e5d521f51693c/expected.json @@ -0,0 +1,176 @@ +[ + { + "rows": [ + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 199836, + "Name_4819": "C.O.D.", + "TrackId_8951": 11, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 203102, + "Name_4819": "Snowballed", + "TrackId_8951": 9, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 205662, + "Name_4819": "Put The Finger On You", + "TrackId_8951": 6, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 205688, + "Name_4819": "Night Of The Long Knives", + "TrackId_8951": 13, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 210834, + "Name_4819": "Inject The Venom", + "TrackId_8951": 8, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 233926, + "Name_4819": "Let's Get It Up", + "TrackId_8951": 7, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 263288, + "Name_4819": "Breaking The Rules", + "TrackId_8951": 12, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 263497, + "Name_4819": "Evil Walks", + "TrackId_8951": 10, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 270863, + "Name_4819": "Spellbound", + "TrackId_8951": 14, + "UnitPrice_9860": 0.99 + }, + { + "AlbumId_9500": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_9800": 1, + "MediaTypeId_7459": 1, + "Milliseconds_9136": 343719, + "Name_4819": "For Those About To Rock (We Salute You)", + "TrackId_8951": 1, + "UnitPrice_9860": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d4e5d521f51693c/request.json b/test-snapshots/query/1d4e5d521f51693c/request.json new file mode 100644 index 0000000..fb2fdc2 --- /dev/null +++ b/test-snapshots/query/1d4e5d521f51693c/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_9500": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "UnitPrice_9860": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "TrackId_8951": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "GenreId_9800": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_7459": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_9136": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_4819": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1d507214b8a6a0d3/expected.json b/test-snapshots/query/1d507214b8a6a0d3/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/1d507214b8a6a0d3/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d507214b8a6a0d3/request.json b/test-snapshots/query/1d507214b8a6a0d3/request.json new file mode 100644 index 0000000..ba4838f --- /dev/null +++ b/test-snapshots/query/1d507214b8a6a0d3/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1d839c2e63d82278/expected.json b/test-snapshots/query/1d839c2e63d82278/expected.json new file mode 100644 index 0000000..feffa29 --- /dev/null +++ b/test-snapshots/query/1d839c2e63d82278/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "InvoiceId_6494": 412 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + }, + { + "InvoiceId_6494": 411 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d839c2e63d82278/request.json b/test-snapshots/query/1d839c2e63d82278/request.json new file mode 100644 index 0000000..6302079 --- /dev/null +++ b/test-snapshots/query/1d839c2e63d82278/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_6494": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1d88a0ce44428642/expected.json b/test-snapshots/query/1d88a0ce44428642/expected.json new file mode 100644 index 0000000..dc24a7f --- /dev/null +++ b/test-snapshots/query/1d88a0ce44428642/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "AlbumId_avg_8769": 174, + "AlbumId_sum_6686": 60378, + "ArtistId_avg_0043": 121.942363112, + "ArtistId_sum_8401": 42314 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d88a0ce44428642/request.json b/test-snapshots/query/1d88a0ce44428642/request.json new file mode 100644 index 0000000..b456705 --- /dev/null +++ b/test-snapshots/query/1d88a0ce44428642/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "ArtistId_avg_0043": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + }, + "AlbumId_avg_8769": { + "type": "single_column", + "column": "AlbumId", + "function": "avg" + }, + "AlbumId_sum_6686": { + "type": "single_column", + "column": "AlbumId", + "function": "sum" + }, + "ArtistId_sum_8401": { + "type": "single_column", + "column": "ArtistId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1d9e7645e1962d71/expected.json b/test-snapshots/query/1d9e7645e1962d71/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1d9e7645e1962d71/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1d9e7645e1962d71/request.json b/test-snapshots/query/1d9e7645e1962d71/request.json new file mode 100644 index 0000000..af901a4 --- /dev/null +++ b/test-snapshots/query/1d9e7645e1962d71/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-12-13" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1dc7057c0bdd6c85/expected.json b/test-snapshots/query/1dc7057c0bdd6c85/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1dc7057c0bdd6c85/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1dc7057c0bdd6c85/request.json b/test-snapshots/query/1dc7057c0bdd6c85/request.json new file mode 100644 index 0000000..882384b --- /dev/null +++ b/test-snapshots/query/1dc7057c0bdd6c85/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1df274f50e22cf77/expected.json b/test-snapshots/query/1df274f50e22cf77/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1df274f50e22cf77/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1df274f50e22cf77/request.json b/test-snapshots/query/1df274f50e22cf77/request.json new file mode 100644 index 0000000..c9edd9e --- /dev/null +++ b/test-snapshots/query/1df274f50e22cf77/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "margaret@chinookcorp.com" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-8772" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1e11a76c49276dcf/expected.json b/test-snapshots/query/1e11a76c49276dcf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1e11a76c49276dcf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1e11a76c49276dcf/request.json b/test-snapshots/query/1e11a76c49276dcf/request.json new file mode 100644 index 0000000..3056ef0 --- /dev/null +++ b/test-snapshots/query/1e11a76c49276dcf/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1e3014ac2e39e017/expected.json b/test-snapshots/query/1e3014ac2e39e017/expected.json new file mode 100644 index 0000000..d7090d9 --- /dev/null +++ b/test-snapshots/query/1e3014ac2e39e017/expected.json @@ -0,0 +1,379 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "CustomerId_6693": 1, + "Email_7158": "luisg@embraer.com.br", + "FirstName_9125": "Luís", + "PostalCode_6638": "12227-000", + "State_7879": "SP" + }, + { + "CustomerId_6693": 12, + "Email_7158": "roberto.almeida@riotur.gov.br", + "FirstName_9125": "Roberto", + "PostalCode_6638": "20040-020", + "State_7879": "RJ" + }, + { + "CustomerId_6693": 15, + "Email_7158": "jenniferp@rogers.ca", + "FirstName_9125": "Jennifer", + "PostalCode_6638": "V6C 1G8", + "State_7879": "BC" + }, + { + "CustomerId_6693": 18, + "Email_7158": "michelleb@aol.com", + "FirstName_9125": "Michelle", + "PostalCode_6638": "10012-2612", + "State_7879": "NY" + }, + { + "CustomerId_6693": 19, + "Email_7158": "tgoyer@apple.com", + "FirstName_9125": "Tim", + "PostalCode_6638": "95014", + "State_7879": "CA" + }, + { + "CustomerId_6693": 24, + "Email_7158": "fralston@gmail.com", + "FirstName_9125": "Frank", + "PostalCode_6638": "60611", + "State_7879": "IL" + }, + { + "CustomerId_6693": 29, + "Email_7158": "robbrown@shaw.ca", + "FirstName_9125": "Robert", + "PostalCode_6638": "M6J 1V1", + "State_7879": "ON" + }, + { + "CustomerId_6693": 3, + "Email_7158": "ftremblay@gmail.com", + "FirstName_9125": "François", + "PostalCode_6638": "H2G 1A7", + "State_7879": "QC" + }, + { + "CustomerId_6693": 30, + "Email_7158": "edfrancis@yachoo.ca", + "FirstName_9125": "Edward", + "PostalCode_6638": "K2P 1L7", + "State_7879": "ON" + }, + { + "CustomerId_6693": 33, + "Email_7158": "ellie.sullivan@shaw.ca", + "FirstName_9125": "Ellie", + "PostalCode_6638": "X1A 1N6", + "State_7879": "NT" + } + ] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "CustomerId_6693": 10, + "Email_7158": "eduardo@woodstock.com.br", + "FirstName_9125": "Eduardo", + "PostalCode_6638": "01007-010", + "State_7879": "SP" + }, + { + "CustomerId_6693": 13, + "Email_7158": "fernadaramos4@uol.com.br", + "FirstName_9125": "Fernanda", + "PostalCode_6638": "71020-677", + "State_7879": "DF" + }, + { + "CustomerId_6693": 16, + "Email_7158": "fharris@google.com", + "FirstName_9125": "Frank", + "PostalCode_6638": "94043-1351", + "State_7879": "CA" + }, + { + "CustomerId_6693": 20, + "Email_7158": "dmiller@comcast.com", + "FirstName_9125": "Dan", + "PostalCode_6638": "94040-111", + "State_7879": "CA" + }, + { + "CustomerId_6693": 22, + "Email_7158": "hleacock@gmail.com", + "FirstName_9125": "Heather", + "PostalCode_6638": "32801", + "State_7879": "FL" + }, + { + "CustomerId_6693": 23, + "Email_7158": "johngordon22@yahoo.com", + "FirstName_9125": "John", + "PostalCode_6638": "2113", + "State_7879": "MA" + }, + { + "CustomerId_6693": 26, + "Email_7158": "ricunningham@hotmail.com", + "FirstName_9125": "Richard", + "PostalCode_6638": "76110", + "State_7879": "TX" + }, + { + "CustomerId_6693": 27, + "Email_7158": "patrick.gray@aol.com", + "FirstName_9125": "Patrick", + "PostalCode_6638": "85719", + "State_7879": "AZ" + }, + { + "CustomerId_6693": 32, + "Email_7158": "aaronmitchell@yahoo.ca", + "FirstName_9125": "Aaron", + "PostalCode_6638": "R3L 2B9", + "State_7879": "MB" + }, + { + "CustomerId_6693": 34, + "Email_7158": "jfernandes@yahoo.pt", + "FirstName_9125": "João", + "PostalCode_6638": null, + "State_7879": null + } + ] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "CustomerId_6693": 11, + "Email_7158": "alero@uol.com.br", + "FirstName_9125": "Alexandre", + "PostalCode_6638": "01310-200", + "State_7879": "SP" + }, + { + "CustomerId_6693": 14, + "Email_7158": "mphilips12@shaw.ca", + "FirstName_9125": "Mark", + "PostalCode_6638": "T6G 2C7", + "State_7879": "AB" + }, + { + "CustomerId_6693": 17, + "Email_7158": "jacksmith@microsoft.com", + "FirstName_9125": "Jack", + "PostalCode_6638": "98052-8300", + "State_7879": "WA" + }, + { + "CustomerId_6693": 2, + "Email_7158": "leonekohler@surfeu.de", + "FirstName_9125": "Leonie", + "PostalCode_6638": "70174", + "State_7879": null + }, + { + "CustomerId_6693": 21, + "Email_7158": "kachase@hotmail.com", + "FirstName_9125": "Kathy", + "PostalCode_6638": "89503", + "State_7879": "NV" + }, + { + "CustomerId_6693": 25, + "Email_7158": "vstevens@yahoo.com", + "FirstName_9125": "Victor", + "PostalCode_6638": "53703", + "State_7879": "WI" + }, + { + "CustomerId_6693": 28, + "Email_7158": "jubarnett@gmail.com", + "FirstName_9125": "Julia", + "PostalCode_6638": "84102", + "State_7879": "UT" + }, + { + "CustomerId_6693": 31, + "Email_7158": "marthasilk@gmail.com", + "FirstName_9125": "Martha", + "PostalCode_6638": "B3S 1C5", + "State_7879": "NS" + }, + { + "CustomerId_6693": 36, + "Email_7158": "hannah.schneider@yahoo.de", + "FirstName_9125": "Hannah", + "PostalCode_6638": "10789", + "State_7879": null + }, + { + "CustomerId_6693": 41, + "Email_7158": "marc.dubois@hotmail.com", + "FirstName_9125": "Marc", + "PostalCode_6638": "69002", + "State_7879": null + } + ] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1e3014ac2e39e017/request.json b/test-snapshots/query/1e3014ac2e39e017/request.json new file mode 100644 index 0000000..dbf9a1c --- /dev/null +++ b/test-snapshots/query/1e3014ac2e39e017/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "FirstName_9125": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "PostalCode_6638": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_7879": { + "type": "column", + "column": "State", + "fields": null + }, + "Email_7158": { + "type": "column", + "column": "Email", + "fields": null + }, + "CustomerId_6693": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1e3564c566e2e47d/expected.json b/test-snapshots/query/1e3564c566e2e47d/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/1e3564c566e2e47d/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1e3564c566e2e47d/request.json b/test-snapshots/query/1e3564c566e2e47d/request.json new file mode 100644 index 0000000..358e939 --- /dev/null +++ b/test-snapshots/query/1e3564c566e2e47d/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1e9b01fbce54e2bd/expected.json b/test-snapshots/query/1e9b01fbce54e2bd/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/1e9b01fbce54e2bd/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1e9b01fbce54e2bd/request.json b/test-snapshots/query/1e9b01fbce54e2bd/request.json new file mode 100644 index 0000000..d7c35dc --- /dev/null +++ b/test-snapshots/query/1e9b01fbce54e2bd/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1e9b487c53f0e353/expected.json b/test-snapshots/query/1e9b487c53f0e353/expected.json new file mode 100644 index 0000000..7634701 --- /dev/null +++ b/test-snapshots/query/1e9b487c53f0e353/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2009-03-04", + "InvoiceId_7594": 15 + }, + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2009-04-14", + "InvoiceId_7594": 26 + }, + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2009-12-13", + "InvoiceId_7594": 81 + }, + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2011-07-20", + "InvoiceId_7594": 210 + }, + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2011-10-22", + "InvoiceId_7594": 233 + }, + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2012-01-24", + "InvoiceId_7594": 255 + }, + { + "BillingAddress_0004": "1 Infinite Loop", + "BillingCity_2043": "Cupertino", + "BillingCountry_3229": "USA", + "BillingState_9888": "CA", + "CustomerId_9102": 19, + "InvoiceDate_6040": "2012-09-13", + "InvoiceId_7594": 307 + }, + { + "BillingAddress_0004": "1 Microsoft Way", + "BillingCity_2043": "Redmond", + "BillingCountry_3229": "USA", + "BillingState_9888": "WA", + "CustomerId_9102": 17, + "InvoiceDate_6040": "2009-03-04", + "InvoiceId_7594": 14 + }, + { + "BillingAddress_0004": "1 Microsoft Way", + "BillingCity_2043": "Redmond", + "BillingCountry_3229": "USA", + "BillingState_9888": "WA", + "CustomerId_9102": 17, + "InvoiceDate_6040": "2009-06-06", + "InvoiceId_7594": 37 + }, + { + "BillingAddress_0004": "1 Microsoft Way", + "BillingCity_2043": "Redmond", + "BillingCountry_3229": "USA", + "BillingState_9888": "WA", + "CustomerId_9102": 17, + "InvoiceDate_6040": "2009-09-08", + "InvoiceId_7594": 59 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1e9b487c53f0e353/request.json b/test-snapshots/query/1e9b487c53f0e353/request.json new file mode 100644 index 0000000..0c6fdc7 --- /dev/null +++ b/test-snapshots/query/1e9b487c53f0e353/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_0004": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_2043": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_3229": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "InvoiceId_7594": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingState_9888": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_9102": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_6040": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1ea96dae3099a671/expected.json b/test-snapshots/query/1ea96dae3099a671/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1ea96dae3099a671/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1ea96dae3099a671/request.json b/test-snapshots/query/1ea96dae3099a671/request.json new file mode 100644 index 0000000..7a3b6ea --- /dev/null +++ b/test-snapshots/query/1ea96dae3099a671/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Callahan" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1eb0f09f2527a5db/expected.json b/test-snapshots/query/1eb0f09f2527a5db/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1eb0f09f2527a5db/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1eb0f09f2527a5db/request.json b/test-snapshots/query/1eb0f09f2527a5db/request.json new file mode 100644 index 0000000..a2616e1 --- /dev/null +++ b/test-snapshots/query/1eb0f09f2527a5db/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1edfee0d2253ba6d/expected.json b/test-snapshots/query/1edfee0d2253ba6d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1edfee0d2253ba6d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1edfee0d2253ba6d/request.json b/test-snapshots/query/1edfee0d2253ba6d/request.json new file mode 100644 index 0000000..252eb04 --- /dev/null +++ b/test-snapshots/query/1edfee0d2253ba6d/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1eebad3b433577ce/expected.json b/test-snapshots/query/1eebad3b433577ce/expected.json new file mode 100644 index 0000000..2464626 --- /dev/null +++ b/test-snapshots/query/1eebad3b433577ce/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "11, Place Bellecour", + "BillingCity_9985": "Lyon", + "BillingPostalCode_7337": "69002", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "110 Raeburn Pl", + "BillingCity_9985": "Edinburgh ", + "BillingPostalCode_7337": "EH4 1HH", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "110 Raeburn Pl", + "BillingCity_9985": "Edinburgh ", + "BillingPostalCode_7337": "EH4 1HH", + "BillingState_7797": null + }, + { + "BillingAddress_0422": "110 Raeburn Pl", + "BillingCity_9985": "Edinburgh ", + "BillingPostalCode_7337": "EH4 1HH", + "BillingState_7797": null + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1eebad3b433577ce/request.json b/test-snapshots/query/1eebad3b433577ce/request.json new file mode 100644 index 0000000..59bac9e --- /dev/null +++ b/test-snapshots/query/1eebad3b433577ce/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_0422": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_9985": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingState_7797": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "BillingPostalCode_7337": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1ef5cbf96692dd9d/expected.json b/test-snapshots/query/1ef5cbf96692dd9d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1ef5cbf96692dd9d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1ef5cbf96692dd9d/request.json b/test-snapshots/query/1ef5cbf96692dd9d/request.json new file mode 100644 index 0000000..5551281 --- /dev/null +++ b/test-snapshots/query/1ef5cbf96692dd9d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1f3bc69ae0f33405/expected.json b/test-snapshots/query/1f3bc69ae0f33405/expected.json new file mode 100644 index 0000000..9e3f149 --- /dev/null +++ b/test-snapshots/query/1f3bc69ae0f33405/expected.json @@ -0,0 +1,14 @@ +[ + { + "aggregates": { + "PlaylistId_count_3127": 8715, + "PlaylistId_max_0587": 18, + "PlaylistId_min_0469": 1, + "PlaylistId_sum_0583": 42852, + "TrackId_avg_1558": 1767.081698221, + "TrackId_count_7045": 8715, + "TrackId_median_2243": 1773, + "TrackId_min_7324": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f3bc69ae0f33405/request.json b/test-snapshots/query/1f3bc69ae0f33405/request.json new file mode 100644 index 0000000..2becb01 --- /dev/null +++ b/test-snapshots/query/1f3bc69ae0f33405/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "TrackId_count_7045": { + "type": "single_column", + "column": "TrackId", + "function": "count" + }, + "PlaylistId_count_3127": { + "type": "single_column", + "column": "PlaylistId", + "function": "count" + }, + "PlaylistId_max_0587": { + "type": "single_column", + "column": "PlaylistId", + "function": "max" + }, + "TrackId_median_2243": { + "type": "single_column", + "column": "TrackId", + "function": "median" + }, + "PlaylistId_min_0469": { + "type": "single_column", + "column": "PlaylistId", + "function": "min" + }, + "PlaylistId_sum_0583": { + "type": "single_column", + "column": "PlaylistId", + "function": "sum" + }, + "TrackId_min_7324": { + "type": "single_column", + "column": "TrackId", + "function": "min" + }, + "TrackId_avg_1558": { + "type": "single_column", + "column": "TrackId", + "function": "avg" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1f51c7f7a19f9a6d/expected.json b/test-snapshots/query/1f51c7f7a19f9a6d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1f51c7f7a19f9a6d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f51c7f7a19f9a6d/request.json b/test-snapshots/query/1f51c7f7a19f9a6d/request.json new file mode 100644 index 0000000..0fe7543 --- /dev/null +++ b/test-snapshots/query/1f51c7f7a19f9a6d/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1f65a3360e962e94/expected.json b/test-snapshots/query/1f65a3360e962e94/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/1f65a3360e962e94/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f65a3360e962e94/request.json b/test-snapshots/query/1f65a3360e962e94/request.json new file mode 100644 index 0000000..636421e --- /dev/null +++ b/test-snapshots/query/1f65a3360e962e94/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1f8350a55d76d655/expected.json b/test-snapshots/query/1f8350a55d76d655/expected.json new file mode 100644 index 0000000..7d9f7cf --- /dev/null +++ b/test-snapshots/query/1f8350a55d76d655/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f8350a55d76d655/request.json b/test-snapshots/query/1f8350a55d76d655/request.json new file mode 100644 index 0000000..a4aff30 --- /dev/null +++ b/test-snapshots/query/1f8350a55d76d655/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1f9230981b4899e/expected.json b/test-snapshots/query/1f9230981b4899e/expected.json new file mode 100644 index 0000000..5b848e0 --- /dev/null +++ b/test-snapshots/query/1f9230981b4899e/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1020 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1021 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1022 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1023 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1024 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1025 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1026 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1027 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1028 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_2933": 5, + "TrackId_8869": 1029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f9230981b4899e/request.json b/test-snapshots/query/1f9230981b4899e/request.json new file mode 100644 index 0000000..c161343 --- /dev/null +++ b/test-snapshots/query/1f9230981b4899e/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_2933": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_8869": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1f95043d99e93deb/expected.json b/test-snapshots/query/1f95043d99e93deb/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/1f95043d99e93deb/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f95043d99e93deb/request.json b/test-snapshots/query/1f95043d99e93deb/request.json new file mode 100644 index 0000000..2b9dc78 --- /dev/null +++ b/test-snapshots/query/1f95043d99e93deb/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/1f97d5d84e30a0b7/expected.json b/test-snapshots/query/1f97d5d84e30a0b7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1f97d5d84e30a0b7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f97d5d84e30a0b7/request.json b/test-snapshots/query/1f97d5d84e30a0b7/request.json new file mode 100644 index 0000000..eea729c --- /dev/null +++ b/test-snapshots/query/1f97d5d84e30a0b7/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 203102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1f9ef8f1067a5819/expected.json b/test-snapshots/query/1f9ef8f1067a5819/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/1f9ef8f1067a5819/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1f9ef8f1067a5819/request.json b/test-snapshots/query/1f9ef8f1067a5819/request.json new file mode 100644 index 0000000..d07216a --- /dev/null +++ b/test-snapshots/query/1f9ef8f1067a5819/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Electronica/Dance" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1fcf915f554e9baf/expected.json b/test-snapshots/query/1fcf915f554e9baf/expected.json new file mode 100644 index 0000000..2e28ef7 --- /dev/null +++ b/test-snapshots/query/1fcf915f554e9baf/expected.json @@ -0,0 +1,266 @@ +[ + { + "rows": [ + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 0.99 + }, + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 1.98 + }, + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 1.98 + }, + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 13.86 + }, + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 3.96 + }, + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 8.91 + }, + { + "BillingCity_8304": "Amsterdam", + "BillingCountry_5708": "Netherlands", + "BillingState_7751": "VV", + "CustomerId_9392": 48, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "Lijnbaansgracht 120bg", + "City": "Amsterdam", + "Company": null, + "Country": "Netherlands", + "CustomerId": 48, + "Email": "johavanderberg@yahoo.nl", + "Fax": null, + "FirstName": "Johannes", + "LastName": "Van der Berg", + "Phone": "+31 020 6223130", + "PostalCode": "1016", + "State": "VV", + "SupportRepId": 5 + } + ] + }, + "Total_4631": 8.94 + }, + { + "BillingCity_8304": "Bangalore", + "BillingCountry_5708": "India", + "BillingState_7751": null, + "CustomerId_9392": 59, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + } + ] + }, + "Total_4631": 1.98 + }, + { + "BillingCity_8304": "Bangalore", + "BillingCountry_5708": "India", + "BillingState_7751": null, + "CustomerId_9392": 59, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + } + ] + }, + "Total_4631": 1.99 + }, + { + "BillingCity_8304": "Bangalore", + "BillingCountry_5708": "India", + "BillingState_7751": null, + "CustomerId_9392": 59, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + } + ] + }, + "Total_4631": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1fcf915f554e9baf/request.json b/test-snapshots/query/1fcf915f554e9baf/request.json new file mode 100644 index 0000000..4c5fcbe --- /dev/null +++ b/test-snapshots/query/1fcf915f554e9baf/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "Total_4631": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCity_8304": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_5708": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "CustomerId_9392": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "BillingState_7751": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/1fdf0da88662ee00/expected.json b/test-snapshots/query/1fdf0da88662ee00/expected.json new file mode 100644 index 0000000..65a3604 --- /dev/null +++ b/test-snapshots/query/1fdf0da88662ee00/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/1fdf0da88662ee00/request.json b/test-snapshots/query/1fdf0da88662ee00/request.json new file mode 100644 index 0000000..b4e83ef --- /dev/null +++ b/test-snapshots/query/1fdf0da88662ee00/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/200b976b36a3444e/expected.json b/test-snapshots/query/200b976b36a3444e/expected.json new file mode 100644 index 0000000..b28ce7f --- /dev/null +++ b/test-snapshots/query/200b976b36a3444e/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 13 + }, + { + "PlaylistId": 8, + "TrackId": 13 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/200b976b36a3444e/request.json b/test-snapshots/query/200b976b36a3444e/request.json new file mode 100644 index 0000000..33dd428 --- /dev/null +++ b/test-snapshots/query/200b976b36a3444e/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6706347 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2019603982fa3d3a/expected.json b/test-snapshots/query/2019603982fa3d3a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2019603982fa3d3a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2019603982fa3d3a/request.json b/test-snapshots/query/2019603982fa3d3a/request.json new file mode 100644 index 0000000..52c86cc --- /dev/null +++ b/test-snapshots/query/2019603982fa3d3a/request.json @@ -0,0 +1,136 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Park" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Andrew" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/20415952aa9d9cb9/expected.json b/test-snapshots/query/20415952aa9d9cb9/expected.json new file mode 100644 index 0000000..b47235a --- /dev/null +++ b/test-snapshots/query/20415952aa9d9cb9/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/20415952aa9d9cb9/request.json b/test-snapshots/query/20415952aa9d9cb9/request.json new file mode 100644 index 0000000..8c5f585 --- /dev/null +++ b/test-snapshots/query/20415952aa9d9cb9/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/206c6036487b71f/expected.json b/test-snapshots/query/206c6036487b71f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/206c6036487b71f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/206c6036487b71f/request.json b/test-snapshots/query/206c6036487b71f/request.json new file mode 100644 index 0000000..2be4410 --- /dev/null +++ b/test-snapshots/query/206c6036487b71f/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2091f6d94031f7b8/expected.json b/test-snapshots/query/2091f6d94031f7b8/expected.json new file mode 100644 index 0000000..6f73e0e --- /dev/null +++ b/test-snapshots/query/2091f6d94031f7b8/expected.json @@ -0,0 +1,8 @@ +[ + { + "aggregates": { + "ArtistId_avg_5030": 121.942363112, + "ArtistId_max_7035": 275 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/2091f6d94031f7b8/request.json b/test-snapshots/query/2091f6d94031f7b8/request.json new file mode 100644 index 0000000..15395aa --- /dev/null +++ b/test-snapshots/query/2091f6d94031f7b8/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "ArtistId_max_7035": { + "type": "single_column", + "column": "ArtistId", + "function": "max" + }, + "ArtistId_avg_5030": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/20bd80a3f2fc38fd/expected.json b/test-snapshots/query/20bd80a3f2fc38fd/expected.json new file mode 100644 index 0000000..54ca339 --- /dev/null +++ b/test-snapshots/query/20bd80a3f2fc38fd/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 2240 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/20bd80a3f2fc38fd/request.json b/test-snapshots/query/20bd80a3f2fc38fd/request.json new file mode 100644 index 0000000..d943170 --- /dev/null +++ b/test-snapshots/query/20bd80a3f2fc38fd/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/20fc70bc8ac27718/expected.json b/test-snapshots/query/20fc70bc8ac27718/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/20fc70bc8ac27718/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/20fc70bc8ac27718/request.json b/test-snapshots/query/20fc70bc8ac27718/request.json new file mode 100644 index 0000000..4116292 --- /dev/null +++ b/test-snapshots/query/20fc70bc8ac27718/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2125c9850ceae6db/expected.json b/test-snapshots/query/2125c9850ceae6db/expected.json new file mode 100644 index 0000000..f34d849 --- /dev/null +++ b/test-snapshots/query/2125c9850ceae6db/expected.json @@ -0,0 +1,134 @@ +[ + { + "rows": [ + { + "BirthDate_6438": "1947-09-19", + "City_1521": "Calgary", + "Country_4335": "Canada", + "Email_4038": "margaret@chinookcorp.com", + "EmployeeId_5135": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (403) 263-4289", + "FirstName_7888": "Margaret", + "LastName_2870": "Park", + "PostalCode_2120": "T2P 5G3", + "ReportsTo_0812": 2, + "Title_0620": "Sales Support Agent" + }, + { + "BirthDate_6438": "1958-12-08", + "City_1521": "Calgary", + "Country_4335": "Canada", + "Email_4038": "nancy@chinookcorp.com", + "EmployeeId_5135": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (403) 262-3322", + "FirstName_7888": "Nancy", + "LastName_2870": "Edwards", + "PostalCode_2120": "T2P 2T3", + "ReportsTo_0812": 1, + "Title_0620": "Sales Manager" + }, + { + "BirthDate_6438": "1962-02-18", + "City_1521": "Edmonton", + "Country_4335": "Canada", + "Email_4038": "andrew@chinookcorp.com", + "EmployeeId_5135": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (780) 428-3457", + "FirstName_7888": "Andrew", + "LastName_2870": "Adams", + "PostalCode_2120": "T5K 2N1", + "ReportsTo_0812": null, + "Title_0620": "General Manager" + }, + { + "BirthDate_6438": "1965-03-03", + "City_1521": "Calgary", + "Country_4335": "Canada", + "Email_4038": "steve@chinookcorp.com", + "EmployeeId_5135": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "1 (780) 836-9543", + "FirstName_7888": "Steve", + "LastName_2870": "Johnson", + "PostalCode_2120": "T3B 1Y7", + "ReportsTo_0812": 2, + "Title_0620": "Sales Support Agent" + }, + { + "BirthDate_6438": "1968-01-09", + "City_1521": "Lethbridge", + "Country_4335": "Canada", + "Email_4038": "laura@chinookcorp.com", + "EmployeeId_5135": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (403) 467-8772", + "FirstName_7888": "Laura", + "LastName_2870": "Callahan", + "PostalCode_2120": "T1H 1Y8", + "ReportsTo_0812": 6, + "Title_0620": "IT Staff" + }, + { + "BirthDate_6438": "1970-05-29", + "City_1521": "Lethbridge", + "Country_4335": "Canada", + "Email_4038": "robert@chinookcorp.com", + "EmployeeId_5135": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (403) 456-8485", + "FirstName_7888": "Robert", + "LastName_2870": "King", + "PostalCode_2120": "T1K 5N8", + "ReportsTo_0812": 6, + "Title_0620": "IT Staff" + }, + { + "BirthDate_6438": "1973-07-01", + "City_1521": "Calgary", + "Country_4335": "Canada", + "Email_4038": "michael@chinookcorp.com", + "EmployeeId_5135": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (403) 246-9899", + "FirstName_7888": "Michael", + "LastName_2870": "Mitchell", + "PostalCode_2120": "T3B 0C5", + "ReportsTo_0812": 1, + "Title_0620": "IT Manager" + }, + { + "BirthDate_6438": "1973-08-29", + "City_1521": "Calgary", + "Country_4335": "Canada", + "Email_4038": "jane@chinookcorp.com", + "EmployeeId_5135": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_0669": "+1 (403) 262-6712", + "FirstName_7888": "Jane", + "LastName_2870": "Peacock", + "PostalCode_2120": "T2P 5M5", + "ReportsTo_0812": 2, + "Title_0620": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2125c9850ceae6db/request.json b/test-snapshots/query/2125c9850ceae6db/request.json new file mode 100644 index 0000000..c840372 --- /dev/null +++ b/test-snapshots/query/2125c9850ceae6db/request.json @@ -0,0 +1,159 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "ReportsTo_0812": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "BirthDate_6438": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_1521": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_4335": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_4038": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_5135": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_0669": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7888": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "PostalCode_2120": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "LastName_2870": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Title_0620": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2126a6f71f795044/expected.json b/test-snapshots/query/2126a6f71f795044/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/2126a6f71f795044/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2126a6f71f795044/request.json b/test-snapshots/query/2126a6f71f795044/request.json new file mode 100644 index 0000000..4664110 --- /dev/null +++ b/test-snapshots/query/2126a6f71f795044/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6599424 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/212a8714862f33f4/expected.json b/test-snapshots/query/212a8714862f33f4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/212a8714862f33f4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/212a8714862f33f4/request.json b/test-snapshots/query/212a8714862f33f4/request.json new file mode 100644 index 0000000..3fc3adc --- /dev/null +++ b/test-snapshots/query/212a8714862f33f4/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/212ce019ce1f5996/expected.json b/test-snapshots/query/212ce019ce1f5996/expected.json new file mode 100644 index 0000000..b50090b --- /dev/null +++ b/test-snapshots/query/212ce019ce1f5996/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/212ce019ce1f5996/request.json b/test-snapshots/query/212ce019ce1f5996/request.json new file mode 100644 index 0000000..9d58ed9 --- /dev/null +++ b/test-snapshots/query/212ce019ce1f5996/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2132d940a689f503/expected.json b/test-snapshots/query/2132d940a689f503/expected.json new file mode 100644 index 0000000..ec43e9a --- /dev/null +++ b/test-snapshots/query/2132d940a689f503/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2010-06-12", + "InvoiceId_3408": 119, + "Total_4427": 1.98 + }, + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2010-09-14", + "InvoiceId_3408": 142, + "Total_4427": 3.96 + }, + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2010-12-17", + "InvoiceId_3408": 164, + "Total_4427": 5.94 + }, + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2011-08-07", + "InvoiceId_3408": 216, + "Total_4427": 0.99 + }, + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2013-01-28", + "InvoiceId_3408": 337, + "Total_4427": 1.98 + }, + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2013-03-10", + "InvoiceId_3408": 348, + "Total_4427": 13.86 + }, + { + "BillingCountry_9412": "Argentina", + "BillingPostalCode_2174": "1106", + "BillingState_6958": null, + "InvoiceDate_6240": "2013-11-08", + "InvoiceId_3408": 403, + "Total_4427": 8.91 + }, + { + "BillingCountry_9412": "Austria", + "BillingPostalCode_2174": "1010", + "BillingState_6958": null, + "InvoiceDate_6240": "2009-12-08", + "InvoiceId_3408": 78, + "Total_4427": 1.98 + }, + { + "BillingCountry_9412": "Austria", + "BillingPostalCode_2174": "1010", + "BillingState_6958": null, + "InvoiceDate_6240": "2010-01-18", + "InvoiceId_3408": 89, + "Total_4427": 18.86 + }, + { + "BillingCountry_9412": "Austria", + "BillingPostalCode_2174": "1010", + "BillingState_6958": null, + "InvoiceDate_6240": "2010-09-18", + "InvoiceId_3408": 144, + "Total_4427": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2132d940a689f503/request.json b/test-snapshots/query/2132d940a689f503/request.json new file mode 100644 index 0000000..0d16858 --- /dev/null +++ b/test-snapshots/query/2132d940a689f503/request.json @@ -0,0 +1,52 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceId_3408": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_4427": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCountry_9412": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_2174": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_6958": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "InvoiceDate_6240": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/213cecbbd9151dac/expected.json b/test-snapshots/query/213cecbbd9151dac/expected.json new file mode 100644 index 0000000..393dce9 --- /dev/null +++ b/test-snapshots/query/213cecbbd9151dac/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_0542": 1 + }, + { + "ArtistId_0542": 2 + }, + { + "ArtistId_0542": 3 + }, + { + "ArtistId_0542": 4 + }, + { + "ArtistId_0542": 5 + }, + { + "ArtistId_0542": 6 + }, + { + "ArtistId_0542": 7 + }, + { + "ArtistId_0542": 8 + }, + { + "ArtistId_0542": 9 + }, + { + "ArtistId_0542": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/213cecbbd9151dac/request.json b/test-snapshots/query/213cecbbd9151dac/request.json new file mode 100644 index 0000000..3655b71 --- /dev/null +++ b/test-snapshots/query/213cecbbd9151dac/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_0542": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/21472bb9059af2cf/expected.json b/test-snapshots/query/21472bb9059af2cf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/21472bb9059af2cf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/21472bb9059af2cf/request.json b/test-snapshots/query/21472bb9059af2cf/request.json new file mode 100644 index 0000000..27c5c20 --- /dev/null +++ b/test-snapshots/query/21472bb9059af2cf/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "WA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2148c018352ad2d5/expected.json b/test-snapshots/query/2148c018352ad2d5/expected.json new file mode 100644 index 0000000..f297c0f --- /dev/null +++ b/test-snapshots/query/2148c018352ad2d5/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 7, + "Name": "Latin" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2148c018352ad2d5/request.json b/test-snapshots/query/2148c018352ad2d5/request.json new file mode 100644 index 0000000..931a66b --- /dev/null +++ b/test-snapshots/query/2148c018352ad2d5/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2158d9b52ce0f21a/expected.json b/test-snapshots/query/2158d9b52ce0f21a/expected.json new file mode 100644 index 0000000..61b5d80 --- /dev/null +++ b/test-snapshots/query/2158d9b52ce0f21a/expected.json @@ -0,0 +1,409 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_1499": "1 Infinite Loop", + "Fax_0715": "+1 (408) 996-1011", + "FirstName_0657": "Tim", + "PostalCode_1984": "95014", + "State_2620": "CA", + "SupportRepId_2659": 3 + }, + { + "Address_1499": "113 Lupus St", + "Fax_0715": null, + "FirstName_0657": "Phil", + "PostalCode_1984": "SW1V 3EN", + "State_2620": null, + "SupportRepId_2659": 3 + }, + { + "Address_1499": "12,Community Centre", + "Fax_0715": null, + "FirstName_0657": "Manoj", + "PostalCode_1984": "110017", + "State_2620": null, + "SupportRepId_2659": 3 + }, + { + "Address_1499": "1498 rue Bélanger", + "Fax_0715": null, + "FirstName_0657": "François", + "PostalCode_1984": "H2G 1A7", + "State_2620": "QC", + "SupportRepId_2659": 3 + }, + { + "Address_1499": "162 E Superior Street", + "Fax_0715": null, + "FirstName_0657": "Frank", + "PostalCode_1984": "60611", + "State_2620": "IL", + "SupportRepId_2659": 3 + }, + { + "Address_1499": "202 Hoxton Street", + "Fax_0715": null, + "FirstName_0657": "Emma", + "PostalCode_1984": "N1 5LH", + "State_2620": null, + "SupportRepId_2659": 3 + }, + { + "Address_1499": "230 Elgin Street", + "Fax_0715": null, + "FirstName_0657": "Edward", + "PostalCode_1984": "K2P 1L7", + "State_2620": "ON", + "SupportRepId_2659": 3 + }, + { + "Address_1499": "3 Chatham Street", + "Fax_0715": null, + "FirstName_0657": "Hugh", + "PostalCode_1984": null, + "State_2620": "Dublin", + "SupportRepId_2659": 3 + }, + { + "Address_1499": "3,Raj Bhavan Road", + "Fax_0715": null, + "FirstName_0657": "Puja", + "PostalCode_1984": "560001", + "State_2620": null, + "SupportRepId_2659": 3 + }, + { + "Address_1499": "5112 48 Street", + "Fax_0715": null, + "FirstName_0657": "Ellie", + "PostalCode_1984": "X1A 1N6", + "State_2620": "NT", + "SupportRepId_2659": 3 + } + ] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_1499": "1033 N Park Ave", + "Fax_0715": null, + "FirstName_0657": "Patrick", + "PostalCode_1984": "85719", + "State_2620": "AZ", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "120 S Orange Ave", + "Fax_0715": null, + "FirstName_0657": "Heather", + "PostalCode_1984": "32801", + "State_2620": "FL", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "1600 Amphitheatre Parkway", + "Fax_0715": "+1 (650) 253-0000", + "FirstName_0657": "Frank", + "PostalCode_1984": "94043-1351", + "State_2620": "CA", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "2211 W Berry Street", + "Fax_0715": null, + "FirstName_0657": "Richard", + "PostalCode_1984": "76110", + "State_2620": "TX", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "307 Macacha Güemes", + "Fax_0715": null, + "FirstName_0657": "Diego", + "PostalCode_1984": "1106", + "State_2620": null, + "SupportRepId_2659": 4 + }, + { + "Address_1499": "4, Rue Milton", + "Fax_0715": null, + "FirstName_0657": "Camille", + "PostalCode_1984": "75009", + "State_2620": null, + "SupportRepId_2659": 4 + }, + { + "Address_1499": "421 Bourke Street", + "Fax_0715": null, + "FirstName_0657": "Mark", + "PostalCode_1984": "2010", + "State_2620": "NSW", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "541 Del Medio Avenue", + "Fax_0715": null, + "FirstName_0657": "Dan", + "PostalCode_1984": "94040-111", + "State_2620": "CA", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "69 Salem Street", + "Fax_0715": null, + "FirstName_0657": "John", + "PostalCode_1984": "2113", + "State_2620": "MA", + "SupportRepId_2659": 4 + }, + { + "Address_1499": "696 Osborne Street", + "Fax_0715": null, + "FirstName_0657": "Aaron", + "PostalCode_1984": "R3L 2B9", + "State_2620": "MB", + "SupportRepId_2659": 4 + } + ] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_1499": "1 Microsoft Way", + "Fax_0715": "+1 (425) 882-8081", + "FirstName_0657": "Jack", + "PostalCode_1984": "98052-8300", + "State_2620": "WA", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "11, Place Bellecour", + "Fax_0715": null, + "FirstName_0657": "Marc", + "PostalCode_1984": "69002", + "State_2620": null, + "SupportRepId_2659": 5 + }, + { + "Address_1499": "110 Raeburn Pl", + "Fax_0715": null, + "FirstName_0657": "Steve", + "PostalCode_1984": "EH4 1HH", + "State_2620": null, + "SupportRepId_2659": 5 + }, + { + "Address_1499": "194A Chain Lake Drive", + "Fax_0715": null, + "FirstName_0657": "Martha", + "PostalCode_1984": "B3S 1C5", + "State_2620": "NS", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "302 S 700 E", + "Fax_0715": null, + "FirstName_0657": "Julia", + "PostalCode_1984": "84102", + "State_2620": "UT", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "319 N. Frances Street", + "Fax_0715": null, + "FirstName_0657": "Victor", + "PostalCode_1984": "53703", + "State_2620": "WI", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "801 W 4th Street", + "Fax_0715": null, + "FirstName_0657": "Kathy", + "PostalCode_1984": "89503", + "State_2620": "NV", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "8210 111 ST NW", + "Fax_0715": "+1 (780) 434-5565", + "FirstName_0657": "Mark", + "PostalCode_1984": "T6G 2C7", + "State_2620": "AB", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "Av. Paulista, 2022", + "Fax_0715": "+55 (11) 3055-8131", + "FirstName_0657": "Alexandre", + "PostalCode_1984": "01310-200", + "State_2620": "SP", + "SupportRepId_2659": 5 + }, + { + "Address_1499": "C/ San Bernardo 85", + "Fax_0715": null, + "FirstName_0657": "Enrique", + "PostalCode_1984": "28015", + "State_2620": null, + "SupportRepId_2659": 5 + } + ] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2158d9b52ce0f21a/request.json b/test-snapshots/query/2158d9b52ce0f21a/request.json new file mode 100644 index 0000000..97e7230 --- /dev/null +++ b/test-snapshots/query/2158d9b52ce0f21a/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address_1499": { + "type": "column", + "column": "Address", + "fields": null + }, + "SupportRepId_2659": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "PostalCode_1984": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_2620": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_0715": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_0657": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/216ab8f6c03ed3e8/expected.json b/test-snapshots/query/216ab8f6c03ed3e8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/216ab8f6c03ed3e8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/216ab8f6c03ed3e8/request.json b/test-snapshots/query/216ab8f6c03ed3e8/request.json new file mode 100644 index 0000000..73406c6 --- /dev/null +++ b/test-snapshots/query/216ab8f6c03ed3e8/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2197f8fe7642fe94/expected.json b/test-snapshots/query/2197f8fe7642fe94/expected.json new file mode 100644 index 0000000..e6a99ff --- /dev/null +++ b/test-snapshots/query/2197f8fe7642fe94/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 579 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 1729 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 581 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 582 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 3 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 1155 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 4 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 6 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 5 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceLineId_6535": 1156 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2197f8fe7642fe94/request.json b/test-snapshots/query/2197f8fe7642fe94/request.json new file mode 100644 index 0000000..3ae920c --- /dev/null +++ b/test-snapshots/query/2197f8fe7642fe94/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceLineId_6535": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/21b7b8745059241b/expected.json b/test-snapshots/query/21b7b8745059241b/expected.json new file mode 100644 index 0000000..7f8137d --- /dev/null +++ b/test-snapshots/query/21b7b8745059241b/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2009-03-04", + "InvoiceId_7800": 15, + "Total_7705": 1.98 + }, + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2009-04-14", + "InvoiceId_7800": 26, + "Total_7705": 13.86 + }, + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2009-12-13", + "InvoiceId_7800": 81, + "Total_7705": 8.91 + }, + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2011-07-20", + "InvoiceId_7800": 210, + "Total_7705": 1.98 + }, + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2011-10-22", + "InvoiceId_7800": 233, + "Total_7705": 3.96 + }, + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2012-01-24", + "InvoiceId_7800": 255, + "Total_7705": 5.94 + }, + { + "BillingAddress_8532": "1 Infinite Loop", + "BillingCity_3292": "Cupertino", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "95014", + "BillingState_8177": "CA", + "CustomerId_0517": 19, + "InvoiceDate_0779": "2012-09-13", + "InvoiceId_7800": 307, + "Total_7705": 1.99 + }, + { + "BillingAddress_8532": "1 Microsoft Way", + "BillingCity_3292": "Redmond", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "98052-8300", + "BillingState_8177": "WA", + "CustomerId_0517": 17, + "InvoiceDate_0779": "2009-03-04", + "InvoiceId_7800": 14, + "Total_7705": 1.98 + }, + { + "BillingAddress_8532": "1 Microsoft Way", + "BillingCity_3292": "Redmond", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "98052-8300", + "BillingState_8177": "WA", + "CustomerId_0517": 17, + "InvoiceDate_0779": "2009-06-06", + "InvoiceId_7800": 37, + "Total_7705": 3.96 + }, + { + "BillingAddress_8532": "1 Microsoft Way", + "BillingCity_3292": "Redmond", + "BillingCountry_3360": "USA", + "BillingPostalCode_9814": "98052-8300", + "BillingState_8177": "WA", + "CustomerId_0517": 17, + "InvoiceDate_0779": "2009-09-08", + "InvoiceId_7800": 59, + "Total_7705": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/21b7b8745059241b/request.json b/test-snapshots/query/21b7b8745059241b/request.json new file mode 100644 index 0000000..d8ba3fd --- /dev/null +++ b/test-snapshots/query/21b7b8745059241b/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_8532": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_3292": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_3360": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_9814": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_8177": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_0517": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_0779": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_7800": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_7705": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/21c07a2118dfedc5/expected.json b/test-snapshots/query/21c07a2118dfedc5/expected.json new file mode 100644 index 0000000..497d95a --- /dev/null +++ b/test-snapshots/query/21c07a2118dfedc5/expected.json @@ -0,0 +1,273 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 15 + }, + { + "InvoiceId_6417": 15 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 210 + }, + { + "InvoiceId_6417": 210 + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 233 + }, + { + "InvoiceId_6417": 233 + }, + { + "InvoiceId_6417": 233 + }, + { + "InvoiceId_6417": 233 + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 255 + }, + { + "InvoiceId_6417": 255 + }, + { + "InvoiceId_6417": 255 + }, + { + "InvoiceId_6417": 255 + }, + { + "InvoiceId_6417": 255 + }, + { + "InvoiceId_6417": 255 + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + }, + { + "InvoiceId_6417": 26 + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 307 + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + }, + { + "InvoiceId_6417": 81 + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 111 + } + ] + }, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 14 + }, + { + "InvoiceId_6417": 14 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_6417": 232 + }, + { + "InvoiceId_6417": 232 + } + ] + }, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/21c07a2118dfedc5/request.json b/test-snapshots/query/21c07a2118dfedc5/request.json new file mode 100644 index 0000000..ea7fb20 --- /dev/null +++ b/test-snapshots/query/21c07a2118dfedc5/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId_6417": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/21d8361d290007ba/expected.json b/test-snapshots/query/21d8361d290007ba/expected.json new file mode 100644 index 0000000..31570da --- /dev/null +++ b/test-snapshots/query/21d8361d290007ba/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 7494639, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 229198, + "Name": "Virginia Moon", + "TrackId": 1006, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/21d8361d290007ba/request.json b/test-snapshots/query/21d8361d290007ba/request.json new file mode 100644 index 0000000..c3c4e3a --- /dev/null +++ b/test-snapshots/query/21d8361d290007ba/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/21e5ded24c257609/expected.json b/test-snapshots/query/21e5ded24c257609/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/21e5ded24c257609/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/21e5ded24c257609/request.json b/test-snapshots/query/21e5ded24c257609/request.json new file mode 100644 index 0000000..e1441e1 --- /dev/null +++ b/test-snapshots/query/21e5ded24c257609/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-01-02" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2215527f4ebc895c/expected.json b/test-snapshots/query/2215527f4ebc895c/expected.json new file mode 100644 index 0000000..8011d37 --- /dev/null +++ b/test-snapshots/query/2215527f4ebc895c/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2215527f4ebc895c/request.json b/test-snapshots/query/2215527f4ebc895c/request.json new file mode 100644 index 0000000..70f9e57 --- /dev/null +++ b/test-snapshots/query/2215527f4ebc895c/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/22579d637eebd8df/expected.json b/test-snapshots/query/22579d637eebd8df/expected.json new file mode 100644 index 0000000..ac8b7fe --- /dev/null +++ b/test-snapshots/query/22579d637eebd8df/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_0838": 412, + "InvoiceLineId_3831": 2240, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2200, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2199, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2198, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2197, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2196, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2195, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2194, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2193, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + }, + { + "InvoiceId_0838": 404, + "InvoiceLineId_3831": 2192, + "Quantity_9442": 1, + "UnitPrice_1541": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22579d637eebd8df/request.json b/test-snapshots/query/22579d637eebd8df/request.json new file mode 100644 index 0000000..b1ed629 --- /dev/null +++ b/test-snapshots/query/22579d637eebd8df/request.json @@ -0,0 +1,58 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_0838": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_3831": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_9442": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "UnitPrice_1541": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/227656631244a43b/expected.json b/test-snapshots/query/227656631244a43b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/227656631244a43b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/227656631244a43b/request.json b/test-snapshots/query/227656631244a43b/request.json new file mode 100644 index 0000000..1355165 --- /dev/null +++ b/test-snapshots/query/227656631244a43b/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+33 04 78 30 30 30" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "United Kingdom" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Orlando" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2279664f1be2fc3f/expected.json b/test-snapshots/query/2279664f1be2fc3f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2279664f1be2fc3f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2279664f1be2fc3f/request.json b/test-snapshots/query/2279664f1be2fc3f/request.json new file mode 100644 index 0000000..2c0d28d --- /dev/null +++ b/test-snapshots/query/2279664f1be2fc3f/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/228ec09312700d6c/expected.json b/test-snapshots/query/228ec09312700d6c/expected.json new file mode 100644 index 0000000..724a537 --- /dev/null +++ b/test-snapshots/query/228ec09312700d6c/expected.json @@ -0,0 +1,226 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-03-04", + "InvoiceId_6842": 15, + "Total_8015": 1.98 + } + ] + }, + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-03-04", + "InvoiceId_6842": 15, + "Total_8015": 1.98 + } + ] + }, + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_5063": "1 Infinite Loop", + "BillingCity_0655": "Cupertino", + "BillingCountry_7211": "USA", + "BillingPostalCode_6454": "95014", + "BillingState_8198": "CA", + "CustomerId_5429": 19, + "InvoiceDate_4274": "2009-04-14", + "InvoiceId_6842": 26, + "Total_8015": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/228ec09312700d6c/request.json b/test-snapshots/query/228ec09312700d6c/request.json new file mode 100644 index 0000000..c13ec7e --- /dev/null +++ b/test-snapshots/query/228ec09312700d6c/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress_5063": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_0655": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_7211": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_6454": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_8198": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_5429": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_4274": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_6842": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_8015": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/22aab179fd4054a0/expected.json b/test-snapshots/query/22aab179fd4054a0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/22aab179fd4054a0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22aab179fd4054a0/request.json b/test-snapshots/query/22aab179fd4054a0/request.json new file mode 100644 index 0000000..fcf7ede --- /dev/null +++ b/test-snapshots/query/22aab179fd4054a0/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 248 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 49 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/22aad1707a17749f/expected.json b/test-snapshots/query/22aad1707a17749f/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/22aad1707a17749f/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22aad1707a17749f/request.json b/test-snapshots/query/22aad1707a17749f/request.json new file mode 100644 index 0000000..312a8d1 --- /dev/null +++ b/test-snapshots/query/22aad1707a17749f/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 252 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/22c43b95acb60301/expected.json b/test-snapshots/query/22c43b95acb60301/expected.json new file mode 100644 index 0000000..0f7701c --- /dev/null +++ b/test-snapshots/query/22c43b95acb60301/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "InvoiceLineId_5322": 77 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "InvoiceLineId_5322": 78 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 136 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 137 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 138 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 139 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 140 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 141 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 142 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_5322": 143 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22c43b95acb60301/request.json b/test-snapshots/query/22c43b95acb60301/request.json new file mode 100644 index 0000000..3d89663 --- /dev/null +++ b/test-snapshots/query/22c43b95acb60301/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceLineId_5322": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/22d01d5033de9da9/expected.json b/test-snapshots/query/22d01d5033de9da9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/22d01d5033de9da9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22d01d5033de9da9/request.json b/test-snapshots/query/22d01d5033de9da9/request.json new file mode 100644 index 0000000..fb24ec0 --- /dev/null +++ b/test-snapshots/query/22d01d5033de9da9/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1973-07-01" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/22d2f4040b5d3a56/expected.json b/test-snapshots/query/22d2f4040b5d3a56/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/22d2f4040b5d3a56/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22d2f4040b5d3a56/request.json b/test-snapshots/query/22d2f4040b5d3a56/request.json new file mode 100644 index 0000000..52a5afd --- /dev/null +++ b/test-snapshots/query/22d2f4040b5d3a56/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 264 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/22d694bad0e89b9a/expected.json b/test-snapshots/query/22d694bad0e89b9a/expected.json new file mode 100644 index 0000000..cd6e491 --- /dev/null +++ b/test-snapshots/query/22d694bad0e89b9a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_5514": "TV Shows" + }, + { + "Name_5514": "TV Shows" + }, + { + "Name_5514": "On-The-Go 1" + }, + { + "Name_5514": "Music Videos" + }, + { + "Name_5514": "Music" + }, + { + "Name_5514": "Music" + }, + { + "Name_5514": "Movies" + }, + { + "Name_5514": "Movies" + }, + { + "Name_5514": "Heavy Metal Classic" + }, + { + "Name_5514": "Grunge" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22d694bad0e89b9a/request.json b/test-snapshots/query/22d694bad0e89b9a/request.json new file mode 100644 index 0000000..3a36c64 --- /dev/null +++ b/test-snapshots/query/22d694bad0e89b9a/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_5514": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/22dadb24d7d6a684/expected.json b/test-snapshots/query/22dadb24d7d6a684/expected.json new file mode 100644 index 0000000..5979696 --- /dev/null +++ b/test-snapshots/query/22dadb24d7d6a684/expected.json @@ -0,0 +1,118 @@ +[ + { + "rows": [ + { + "Address_5341": "590 Columbia Boulevard West", + "BirthDate_7234": "1970-05-29", + "Email_9304": "robert@chinookcorp.com", + "Fax_4760": "+1 (403) 456-8485", + "FirstName_2325": "Robert", + "HireDate_0686": "2004-01-02", + "LastName_0685": "King", + "Phone_7289": "+1 (403) 456-9986", + "PostalCode_0518": "T1K 5N8", + "ReportsTo_8508": 6, + "State_1363": "AB", + "Title_9137": "IT Staff" + }, + { + "Address_5341": "923 7 ST NW", + "BirthDate_7234": "1968-01-09", + "Email_9304": "laura@chinookcorp.com", + "Fax_4760": "+1 (403) 467-8772", + "FirstName_2325": "Laura", + "HireDate_0686": "2004-03-04", + "LastName_0685": "Callahan", + "Phone_7289": "+1 (403) 467-3351", + "PostalCode_0518": "T1H 1Y8", + "ReportsTo_8508": 6, + "State_1363": "AB", + "Title_9137": "IT Staff" + }, + { + "Address_5341": "1111 6 Ave SW", + "BirthDate_7234": "1973-08-29", + "Email_9304": "jane@chinookcorp.com", + "Fax_4760": "+1 (403) 262-6712", + "FirstName_2325": "Jane", + "HireDate_0686": "2002-04-01", + "LastName_0685": "Peacock", + "Phone_7289": "+1 (403) 262-3443", + "PostalCode_0518": "T2P 5M5", + "ReportsTo_8508": 2, + "State_1363": "AB", + "Title_9137": "Sales Support Agent" + }, + { + "Address_5341": "683 10 Street SW", + "BirthDate_7234": "1947-09-19", + "Email_9304": "margaret@chinookcorp.com", + "Fax_4760": "+1 (403) 263-4289", + "FirstName_2325": "Margaret", + "HireDate_0686": "2003-05-03", + "LastName_0685": "Park", + "Phone_7289": "+1 (403) 263-4423", + "PostalCode_0518": "T2P 5G3", + "ReportsTo_8508": 2, + "State_1363": "AB", + "Title_9137": "Sales Support Agent" + }, + { + "Address_5341": "7727B 41 Ave", + "BirthDate_7234": "1965-03-03", + "Email_9304": "steve@chinookcorp.com", + "Fax_4760": "1 (780) 836-9543", + "FirstName_2325": "Steve", + "HireDate_0686": "2003-10-17", + "LastName_0685": "Johnson", + "Phone_7289": "1 (780) 836-9987", + "PostalCode_0518": "T3B 1Y7", + "ReportsTo_8508": 2, + "State_1363": "AB", + "Title_9137": "Sales Support Agent" + }, + { + "Address_5341": "5827 Bowness Road NW", + "BirthDate_7234": "1973-07-01", + "Email_9304": "michael@chinookcorp.com", + "Fax_4760": "+1 (403) 246-9899", + "FirstName_2325": "Michael", + "HireDate_0686": "2003-10-17", + "LastName_0685": "Mitchell", + "Phone_7289": "+1 (403) 246-9887", + "PostalCode_0518": "T3B 0C5", + "ReportsTo_8508": 1, + "State_1363": "AB", + "Title_9137": "IT Manager" + }, + { + "Address_5341": "825 8 Ave SW", + "BirthDate_7234": "1958-12-08", + "Email_9304": "nancy@chinookcorp.com", + "Fax_4760": "+1 (403) 262-3322", + "FirstName_2325": "Nancy", + "HireDate_0686": "2002-05-01", + "LastName_0685": "Edwards", + "Phone_7289": "+1 (403) 262-3443", + "PostalCode_0518": "T2P 2T3", + "ReportsTo_8508": 1, + "State_1363": "AB", + "Title_9137": "Sales Manager" + }, + { + "Address_5341": "11120 Jasper Ave NW", + "BirthDate_7234": "1962-02-18", + "Email_9304": "andrew@chinookcorp.com", + "Fax_4760": "+1 (780) 428-3457", + "FirstName_2325": "Andrew", + "HireDate_0686": "2002-08-14", + "LastName_0685": "Adams", + "Phone_7289": "+1 (780) 428-9482", + "PostalCode_0518": "T5K 2N1", + "ReportsTo_8508": null, + "State_1363": "AB", + "Title_9137": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22dadb24d7d6a684/request.json b/test-snapshots/query/22dadb24d7d6a684/request.json new file mode 100644 index 0000000..0615c23 --- /dev/null +++ b/test-snapshots/query/22dadb24d7d6a684/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_5341": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_7234": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "Title_9137": { + "type": "column", + "column": "Title", + "fields": null + }, + "ReportsTo_8508": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Email_9304": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_1363": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_4760": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_2325": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_0686": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_0685": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_7289": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_0518": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/22ebc2f934b29ba8/expected.json b/test-snapshots/query/22ebc2f934b29ba8/expected.json new file mode 100644 index 0000000..df17bf1 --- /dev/null +++ b/test-snapshots/query/22ebc2f934b29ba8/expected.json @@ -0,0 +1,1142 @@ +[ + { + "rows": [ + { + "AlbumId_1850": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "For Those About To Rock We Salute You" + }, + { + "AlbumId_1850": 10, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5339931, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 222380, + "Name": "Cochise", + "TrackId": 85, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5988186, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 249391, + "Name": "What You Are", + "TrackId": 88, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6321091, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263262, + "Name": "Set It Off", + "TrackId": 90, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6672176, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 277890, + "Name": "Show Me How to Live", + "TrackId": 86, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6709793, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 279457, + "Name": "Gasoline", + "TrackId": 87, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7059624, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294034, + "Name": "Like a Stone", + "TrackId": 89, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7193162, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 299598, + "Name": "Getaway Car", + "TrackId": 97, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7289084, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 303595, + "Name": "Light My Way", + "TrackId": 96, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Audioslave" + }, + { + "AlbumId_1850": 100, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Iron Maiden" + }, + { + "AlbumId_1850": 101, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Killers" + }, + { + "AlbumId_1850": 102, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10589917, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 441155, + "Name": "Phantom Of The Opera", + "TrackId": 1304, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 1154488, + "Composer": null, + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 48013, + "Name": "Intro- Churchill S Speech", + "TrackId": 1287, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4410181, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 183666, + "Name": "Wrathchild", + "TrackId": 1300, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Live After Death" + }, + { + "AlbumId_1850": 103, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId_1850": 104, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 104, + "Bytes": 10577743, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 440555, + "Name": "Heaven Can Wait", + "TrackId": 1317, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 10751410, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 447791, + "Name": "Hallowed Be Thy Name", + "TrackId": 1321, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11380851, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 474017, + "Name": "Running Free", + "TrackId": 1324, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11874875, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 494602, + "Name": "Iron Maiden", + "TrackId": 1320, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5588560, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 232672, + "Name": "The Trooper", + "TrackId": 1322, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5665052, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 235859, + "Name": "Run To The Hills", + "TrackId": 1318, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 6302648, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 262426, + "Name": "The Clairvoyant", + "TrackId": 1316, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 7648679, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 318511, + "Name": "Sanctuary", + "TrackId": 1323, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 8122030, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 338233, + "Name": "2 Minutes To Midnight", + "TrackId": 1319, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 9045532, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 376711, + "Name": "Bring Your Daughter... To The Slaughter...", + "TrackId": 1315, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId_1850": 105, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 105, + "Bytes": 3672064, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229459, + "Name": "Holy Smoke", + "TrackId": 1326, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 3960832, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 247510, + "Name": "Hooks In You", + "TrackId": 1332, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4018088, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 250853, + "Name": "Fates Warning", + "TrackId": 1329, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4071587, + "Composer": "Bruce Dickinson/David Murray", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 254197, + "Name": "Public Enema Number One", + "TrackId": 1328, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4089856, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 255582, + "Name": "Tailgunner", + "TrackId": 1325, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4141056, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 258768, + "Name": "The Assassin", + "TrackId": 1330, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4225024, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 263941, + "Name": "No Prayer For The Dying", + "TrackId": 1327, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4407296, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275408, + "Name": "Run Silent Run Deep", + "TrackId": 1331, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4548608, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 284238, + "Name": "Bring Your Daughter... ...To The Slaughter", + "TrackId": 1333, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 5322752, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 332617, + "Name": "Mother Russia", + "TrackId": 1334, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "No Prayer For The Dying" + }, + { + "AlbumId_1850": 106, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 106, + "Bytes": 3306324, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 206367, + "Name": "Sun And Steel", + "TrackId": 1342, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3543040, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 221309, + "Name": "Quest For Fire", + "TrackId": 1341, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3686400, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 230269, + "Name": "Flight Of The Icarus", + "TrackId": 1337, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4024320, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 251454, + "Name": "The Trooper", + "TrackId": 1339, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4710400, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 294347, + "Name": "Still Life", + "TrackId": 1340, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5212160, + "Composer": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 325694, + "Name": "Die With Your Boots On", + "TrackId": 1338, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5914624, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 369554, + "Name": "Where Eagles Dare", + "TrackId": 1335, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 6539264, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 408607, + "Name": "Revelations", + "TrackId": 1336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 7129264, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 445283, + "Name": "To Tame A Land", + "TrackId": 1343, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Piece Of Mind" + }, + { + "AlbumId_1850": 107, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + }, + "Title_6119": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/22ebc2f934b29ba8/request.json b/test-snapshots/query/22ebc2f934b29ba8/request.json new file mode 100644 index 0000000..ada3d41 --- /dev/null +++ b/test-snapshots/query/22ebc2f934b29ba8/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_1850": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_6119": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/230bacf352504041/expected.json b/test-snapshots/query/230bacf352504041/expected.json new file mode 100644 index 0000000..bc58536 --- /dev/null +++ b/test-snapshots/query/230bacf352504041/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/230bacf352504041/request.json b/test-snapshots/query/230bacf352504041/request.json new file mode 100644 index 0000000..5258ac4 --- /dev/null +++ b/test-snapshots/query/230bacf352504041/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/231690e8579f8441/expected.json b/test-snapshots/query/231690e8579f8441/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/231690e8579f8441/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/231690e8579f8441/request.json b/test-snapshots/query/231690e8579f8441/request.json new file mode 100644 index 0000000..2230217 --- /dev/null +++ b/test-snapshots/query/231690e8579f8441/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "phil.hughes@gmail.com" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2339254aff291716/expected.json b/test-snapshots/query/2339254aff291716/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2339254aff291716/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2339254aff291716/request.json b/test-snapshots/query/2339254aff291716/request.json new file mode 100644 index 0000000..ec3c02e --- /dev/null +++ b/test-snapshots/query/2339254aff291716/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2362b0a5e7ee2e95/expected.json b/test-snapshots/query/2362b0a5e7ee2e95/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2362b0a5e7ee2e95/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2362b0a5e7ee2e95/request.json b/test-snapshots/query/2362b0a5e7ee2e95/request.json new file mode 100644 index 0000000..c69b048 --- /dev/null +++ b/test-snapshots/query/2362b0a5e7ee2e95/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marisa Monte" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/238d87d600154e6e/expected.json b/test-snapshots/query/238d87d600154e6e/expected.json new file mode 100644 index 0000000..9b46bea --- /dev/null +++ b/test-snapshots/query/238d87d600154e6e/expected.json @@ -0,0 +1,1186 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 1, + "Name_1533": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + }, + { + "AlbumId": 20, + "Bytes": 14184984, + "Composer": "Buddy Guy", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 433397, + "Name": "Stone Crazy", + "TrackId": 196, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 6, + "Name_1533": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 13, + "Name_1533": "Heavy Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6455255, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 268878, + "Name": "The Trooper", + "TrackId": 1290, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6605094, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275121, + "Name": "The Number Of The Beast", + "TrackId": 1295, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 8799380, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366550, + "Name": "2 Minutes To Midnight", + "TrackId": 1289, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 3, + "Name_1533": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 11, + "Bytes": 10029406, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 309786, + "Name": "The Curse", + "TrackId": 110, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7542942, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233195, + "Name": "Man Or Animal", + "TrackId": 106, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7609178, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233691, + "Name": "Drown Me Slowly", + "TrackId": 103, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7710800, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 237714, + "Name": "The Worm", + "TrackId": 105, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8273592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255529, + "Name": "Your Time Has Come", + "TrackId": 99, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8357387, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255869, + "Name": "Doesn't Remind Me", + "TrackId": 102, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8944205, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 273763, + "Name": "Yesterday To Tomorrow", + "TrackId": 107, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9003592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 278125, + "Name": "Dandelion", + "TrackId": 108, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9006158, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 276688, + "Name": "Heaven's Dead", + "TrackId": 104, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9106160, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 279484, + "Name": "Be Yourself", + "TrackId": 101, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 4, + "Name_1533": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 115, + "Bytes": 10498031, + "Composer": "Bobby Byrd/James Brown/Ron Lenhoff", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 316551, + "Name": "Get Up (I Feel Like Being A) Sex Machine", + "TrackId": 1423, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 11183457, + "Composer": "Full Force/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 334236, + "Name": "I'm Real", + "TrackId": 1431, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4174420, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 127399, + "Name": "Papa's Got A Brand New Bag Pt.1", + "TrackId": 1418, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4711323, + "Composer": "Ted Wright", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 143725, + "Name": "Out Of Sight", + "TrackId": 1417, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5394585, + "Composer": "James Brown/Johnny Terry", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 165067, + "Name": "Please Please Please", + "TrackId": 1414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5468472, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "I Got You (I Feel Good)", + "TrackId": 1419, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5478117, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "Say It Loud, I'm Black And I'm Proud Pt.1", + "TrackId": 1422, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5513208, + "Composer": "Lowman Pauling", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 166739, + "Name": "Think", + "TrackId": 1415, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5541611, + "Composer": "Betty Newsome/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 168228, + "Name": "It's A Man's Man's Man's World", + "TrackId": 1420, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5643213, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 172408, + "Name": "Cold Sweat", + "TrackId": 1421, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 14, + "Name_1533": "R&B/Soul" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 118, + "Bytes": 10334529, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 309995, + "Name": "The Kids", + "TrackId": 1460, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 10843832, + "Composer": "Toby Smith/Wallis Buchanan", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 322455, + "Name": "Journey To Arnhemland", + "TrackId": 1463, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11043559, + "Composer": "Stuard Zender/Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 329534, + "Name": "Mr. Moon", + "TrackId": 1461, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11796244, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 354560, + "Name": "Light Years", + "TrackId": 1458, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12676962, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 382197, + "Name": "Manifest Destiny", + "TrackId": 1459, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12777210, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 384130, + "Name": "Morning Glory", + "TrackId": 1464, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12906520, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 385697, + "Name": "Space Cowboy", + "TrackId": 1465, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 14019705, + "Composer": "Stuart Zender", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 422321, + "Name": "Scam", + "TrackId": 1462, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 17582818, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 529684, + "Name": "Just Another Story", + "TrackId": 1455, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 8644290, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 257097, + "Name": "Stillness In Time", + "TrackId": 1456, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 15, + "Name_1533": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 12, + "Bytes": 1299960, + "Composer": "Ned Fairchild", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 107807, + "Name": "20 Flight Rock", + "TrackId": 122, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1704918, + "Composer": "Little Richard", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106266, + "Name": "Good Golly Miss Molly", + "TrackId": 121, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1707084, + "Composer": "Enotris Johnson/Little Richard/Robert \"Bumps\" Blackwell", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106396, + "Name": "Long Tall Sally", + "TrackId": 112, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1862126, + "Composer": "Larry Williams", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 116088, + "Name": "Bad Boy", + "TrackId": 113, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2206986, + "Composer": "Brian Holland/Freddie Gorman/Georgia Dobbins/Robert Bateman/William Garrett", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 137639, + "Name": "Please Mr. Postman", + "TrackId": 115, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2247846, + "Composer": "Eddie Cochran/Jerry Capehart", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 140199, + "Name": "C'Mon Everybody", + "TrackId": 116, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2276788, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 141923, + "Name": "Rock 'N' Roll Music", + "TrackId": 117, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2301989, + "Composer": "Bo Diddley", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143595, + "Name": "Roadrunner", + "TrackId": 119, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2306019, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143830, + "Name": "Carol", + "TrackId": 120, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2365897, + "Composer": "Berry Gordy, Jr./Janie Bradford", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 147591, + "Name": "Money", + "TrackId": 111, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 5, + "Name_1533": "Rock And Roll" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 122, + "Bytes": 10211473, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 310073, + "Name": "Engenho De Dentro", + "TrackId": 1506, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10599953, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 317100, + "Name": "W/Brasil (Chama O Síndico)", + "TrackId": 1510, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10724982, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 326321, + "Name": "Selassiê", + "TrackId": 1514, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10996656, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 338076, + "Name": "Que Maravilha", + "TrackId": 1516, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 11314756, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 343484, + "Name": "Salve Simpatia", + "TrackId": 1509, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12010478, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 355239, + "Name": "Alcohol", + "TrackId": 1507, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12304520, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 367281, + "Name": "Os Alquimistas Estão Chegando", + "TrackId": 1512, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12524725, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 380081, + "Name": "Santa Clara Clareou", + "TrackId": 1517, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 13022833, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 389276, + "Name": "Charles Anjo 45", + "TrackId": 1513, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 14946972, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 452519, + "Name": "País Tropical", + "TrackId": 1511, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 7, + "Name_1533": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 124, + "Bytes": 3948371, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 118804, + "Name": "Cuando Eu For Pro Ceu", + "TrackId": 1541, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6031174, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 180924, + "Name": "Cafezinho", + "TrackId": 1544, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6056200, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 182308, + "Name": "No Futuro", + "TrackId": 1535, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6400532, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 190484, + "Name": "Choramingando", + "TrackId": 1533, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6774566, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 203415, + "Name": "Do Nosso Amor", + "TrackId": 1542, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7104588, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 208457, + "Name": "Borogodo", + "TrackId": 1543, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7248336, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 220891, + "Name": "Enquanto O Dia Não Vem", + "TrackId": 1545, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7257390, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 213263, + "Name": "Papelão", + "TrackId": 1540, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7764601, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 230582, + "Name": "Por Merecer", + "TrackId": 1534, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 8077282, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 241084, + "Name": "Voce Inteira", + "TrackId": 1536, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6155": 16, + "Name_1533": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/238d87d600154e6e/request.json b/test-snapshots/query/238d87d600154e6e/request.json new file mode 100644 index 0000000..466f5c8 --- /dev/null +++ b/test-snapshots/query/238d87d600154e6e/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_6155": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_1533": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/239703bfb68f6b73/expected.json b/test-snapshots/query/239703bfb68f6b73/expected.json new file mode 100644 index 0000000..d2a61df --- /dev/null +++ b/test-snapshots/query/239703bfb68f6b73/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1314, + "Quantity": 1, + "TrackId": 981, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1315, + "Quantity": 1, + "TrackId": 990, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1316, + "Quantity": 1, + "TrackId": 999, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1317, + "Quantity": 1, + "TrackId": 1008, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1318, + "Quantity": 1, + "TrackId": 1017, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/239703bfb68f6b73/request.json b/test-snapshots/query/239703bfb68f6b73/request.json new file mode 100644 index 0000000..b1994ac --- /dev/null +++ b/test-snapshots/query/239703bfb68f6b73/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2397c2d6bfa9e995/expected.json b/test-snapshots/query/2397c2d6bfa9e995/expected.json new file mode 100644 index 0000000..b43b129 --- /dev/null +++ b/test-snapshots/query/2397c2d6bfa9e995/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "Name": "Audiobooks", + "PlaylistId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2397c2d6bfa9e995/request.json b/test-snapshots/query/2397c2d6bfa9e995/request.json new file mode 100644 index 0000000..333d3ad --- /dev/null +++ b/test-snapshots/query/2397c2d6bfa9e995/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2450b788d7da0de2/expected.json b/test-snapshots/query/2450b788d7da0de2/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/2450b788d7da0de2/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2450b788d7da0de2/request.json b/test-snapshots/query/2450b788d7da0de2/request.json new file mode 100644 index 0000000..287a0a3 --- /dev/null +++ b/test-snapshots/query/2450b788d7da0de2/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/245fb8364a0b7e82/expected.json b/test-snapshots/query/245fb8364a0b7e82/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/245fb8364a0b7e82/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/245fb8364a0b7e82/request.json b/test-snapshots/query/245fb8364a0b7e82/request.json new file mode 100644 index 0000000..8131754 --- /dev/null +++ b/test-snapshots/query/245fb8364a0b7e82/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/246765eae2ad494c/expected.json b/test-snapshots/query/246765eae2ad494c/expected.json new file mode 100644 index 0000000..5216669 --- /dev/null +++ b/test-snapshots/query/246765eae2ad494c/expected.json @@ -0,0 +1,12 @@ +[ + { + "aggregates": { + "AlbumId_avg_9205": 174, + "AlbumId_max_6000": 347, + "ArtistId_avg_5315": 121.942363112, + "ArtistId_count_5058": 347, + "ArtistId_sum_9832": 42314, + "Title_min_3699": "...And Justice For All" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/246765eae2ad494c/request.json b/test-snapshots/query/246765eae2ad494c/request.json new file mode 100644 index 0000000..64e17ff --- /dev/null +++ b/test-snapshots/query/246765eae2ad494c/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "AlbumId_avg_9205": { + "type": "single_column", + "column": "AlbumId", + "function": "avg" + }, + "ArtistId_avg_5315": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + }, + "AlbumId_max_6000": { + "type": "single_column", + "column": "AlbumId", + "function": "max" + }, + "Title_min_3699": { + "type": "single_column", + "column": "Title", + "function": "min" + }, + "ArtistId_count_5058": { + "type": "single_column", + "column": "ArtistId", + "function": "count" + }, + "ArtistId_sum_9832": { + "type": "single_column", + "column": "ArtistId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/248c470f256b8533/expected.json b/test-snapshots/query/248c470f256b8533/expected.json new file mode 100644 index 0000000..b43b129 --- /dev/null +++ b/test-snapshots/query/248c470f256b8533/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "Name": "Audiobooks", + "PlaylistId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/248c470f256b8533/request.json b/test-snapshots/query/248c470f256b8533/request.json new file mode 100644 index 0000000..bb4719f --- /dev/null +++ b/test-snapshots/query/248c470f256b8533/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/24e1b35c5fae0089/expected.json b/test-snapshots/query/24e1b35c5fae0089/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/24e1b35c5fae0089/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/24e1b35c5fae0089/request.json b/test-snapshots/query/24e1b35c5fae0089/request.json new file mode 100644 index 0000000..916e83c --- /dev/null +++ b/test-snapshots/query/24e1b35c5fae0089/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Andrew" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2506b900d3a4dbde/expected.json b/test-snapshots/query/2506b900d3a4dbde/expected.json new file mode 100644 index 0000000..2d85721 --- /dev/null +++ b/test-snapshots/query/2506b900d3a4dbde/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2506b900d3a4dbde/request.json b/test-snapshots/query/2506b900d3a4dbde/request.json new file mode 100644 index 0000000..c67705c --- /dev/null +++ b/test-snapshots/query/2506b900d3a4dbde/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/255c6c7b8cf615c3/expected.json b/test-snapshots/query/255c6c7b8cf615c3/expected.json new file mode 100644 index 0000000..f34b1af --- /dev/null +++ b/test-snapshots/query/255c6c7b8cf615c3/expected.json @@ -0,0 +1,216 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 165, + "Quantity": 1, + "TrackId": 970, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 166, + "Quantity": 1, + "TrackId": 976, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 167, + "Quantity": 1, + "TrackId": 982, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 168, + "Quantity": 1, + "TrackId": 988, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 169, + "Quantity": 1, + "TrackId": 994, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 170, + "Quantity": 1, + "TrackId": 1000, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 171, + "Quantity": 1, + "TrackId": 1006, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 172, + "Quantity": 1, + "TrackId": 1012, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2009-05-10", + "InvoiceId_8592": 32, + "Total_0263": 8.91 + } + ] + }, + "InvoiceId": 32, + "InvoiceLineId": 173, + "Quantity": 1, + "TrackId": 1018, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingCity_8962": "Amsterdam", + "BillingCountry_2423": "Netherlands", + "BillingPostalCode_4465": "1016", + "BillingState_5548": "VV", + "CustomerId_2931": 48, + "InvoiceDate_5109": "2010-12-15", + "InvoiceId_8592": 161, + "Total_0263": 1.98 + } + ] + }, + "InvoiceId": 161, + "InvoiceLineId": 873, + "Quantity": 1, + "TrackId": 1832, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/255c6c7b8cf615c3/request.json b/test-snapshots/query/255c6c7b8cf615c3/request.json new file mode 100644 index 0000000..5c58e30 --- /dev/null +++ b/test-snapshots/query/255c6c7b8cf615c3/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "Total_0263": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCity_8962": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_2423": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_4465": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_5548": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_2931": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_5109": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_8592": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2564bda3925fc452/expected.json b/test-snapshots/query/2564bda3925fc452/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2564bda3925fc452/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2564bda3925fc452/request.json b/test-snapshots/query/2564bda3925fc452/request.json new file mode 100644 index 0000000..0d90aa0 --- /dev/null +++ b/test-snapshots/query/2564bda3925fc452/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Orlando" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/258b494e2cb2be8c/expected.json b/test-snapshots/query/258b494e2cb2be8c/expected.json new file mode 100644 index 0000000..78fdcaf --- /dev/null +++ b/test-snapshots/query/258b494e2cb2be8c/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_5099": 1, + "Name_9952": "Rock" + }, + { + "GenreId_5099": 2, + "Name_9952": "Jazz" + }, + { + "GenreId_5099": 3, + "Name_9952": "Metal" + }, + { + "GenreId_5099": 4, + "Name_9952": "Alternative & Punk" + }, + { + "GenreId_5099": 5, + "Name_9952": "Rock And Roll" + }, + { + "GenreId_5099": 6, + "Name_9952": "Blues" + }, + { + "GenreId_5099": 7, + "Name_9952": "Latin" + }, + { + "GenreId_5099": 8, + "Name_9952": "Reggae" + }, + { + "GenreId_5099": 9, + "Name_9952": "Pop" + }, + { + "GenreId_5099": 10, + "Name_9952": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/258b494e2cb2be8c/request.json b/test-snapshots/query/258b494e2cb2be8c/request.json new file mode 100644 index 0000000..3d89b91 --- /dev/null +++ b/test-snapshots/query/258b494e2cb2be8c/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_5099": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_9952": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/258c39aeff6cc8b2/expected.json b/test-snapshots/query/258c39aeff6cc8b2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/258c39aeff6cc8b2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/258c39aeff6cc8b2/request.json b/test-snapshots/query/258c39aeff6cc8b2/request.json new file mode 100644 index 0000000..01b8aa4 --- /dev/null +++ b/test-snapshots/query/258c39aeff6cc8b2/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8817038 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2596f2a92d7a26b1/expected.json b/test-snapshots/query/2596f2a92d7a26b1/expected.json new file mode 100644 index 0000000..3278124 --- /dev/null +++ b/test-snapshots/query/2596f2a92d7a26b1/expected.json @@ -0,0 +1,200 @@ +[ + { + "rows": [ + { + "AlbumId_9441": 1, + "Bytes_1807": 11170334, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 17, + "TrackId": 1 + }, + { + "PlaylistId": 8, + "TrackId": 1 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 343719 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 6566314, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 11 + }, + { + "PlaylistId": 8, + "TrackId": 11 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 199836 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 6599424, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 9 + }, + { + "PlaylistId": 8, + "TrackId": 9 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 203102 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 6706347, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 13 + }, + { + "PlaylistId": 8, + "TrackId": 13 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 205688 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 6713451, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 6 + }, + { + "PlaylistId": 8, + "TrackId": 6 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 205662 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 6852860, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 8 + }, + { + "PlaylistId": 8, + "TrackId": 8 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 210834 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 7636561, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 8, + "TrackId": 7 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 233926 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 8596840, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 12 + }, + { + "PlaylistId": 8, + "TrackId": 12 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 263288 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 8611245, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 10 + }, + { + "PlaylistId": 8, + "TrackId": 10 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 263497 + }, + { + "AlbumId_9441": 1, + "Bytes_1807": 8817038, + "Composer_8712": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 14 + }, + { + "PlaylistId": 8, + "TrackId": 14 + } + ] + }, + "GenreId_0427": 1, + "Milliseconds_9296": 270863 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2596f2a92d7a26b1/request.json b/test-snapshots/query/2596f2a92d7a26b1/request.json new file mode 100644 index 0000000..5dccf30 --- /dev/null +++ b/test-snapshots/query/2596f2a92d7a26b1/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_9441": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_1807": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_8712": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_0427": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Milliseconds_9296": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/259fa8dcbd794332/expected.json b/test-snapshots/query/259fa8dcbd794332/expected.json new file mode 100644 index 0000000..35707a3 --- /dev/null +++ b/test-snapshots/query/259fa8dcbd794332/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 105, + "Bytes": 3672064, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229459, + "Name": "Holy Smoke", + "TrackId": 1326, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 3960832, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 247510, + "Name": "Hooks In You", + "TrackId": 1332, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4018088, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 250853, + "Name": "Fates Warning", + "TrackId": 1329, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4071587, + "Composer": "Bruce Dickinson/David Murray", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 254197, + "Name": "Public Enema Number One", + "TrackId": 1328, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4089856, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 255582, + "Name": "Tailgunner", + "TrackId": 1325, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4141056, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 258768, + "Name": "The Assassin", + "TrackId": 1330, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4225024, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 263941, + "Name": "No Prayer For The Dying", + "TrackId": 1327, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4407296, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275408, + "Name": "Run Silent Run Deep", + "TrackId": 1331, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4548608, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 284238, + "Name": "Bring Your Daughter... ...To The Slaughter", + "TrackId": 1333, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 5322752, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 332617, + "Name": "Mother Russia", + "TrackId": 1334, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/259fa8dcbd794332/request.json b/test-snapshots/query/259fa8dcbd794332/request.json new file mode 100644 index 0000000..a8f17a7 --- /dev/null +++ b/test-snapshots/query/259fa8dcbd794332/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "No Prayer For The Dying" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/25adbc5615c39ad7/expected.json b/test-snapshots/query/25adbc5615c39ad7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/25adbc5615c39ad7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/25adbc5615c39ad7/request.json b/test-snapshots/query/25adbc5615c39ad7/request.json new file mode 100644 index 0000000..43b7577 --- /dev/null +++ b/test-snapshots/query/25adbc5615c39ad7/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/25b508547ecf7a30/expected.json b/test-snapshots/query/25b508547ecf7a30/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/25b508547ecf7a30/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/25b508547ecf7a30/request.json b/test-snapshots/query/25b508547ecf7a30/request.json new file mode 100644 index 0000000..297b458 --- /dev/null +++ b/test-snapshots/query/25b508547ecf7a30/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Manager" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/25fbebcda77bef0f/expected.json b/test-snapshots/query/25fbebcda77bef0f/expected.json new file mode 100644 index 0000000..c21a445 --- /dev/null +++ b/test-snapshots/query/25fbebcda77bef0f/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/25fbebcda77bef0f/request.json b/test-snapshots/query/25fbebcda77bef0f/request.json new file mode 100644 index 0000000..58cac7f --- /dev/null +++ b/test-snapshots/query/25fbebcda77bef0f/request.json @@ -0,0 +1,39 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/261f1b2f9189165f/expected.json b/test-snapshots/query/261f1b2f9189165f/expected.json new file mode 100644 index 0000000..f0e95e1 --- /dev/null +++ b/test-snapshots/query/261f1b2f9189165f/expected.json @@ -0,0 +1,38 @@ +[ + { + "rows": [ + { + "City_2527": "Lethbridge", + "LastName_7348": "Callahan" + }, + { + "City_2527": "Lethbridge", + "LastName_7348": "King" + }, + { + "City_2527": "Calgary", + "LastName_7348": "Mitchell" + }, + { + "City_2527": "Calgary", + "LastName_7348": "Johnson" + }, + { + "City_2527": "Calgary", + "LastName_7348": "Park" + }, + { + "City_2527": "Calgary", + "LastName_7348": "Peacock" + }, + { + "City_2527": "Calgary", + "LastName_7348": "Edwards" + }, + { + "City_2527": "Edmonton", + "LastName_7348": "Adams" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/261f1b2f9189165f/request.json b/test-snapshots/query/261f1b2f9189165f/request.json new file mode 100644 index 0000000..3f92452 --- /dev/null +++ b/test-snapshots/query/261f1b2f9189165f/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "City_2527": { + "type": "column", + "column": "City", + "fields": null + }, + "LastName_7348": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/263522c50f85998a/expected.json b/test-snapshots/query/263522c50f85998a/expected.json new file mode 100644 index 0000000..bff01af --- /dev/null +++ b/test-snapshots/query/263522c50f85998a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WI" + }, + { + "BillingState_9894": "WA" + }, + { + "BillingState_9894": "WA" + }, + { + "BillingState_9894": "WA" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/263522c50f85998a/request.json b/test-snapshots/query/263522c50f85998a/request.json new file mode 100644 index 0000000..76ee18d --- /dev/null +++ b/test-snapshots/query/263522c50f85998a/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingState_9894": { + "type": "column", + "column": "BillingState", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/26418ff41707bbe6/expected.json b/test-snapshots/query/26418ff41707bbe6/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/26418ff41707bbe6/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26418ff41707bbe6/request.json b/test-snapshots/query/26418ff41707bbe6/request.json new file mode 100644 index 0000000..e9506f0 --- /dev/null +++ b/test-snapshots/query/26418ff41707bbe6/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/264e32dfd06cf8a7/expected.json b/test-snapshots/query/264e32dfd06cf8a7/expected.json new file mode 100644 index 0000000..8d61de9 --- /dev/null +++ b/test-snapshots/query/264e32dfd06cf8a7/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_0925": 108, + "InvoiceLineId_7966": 578, + "Quantity_4717": 1, + "TrackId_7745": 3500, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 319, + "InvoiceLineId_7966": 1727, + "Quantity_4717": 1, + "TrackId_7745": 3500, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 214, + "InvoiceLineId_7966": 1153, + "Quantity_4717": 1, + "TrackId_7745": 3499, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 108, + "InvoiceLineId_7966": 577, + "Quantity_4717": 1, + "TrackId_7745": 3496, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 319, + "InvoiceLineId_7966": 1726, + "Quantity_4717": 1, + "TrackId_7745": 3494, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 213, + "InvoiceLineId_7966": 1152, + "Quantity_4717": 1, + "TrackId_7745": 3493, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 107, + "InvoiceLineId_7966": 576, + "Quantity_4717": 1, + "TrackId_7745": 3492, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 107, + "InvoiceLineId_7966": 575, + "Quantity_4717": 1, + "TrackId_7745": 3490, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 213, + "InvoiceLineId_7966": 1151, + "Quantity_4717": 1, + "TrackId_7745": 3489, + "UnitPrice_9584": 0.99 + }, + { + "InvoiceId_0925": 107, + "InvoiceLineId_7966": 574, + "Quantity_4717": 1, + "TrackId_7745": 3488, + "UnitPrice_9584": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/264e32dfd06cf8a7/request.json b/test-snapshots/query/264e32dfd06cf8a7/request.json new file mode 100644 index 0000000..8d24243 --- /dev/null +++ b/test-snapshots/query/264e32dfd06cf8a7/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_0925": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_7966": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_4717": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_7745": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_9584": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/26776955cb555bc1/expected.json b/test-snapshots/query/26776955cb555bc1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/26776955cb555bc1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26776955cb555bc1/request.json b/test-snapshots/query/26776955cb555bc1/request.json new file mode 100644 index 0000000..a2d92a0 --- /dev/null +++ b/test-snapshots/query/26776955cb555bc1/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Peacock" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-01-02" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2681b1a6c5ee2895/expected.json b/test-snapshots/query/2681b1a6c5ee2895/expected.json new file mode 100644 index 0000000..33d602a --- /dev/null +++ b/test-snapshots/query/2681b1a6c5ee2895/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceLineId_6238": 1, + "Quantity_8917": 1, + "TrackId_9451": 2 + }, + { + "InvoiceLineId_6238": 2, + "Quantity_8917": 1, + "TrackId_9451": 4 + }, + { + "InvoiceLineId_6238": 3, + "Quantity_8917": 1, + "TrackId_9451": 6 + }, + { + "InvoiceLineId_6238": 4, + "Quantity_8917": 1, + "TrackId_9451": 8 + }, + { + "InvoiceLineId_6238": 5, + "Quantity_8917": 1, + "TrackId_9451": 10 + }, + { + "InvoiceLineId_6238": 6, + "Quantity_8917": 1, + "TrackId_9451": 12 + }, + { + "InvoiceLineId_6238": 7, + "Quantity_8917": 1, + "TrackId_9451": 16 + }, + { + "InvoiceLineId_6238": 8, + "Quantity_8917": 1, + "TrackId_9451": 20 + }, + { + "InvoiceLineId_6238": 9, + "Quantity_8917": 1, + "TrackId_9451": 24 + }, + { + "InvoiceLineId_6238": 10, + "Quantity_8917": 1, + "TrackId_9451": 28 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2681b1a6c5ee2895/request.json b/test-snapshots/query/2681b1a6c5ee2895/request.json new file mode 100644 index 0000000..d6c8a2d --- /dev/null +++ b/test-snapshots/query/2681b1a6c5ee2895/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "TrackId_9451": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "InvoiceLineId_6238": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_8917": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/269ccfdb1183fdff/expected.json b/test-snapshots/query/269ccfdb1183fdff/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/269ccfdb1183fdff/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/269ccfdb1183fdff/request.json b/test-snapshots/query/269ccfdb1183fdff/request.json new file mode 100644 index 0000000..1f166a5 --- /dev/null +++ b/test-snapshots/query/269ccfdb1183fdff/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/269ce5e74b7e5bbb/expected.json b/test-snapshots/query/269ce5e74b7e5bbb/expected.json new file mode 100644 index 0000000..efe898d --- /dev/null +++ b/test-snapshots/query/269ce5e74b7e5bbb/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "BillingCity_5021": "Madison", + "BillingState_6271": "WI", + "CustomerId_4094": 25, + "InvoiceDate_4631": "2009-10-25" + }, + { + "BillingCity_5021": "Redmond", + "BillingState_6271": "WA", + "CustomerId_4094": 17, + "InvoiceDate_4631": "2010-04-29" + }, + { + "BillingCity_5021": "Amsterdam", + "BillingState_6271": "VV", + "CustomerId_4094": 48, + "InvoiceDate_4631": "2012-02-09" + }, + { + "BillingCity_5021": "Salt Lake City", + "BillingState_6271": "UT", + "CustomerId_4094": 28, + "InvoiceDate_4631": "2013-05-19" + }, + { + "BillingCity_5021": "Fort Worth", + "BillingState_6271": "TX", + "CustomerId_4094": 26, + "InvoiceDate_4631": "2011-01-02" + }, + { + "BillingCity_5021": "São José dos Campos", + "BillingState_6271": "SP", + "CustomerId_4094": 1, + "InvoiceDate_4631": "2011-05-06" + }, + { + "BillingCity_5021": "São Paulo", + "BillingState_6271": "SP", + "CustomerId_4094": 10, + "InvoiceDate_4631": "2012-01-09" + }, + { + "BillingCity_5021": "São Paulo", + "BillingState_6271": "SP", + "CustomerId_4094": 11, + "InvoiceDate_4631": "2013-03-18" + }, + { + "BillingCity_5021": "Rome", + "BillingState_6271": "RM", + "CustomerId_4094": 47, + "InvoiceDate_4631": "2010-12-02" + }, + { + "BillingCity_5021": "Rio de Janeiro", + "BillingState_6271": "RJ", + "CustomerId_4094": 12, + "InvoiceDate_4631": "2009-05-23" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/269ce5e74b7e5bbb/request.json b/test-snapshots/query/269ce5e74b7e5bbb/request.json new file mode 100644 index 0000000..5f93f88 --- /dev/null +++ b/test-snapshots/query/269ce5e74b7e5bbb/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingState_6271": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "BillingCity_5021": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "InvoiceDate_4631": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "CustomerId_4094": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/26a325d63116e32f/expected.json b/test-snapshots/query/26a325d63116e32f/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/26a325d63116e32f/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26a325d63116e32f/request.json b/test-snapshots/query/26a325d63116e32f/request.json new file mode 100644 index 0000000..576c9a3 --- /dev/null +++ b/test-snapshots/query/26a325d63116e32f/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/26a881831976790e/expected.json b/test-snapshots/query/26a881831976790e/expected.json new file mode 100644 index 0000000..e8ab346 --- /dev/null +++ b/test-snapshots/query/26a881831976790e/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26a881831976790e/request.json b/test-snapshots/query/26a881831976790e/request.json new file mode 100644 index 0000000..5716b6e --- /dev/null +++ b/test-snapshots/query/26a881831976790e/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/26cf7890199367d7/expected.json b/test-snapshots/query/26cf7890199367d7/expected.json new file mode 100644 index 0000000..baa9b91 --- /dev/null +++ b/test-snapshots/query/26cf7890199367d7/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26cf7890199367d7/request.json b/test-snapshots/query/26cf7890199367d7/request.json new file mode 100644 index 0000000..50c2130 --- /dev/null +++ b/test-snapshots/query/26cf7890199367d7/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/26d7a79caf1a8c22/expected.json b/test-snapshots/query/26d7a79caf1a8c22/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/26d7a79caf1a8c22/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26d7a79caf1a8c22/request.json b/test-snapshots/query/26d7a79caf1a8c22/request.json new file mode 100644 index 0000000..15ee186 --- /dev/null +++ b/test-snapshots/query/26d7a79caf1a8c22/request.json @@ -0,0 +1,127 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 343719 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/26e8e96d4808b3f4/expected.json b/test-snapshots/query/26e8e96d4808b3f4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/26e8e96d4808b3f4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/26e8e96d4808b3f4/request.json b/test-snapshots/query/26e8e96d4808b3f4/request.json new file mode 100644 index 0000000..f8cb268 --- /dev/null +++ b/test-snapshots/query/26e8e96d4808b3f4/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2700609032d4ed2/expected.json b/test-snapshots/query/2700609032d4ed2/expected.json new file mode 100644 index 0000000..f090198 --- /dev/null +++ b/test-snapshots/query/2700609032d4ed2/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Heavy Metal Classic", + "PlaylistId": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2700609032d4ed2/request.json b/test-snapshots/query/2700609032d4ed2/request.json new file mode 100644 index 0000000..04cff4e --- /dev/null +++ b/test-snapshots/query/2700609032d4ed2/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2718611be8a8167f/expected.json b/test-snapshots/query/2718611be8a8167f/expected.json new file mode 100644 index 0000000..e3062cd --- /dev/null +++ b/test-snapshots/query/2718611be8a8167f/expected.json @@ -0,0 +1,246 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1973-08-29", + "Email_7472": "jane@chinookcorp.com", + "FirstName_5747": "Jane" + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1965-03-03", + "Email_7472": "steve@chinookcorp.com", + "FirstName_5747": "Steve" + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1947-09-19", + "Email_7472": "margaret@chinookcorp.com", + "FirstName_5747": "Margaret" + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1965-03-03", + "Email_7472": "steve@chinookcorp.com", + "FirstName_5747": "Steve" + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1965-03-03", + "Email_7472": "steve@chinookcorp.com", + "FirstName_5747": "Steve" + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1973-08-29", + "Email_7472": "jane@chinookcorp.com", + "FirstName_5747": "Jane" + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1973-08-29", + "Email_7472": "jane@chinookcorp.com", + "FirstName_5747": "Jane" + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1947-09-19", + "Email_7472": "margaret@chinookcorp.com", + "FirstName_5747": "Margaret" + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1973-08-29", + "Email_7472": "jane@chinookcorp.com", + "FirstName_5747": "Jane" + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "BirthDate_9935": "1947-09-19", + "Email_7472": "margaret@chinookcorp.com", + "FirstName_5747": "Margaret" + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2718611be8a8167f/request.json b/test-snapshots/query/2718611be8a8167f/request.json new file mode 100644 index 0000000..ccfcf19 --- /dev/null +++ b/test-snapshots/query/2718611be8a8167f/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Email_7472": { + "type": "column", + "column": "Email", + "fields": null + }, + "BirthDate_9935": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "FirstName_5747": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2722183bc9cd1263/expected.json b/test-snapshots/query/2722183bc9cd1263/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/2722183bc9cd1263/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2722183bc9cd1263/request.json b/test-snapshots/query/2722183bc9cd1263/request.json new file mode 100644 index 0000000..dddf93d --- /dev/null +++ b/test-snapshots/query/2722183bc9cd1263/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/272a9dbd00c04d30/expected.json b/test-snapshots/query/272a9dbd00c04d30/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/272a9dbd00c04d30/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/272a9dbd00c04d30/request.json b/test-snapshots/query/272a9dbd00c04d30/request.json new file mode 100644 index 0000000..29a13e4 --- /dev/null +++ b/test-snapshots/query/272a9dbd00c04d30/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/276e4ad6aee2ba2a/expected.json b/test-snapshots/query/276e4ad6aee2ba2a/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/276e4ad6aee2ba2a/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/276e4ad6aee2ba2a/request.json b/test-snapshots/query/276e4ad6aee2ba2a/request.json new file mode 100644 index 0000000..00688a0 --- /dev/null +++ b/test-snapshots/query/276e4ad6aee2ba2a/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/277775bf08a8bc8c/expected.json b/test-snapshots/query/277775bf08a8bc8c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/277775bf08a8bc8c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/277775bf08a8bc8c/request.json b/test-snapshots/query/277775bf08a8bc8c/request.json new file mode 100644 index 0000000..39875b2 --- /dev/null +++ b/test-snapshots/query/277775bf08a8bc8c/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/279d286cb366bd0f/expected.json b/test-snapshots/query/279d286cb366bd0f/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/279d286cb366bd0f/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/279d286cb366bd0f/request.json b/test-snapshots/query/279d286cb366bd0f/request.json new file mode 100644 index 0000000..9dd3b23 --- /dev/null +++ b/test-snapshots/query/279d286cb366bd0f/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AZ" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/27a9ec69d3f5b456/expected.json b/test-snapshots/query/27a9ec69d3f5b456/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/27a9ec69d3f5b456/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/27a9ec69d3f5b456/request.json b/test-snapshots/query/27a9ec69d3f5b456/request.json new file mode 100644 index 0000000..76f8510 --- /dev/null +++ b/test-snapshots/query/27a9ec69d3f5b456/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/27af0707efedad27/expected.json b/test-snapshots/query/27af0707efedad27/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/27af0707efedad27/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/27af0707efedad27/request.json b/test-snapshots/query/27af0707efedad27/request.json new file mode 100644 index 0000000..8a59d6d --- /dev/null +++ b/test-snapshots/query/27af0707efedad27/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/28611ea041c2a466/expected.json b/test-snapshots/query/28611ea041c2a466/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/28611ea041c2a466/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28611ea041c2a466/request.json b/test-snapshots/query/28611ea041c2a466/request.json new file mode 100644 index 0000000..f2cd289 --- /dev/null +++ b/test-snapshots/query/28611ea041c2a466/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/28690ab7f92d9653/expected.json b/test-snapshots/query/28690ab7f92d9653/expected.json new file mode 100644 index 0000000..13053eb --- /dev/null +++ b/test-snapshots/query/28690ab7f92d9653/expected.json @@ -0,0 +1,136 @@ +[ + { + "rows": [ + { + "Address_0706": "1 Infinite Loop", + "City_1224": "Cupertino", + "Company_1972": "Apple Inc.", + "Country_8947": "USA", + "CustomerId_3978": 19, + "Email_5322": "tgoyer@apple.com", + "Fax_6060": "+1 (408) 996-1011", + "FirstName_7742": "Tim", + "LastName_6441": "Goyer", + "Phone_5607": "+1 (408) 996-1010", + "SupportRepId_1737": 3 + }, + { + "Address_0706": "1 Microsoft Way", + "City_1224": "Redmond", + "Company_1972": "Microsoft Corporation", + "Country_8947": "USA", + "CustomerId_3978": 17, + "Email_5322": "jacksmith@microsoft.com", + "Fax_6060": "+1 (425) 882-8081", + "FirstName_7742": "Jack", + "LastName_6441": "Smith", + "Phone_5607": "+1 (425) 882-8080", + "SupportRepId_1737": 5 + }, + { + "Address_0706": "1033 N Park Ave", + "City_1224": "Tucson", + "Company_1972": null, + "Country_8947": "USA", + "CustomerId_3978": 27, + "Email_5322": "patrick.gray@aol.com", + "Fax_6060": null, + "FirstName_7742": "Patrick", + "LastName_6441": "Gray", + "Phone_5607": "+1 (520) 622-4200", + "SupportRepId_1737": 4 + }, + { + "Address_0706": "11, Place Bellecour", + "City_1224": "Lyon", + "Company_1972": null, + "Country_8947": "France", + "CustomerId_3978": 41, + "Email_5322": "marc.dubois@hotmail.com", + "Fax_6060": null, + "FirstName_7742": "Marc", + "LastName_6441": "Dubois", + "Phone_5607": "+33 04 78 30 30 30", + "SupportRepId_1737": 5 + }, + { + "Address_0706": "110 Raeburn Pl", + "City_1224": "Edinburgh ", + "Company_1972": null, + "Country_8947": "United Kingdom", + "CustomerId_3978": 54, + "Email_5322": "steve.murray@yahoo.uk", + "Fax_6060": null, + "FirstName_7742": "Steve", + "LastName_6441": "Murray", + "Phone_5607": "+44 0131 315 3300", + "SupportRepId_1737": 5 + }, + { + "Address_0706": "113 Lupus St", + "City_1224": "London", + "Company_1972": null, + "Country_8947": "United Kingdom", + "CustomerId_3978": 53, + "Email_5322": "phil.hughes@gmail.com", + "Fax_6060": null, + "FirstName_7742": "Phil", + "LastName_6441": "Hughes", + "Phone_5607": "+44 020 7976 5722", + "SupportRepId_1737": 3 + }, + { + "Address_0706": "12,Community Centre", + "City_1224": "Delhi", + "Company_1972": null, + "Country_8947": "India", + "CustomerId_3978": 58, + "Email_5322": "manoj.pareek@rediff.com", + "Fax_6060": null, + "FirstName_7742": "Manoj", + "LastName_6441": "Pareek", + "Phone_5607": "+91 0124 39883988", + "SupportRepId_1737": 3 + }, + { + "Address_0706": "120 S Orange Ave", + "City_1224": "Orlando", + "Company_1972": null, + "Country_8947": "USA", + "CustomerId_3978": 22, + "Email_5322": "hleacock@gmail.com", + "Fax_6060": null, + "FirstName_7742": "Heather", + "LastName_6441": "Leacock", + "Phone_5607": "+1 (407) 999-7788", + "SupportRepId_1737": 4 + }, + { + "Address_0706": "1498 rue Bélanger", + "City_1224": "Montréal", + "Company_1972": null, + "Country_8947": "Canada", + "CustomerId_3978": 3, + "Email_5322": "ftremblay@gmail.com", + "Fax_6060": null, + "FirstName_7742": "François", + "LastName_6441": "Tremblay", + "Phone_5607": "+1 (514) 721-4711", + "SupportRepId_1737": 3 + }, + { + "Address_0706": "1600 Amphitheatre Parkway", + "City_1224": "Mountain View", + "Company_1972": "Google Inc.", + "Country_8947": "USA", + "CustomerId_3978": 16, + "Email_5322": "fharris@google.com", + "Fax_6060": "+1 (650) 253-0000", + "FirstName_7742": "Frank", + "LastName_6441": "Harris", + "Phone_5607": "+1 (650) 253-0000", + "SupportRepId_1737": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28690ab7f92d9653/request.json b/test-snapshots/query/28690ab7f92d9653/request.json new file mode 100644 index 0000000..0233b7e --- /dev/null +++ b/test-snapshots/query/28690ab7f92d9653/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_0706": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_1224": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_1972": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_8947": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_3978": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_5322": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_6060": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7742": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_6441": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_5607": { + "type": "column", + "column": "Phone", + "fields": null + }, + "SupportRepId_1737": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/289e0420b077b3ba/expected.json b/test-snapshots/query/289e0420b077b3ba/expected.json new file mode 100644 index 0000000..996d77b --- /dev/null +++ b/test-snapshots/query/289e0420b077b3ba/expected.json @@ -0,0 +1,136 @@ +[ + { + "rows": [ + { + "AlbumId_8293": 1, + "ArtistId_2532": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + }, + "Title_9060": "For Those About To Rock We Salute You" + }, + { + "AlbumId_8293": 10, + "ArtistId_2532": 8, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 8, + "Name": "Audioslave" + } + ] + }, + "Title_9060": "Audioslave" + }, + { + "AlbumId_8293": 100, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Iron Maiden" + }, + { + "AlbumId_8293": 101, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Killers" + }, + { + "AlbumId_8293": 102, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Live After Death" + }, + { + "AlbumId_8293": 103, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId_8293": 104, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId_8293": 105, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "No Prayer For The Dying" + }, + { + "AlbumId_8293": 106, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Piece Of Mind" + }, + { + "AlbumId_8293": 107, + "ArtistId_2532": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + }, + "Title_9060": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/289e0420b077b3ba/request.json b/test-snapshots/query/289e0420b077b3ba/request.json new file mode 100644 index 0000000..cb1cdc3 --- /dev/null +++ b/test-snapshots/query/289e0420b077b3ba/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_8293": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_2532": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_9060": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/28a0d607ca39700e/expected.json b/test-snapshots/query/28a0d607ca39700e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/28a0d607ca39700e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28a0d607ca39700e/request.json b/test-snapshots/query/28a0d607ca39700e/request.json new file mode 100644 index 0000000..d6cbc80 --- /dev/null +++ b/test-snapshots/query/28a0d607ca39700e/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "General Manager" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Park" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/28a2693c311979b8/expected.json b/test-snapshots/query/28a2693c311979b8/expected.json new file mode 100644 index 0000000..6524cb9 --- /dev/null +++ b/test-snapshots/query/28a2693c311979b8/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_4548": 1, + "Name_1669": "Rock" + }, + { + "GenreId_4548": 2, + "Name_1669": "Jazz" + }, + { + "GenreId_4548": 3, + "Name_1669": "Metal" + }, + { + "GenreId_4548": 4, + "Name_1669": "Alternative & Punk" + }, + { + "GenreId_4548": 5, + "Name_1669": "Rock And Roll" + }, + { + "GenreId_4548": 6, + "Name_1669": "Blues" + }, + { + "GenreId_4548": 7, + "Name_1669": "Latin" + }, + { + "GenreId_4548": 8, + "Name_1669": "Reggae" + }, + { + "GenreId_4548": 9, + "Name_1669": "Pop" + }, + { + "GenreId_4548": 10, + "Name_1669": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28a2693c311979b8/request.json b/test-snapshots/query/28a2693c311979b8/request.json new file mode 100644 index 0000000..7fb82ce --- /dev/null +++ b/test-snapshots/query/28a2693c311979b8/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_4548": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_1669": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/28a8ac0dd3e4e65f/expected.json b/test-snapshots/query/28a8ac0dd3e4e65f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/28a8ac0dd3e4e65f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28a8ac0dd3e4e65f/request.json b/test-snapshots/query/28a8ac0dd3e4e65f/request.json new file mode 100644 index 0000000..0640167 --- /dev/null +++ b/test-snapshots/query/28a8ac0dd3e4e65f/request.json @@ -0,0 +1,171 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1965-03-03" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "923 7 ST NW" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/28a8c7cb230f4488/expected.json b/test-snapshots/query/28a8c7cb230f4488/expected.json new file mode 100644 index 0000000..31570da --- /dev/null +++ b/test-snapshots/query/28a8c7cb230f4488/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 7494639, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 229198, + "Name": "Virginia Moon", + "TrackId": 1006, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28a8c7cb230f4488/request.json b/test-snapshots/query/28a8c7cb230f4488/request.json new file mode 100644 index 0000000..8fc1563 --- /dev/null +++ b/test-snapshots/query/28a8c7cb230f4488/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/28cb4577a3662453/expected.json b/test-snapshots/query/28cb4577a3662453/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/28cb4577a3662453/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28cb4577a3662453/request.json b/test-snapshots/query/28cb4577a3662453/request.json new file mode 100644 index 0000000..37411ec --- /dev/null +++ b/test-snapshots/query/28cb4577a3662453/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/28e0e0584e69ce17/expected.json b/test-snapshots/query/28e0e0584e69ce17/expected.json new file mode 100644 index 0000000..d2a61df --- /dev/null +++ b/test-snapshots/query/28e0e0584e69ce17/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1314, + "Quantity": 1, + "TrackId": 981, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1315, + "Quantity": 1, + "TrackId": 990, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1316, + "Quantity": 1, + "TrackId": 999, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1317, + "Quantity": 1, + "TrackId": 1008, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1318, + "Quantity": 1, + "TrackId": 1017, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/28e0e0584e69ce17/request.json b/test-snapshots/query/28e0e0584e69ce17/request.json new file mode 100644 index 0000000..38dd153 --- /dev/null +++ b/test-snapshots/query/28e0e0584e69ce17/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2915e2fe63ddd2cd/expected.json b/test-snapshots/query/2915e2fe63ddd2cd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2915e2fe63ddd2cd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2915e2fe63ddd2cd/request.json b/test-snapshots/query/2915e2fe63ddd2cd/request.json new file mode 100644 index 0000000..9fdd4be --- /dev/null +++ b/test-snapshots/query/2915e2fe63ddd2cd/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/292b6dbc99fbf4a3/expected.json b/test-snapshots/query/292b6dbc99fbf4a3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/292b6dbc99fbf4a3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/292b6dbc99fbf4a3/request.json b/test-snapshots/query/292b6dbc99fbf4a3/request.json new file mode 100644 index 0000000..25efbdc --- /dev/null +++ b/test-snapshots/query/292b6dbc99fbf4a3/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock (We Salute You)" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2947ae90b1e6a18/expected.json b/test-snapshots/query/2947ae90b1e6a18/expected.json new file mode 100644 index 0000000..515e377 --- /dev/null +++ b/test-snapshots/query/2947ae90b1e6a18/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2947ae90b1e6a18/request.json b/test-snapshots/query/2947ae90b1e6a18/request.json new file mode 100644 index 0000000..23913a3 --- /dev/null +++ b/test-snapshots/query/2947ae90b1e6a18/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "ftremblay@gmail.com" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/295fcabc4e40803a/expected.json b/test-snapshots/query/295fcabc4e40803a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/295fcabc4e40803a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/295fcabc4e40803a/request.json b/test-snapshots/query/295fcabc4e40803a/request.json new file mode 100644 index 0000000..b6b06bf --- /dev/null +++ b/test-snapshots/query/295fcabc4e40803a/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T1K 5N8" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1970-05-29" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/29bb4fa1b3018af1/expected.json b/test-snapshots/query/29bb4fa1b3018af1/expected.json new file mode 100644 index 0000000..bf65b87 --- /dev/null +++ b/test-snapshots/query/29bb4fa1b3018af1/expected.json @@ -0,0 +1,40 @@ +[ + { + "rows": [ + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/29bb4fa1b3018af1/request.json b/test-snapshots/query/29bb4fa1b3018af1/request.json new file mode 100644 index 0000000..70100ec --- /dev/null +++ b/test-snapshots/query/29bb4fa1b3018af1/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lethbridge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/29bbf29f2b4c1a4d/expected.json b/test-snapshots/query/29bbf29f2b4c1a4d/expected.json new file mode 100644 index 0000000..4fab1ea --- /dev/null +++ b/test-snapshots/query/29bbf29f2b4c1a4d/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/29bbf29f2b4c1a4d/request.json b/test-snapshots/query/29bbf29f2b4c1a4d/request.json new file mode 100644 index 0000000..79a67dc --- /dev/null +++ b/test-snapshots/query/29bbf29f2b4c1a4d/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/29c1f881c63cfc14/expected.json b/test-snapshots/query/29c1f881c63cfc14/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/29c1f881c63cfc14/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/29c1f881c63cfc14/request.json b/test-snapshots/query/29c1f881c63cfc14/request.json new file mode 100644 index 0000000..2e8c6f1 --- /dev/null +++ b/test-snapshots/query/29c1f881c63cfc14/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/29d73d1aedc6e9f8/expected.json b/test-snapshots/query/29d73d1aedc6e9f8/expected.json new file mode 100644 index 0000000..ceaeb48 --- /dev/null +++ b/test-snapshots/query/29d73d1aedc6e9f8/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "InvoiceId_7478": 100 + }, + { + "InvoiceId_7478": 100 + }, + { + "InvoiceId_7478": 100 + }, + { + "InvoiceId_7478": 100 + }, + { + "InvoiceId_7478": 101 + }, + { + "InvoiceId_7478": 101 + }, + { + "InvoiceId_7478": 101 + }, + { + "InvoiceId_7478": 101 + }, + { + "InvoiceId_7478": 101 + }, + { + "InvoiceId_7478": 101 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/29d73d1aedc6e9f8/request.json b/test-snapshots/query/29d73d1aedc6e9f8/request.json new file mode 100644 index 0000000..026df41 --- /dev/null +++ b/test-snapshots/query/29d73d1aedc6e9f8/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_7478": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/29e1cc82e8bdc948/expected.json b/test-snapshots/query/29e1cc82e8bdc948/expected.json new file mode 100644 index 0000000..297abfe --- /dev/null +++ b/test-snapshots/query/29e1cc82e8bdc948/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_9863": 1, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 1, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 2, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 2, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 2, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 2, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 3, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 3, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 3, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + }, + { + "InvoiceId_9863": 3, + "Quantity_3851": 1, + "UnitPrice_2303": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/29e1cc82e8bdc948/request.json b/test-snapshots/query/29e1cc82e8bdc948/request.json new file mode 100644 index 0000000..e318dc0 --- /dev/null +++ b/test-snapshots/query/29e1cc82e8bdc948/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_9863": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "UnitPrice_2303": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Quantity_3851": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/29f106cd58cd54c1/expected.json b/test-snapshots/query/29f106cd58cd54c1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/29f106cd58cd54c1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/29f106cd58cd54c1/request.json b/test-snapshots/query/29f106cd58cd54c1/request.json new file mode 100644 index 0000000..3ce4d28 --- /dev/null +++ b/test-snapshots/query/29f106cd58cd54c1/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11170334 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2a08261244e40b71/expected.json b/test-snapshots/query/2a08261244e40b71/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2a08261244e40b71/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a08261244e40b71/request.json b/test-snapshots/query/2a08261244e40b71/request.json new file mode 100644 index 0000000..581b2c4 --- /dev/null +++ b/test-snapshots/query/2a08261244e40b71/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2a1af87969bd6ae7/expected.json b/test-snapshots/query/2a1af87969bd6ae7/expected.json new file mode 100644 index 0000000..ee04541 --- /dev/null +++ b/test-snapshots/query/2a1af87969bd6ae7/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a1af87969bd6ae7/request.json b/test-snapshots/query/2a1af87969bd6ae7/request.json new file mode 100644 index 0000000..1804c55 --- /dev/null +++ b/test-snapshots/query/2a1af87969bd6ae7/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2a3a0feddcbbb854/expected.json b/test-snapshots/query/2a3a0feddcbbb854/expected.json new file mode 100644 index 0000000..e9cccaa --- /dev/null +++ b/test-snapshots/query/2a3a0feddcbbb854/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a3a0feddcbbb854/request.json b/test-snapshots/query/2a3a0feddcbbb854/request.json new file mode 100644 index 0000000..a86be57 --- /dev/null +++ b/test-snapshots/query/2a3a0feddcbbb854/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 268 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2a3f36f5cf24c481/expected.json b/test-snapshots/query/2a3f36f5cf24c481/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2a3f36f5cf24c481/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a3f36f5cf24c481/request.json b/test-snapshots/query/2a3f36f5cf24c481/request.json new file mode 100644 index 0000000..8af377d --- /dev/null +++ b/test-snapshots/query/2a3f36f5cf24c481/request.json @@ -0,0 +1,188 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T1K 5N8" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2a4672660ca68177/expected.json b/test-snapshots/query/2a4672660ca68177/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2a4672660ca68177/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a4672660ca68177/request.json b/test-snapshots/query/2a4672660ca68177/request.json new file mode 100644 index 0000000..d7b18aa --- /dev/null +++ b/test-snapshots/query/2a4672660ca68177/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2a475b8cf874125/expected.json b/test-snapshots/query/2a475b8cf874125/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2a475b8cf874125/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a475b8cf874125/request.json b/test-snapshots/query/2a475b8cf874125/request.json new file mode 100644 index 0000000..4d78ccc --- /dev/null +++ b/test-snapshots/query/2a475b8cf874125/request.json @@ -0,0 +1,136 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Laura" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2a4cd5beed8c2d2d/expected.json b/test-snapshots/query/2a4cd5beed8c2d2d/expected.json new file mode 100644 index 0000000..e466c72 --- /dev/null +++ b/test-snapshots/query/2a4cd5beed8c2d2d/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "GenreId": 11, + "Name": "Bossa Nova" + }, + { + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "GenreId": 2, + "Name": "Jazz" + }, + { + "GenreId": 23, + "Name": "Alternative" + }, + { + "GenreId": 24, + "Name": "Classical" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2a4cd5beed8c2d2d/request.json b/test-snapshots/query/2a4cd5beed8c2d2d/request.json new file mode 100644 index 0000000..a122b28 --- /dev/null +++ b/test-snapshots/query/2a4cd5beed8c2d2d/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2ad90a17ae3f8c26/expected.json b/test-snapshots/query/2ad90a17ae3f8c26/expected.json new file mode 100644 index 0000000..2fe4664 --- /dev/null +++ b/test-snapshots/query/2ad90a17ae3f8c26/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2ad90a17ae3f8c26/request.json b/test-snapshots/query/2ad90a17ae3f8c26/request.json new file mode 100644 index 0000000..c6398cd --- /dev/null +++ b/test-snapshots/query/2ad90a17ae3f8c26/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2ae6154e0d58ad47/expected.json b/test-snapshots/query/2ae6154e0d58ad47/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2ae6154e0d58ad47/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2ae6154e0d58ad47/request.json b/test-snapshots/query/2ae6154e0d58ad47/request.json new file mode 100644 index 0000000..6e7dfb4 --- /dev/null +++ b/test-snapshots/query/2ae6154e0d58ad47/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "patrick.gray@aol.com" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2aeab38de426c65b/expected.json b/test-snapshots/query/2aeab38de426c65b/expected.json new file mode 100644 index 0000000..b90393b --- /dev/null +++ b/test-snapshots/query/2aeab38de426c65b/expected.json @@ -0,0 +1,12 @@ +[ + { + "aggregates": { + "BillingCity_max_4107": "Yellowknife", + "BillingCountry_min_0867": "Argentina", + "BillingState_min_2121": "AB", + "InvoiceDate_min_3004": "2009-01-01", + "InvoiceId_count_6167": 412, + "InvoiceId_min_8983": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/2aeab38de426c65b/request.json b/test-snapshots/query/2aeab38de426c65b/request.json new file mode 100644 index 0000000..1c615d8 --- /dev/null +++ b/test-snapshots/query/2aeab38de426c65b/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Invoice", + "query": { + "aggregates": { + "InvoiceId_count_6167": { + "type": "single_column", + "column": "InvoiceId", + "function": "count" + }, + "InvoiceId_min_8983": { + "type": "single_column", + "column": "InvoiceId", + "function": "min" + }, + "BillingCountry_min_0867": { + "type": "single_column", + "column": "BillingCountry", + "function": "min" + }, + "InvoiceDate_min_3004": { + "type": "single_column", + "column": "InvoiceDate", + "function": "min" + }, + "BillingCity_max_4107": { + "type": "single_column", + "column": "BillingCity", + "function": "max" + }, + "BillingState_min_2121": { + "type": "single_column", + "column": "BillingState", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2af203059f089571/expected.json b/test-snapshots/query/2af203059f089571/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2af203059f089571/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2af203059f089571/request.json b/test-snapshots/query/2af203059f089571/request.json new file mode 100644 index 0000000..3a84eaf --- /dev/null +++ b/test-snapshots/query/2af203059f089571/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2b16065cc0590c77/expected.json b/test-snapshots/query/2b16065cc0590c77/expected.json new file mode 100644 index 0000000..0a8fc39 --- /dev/null +++ b/test-snapshots/query/2b16065cc0590c77/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2b16065cc0590c77/request.json b/test-snapshots/query/2b16065cc0590c77/request.json new file mode 100644 index 0000000..5c11d95 --- /dev/null +++ b/test-snapshots/query/2b16065cc0590c77/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2b3a3a605c9247d3/expected.json b/test-snapshots/query/2b3a3a605c9247d3/expected.json new file mode 100644 index 0000000..3512dbd --- /dev/null +++ b/test-snapshots/query/2b3a3a605c9247d3/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2b3a3a605c9247d3/request.json b/test-snapshots/query/2b3a3a605c9247d3/request.json new file mode 100644 index 0000000..960a35f --- /dev/null +++ b/test-snapshots/query/2b3a3a605c9247d3/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210834 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2b3d954b51b6154a/expected.json b/test-snapshots/query/2b3d954b51b6154a/expected.json new file mode 100644 index 0000000..4522ab9 --- /dev/null +++ b/test-snapshots/query/2b3d954b51b6154a/expected.json @@ -0,0 +1,1056 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 1, + "Bytes_4196": 11170334, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 343719, + "Name_6709": "For Those About To Rock (We Salute You)", + "TrackId_2853": 1, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 6566314, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 199836, + "Name_6709": "C.O.D.", + "TrackId_2853": 11, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 6599424, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 203102, + "Name_6709": "Snowballed", + "TrackId_2853": 9, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 6706347, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 205688, + "Name_6709": "Night Of The Long Knives", + "TrackId_2853": 13, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 6713451, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 205662, + "Name_6709": "Put The Finger On You", + "TrackId_2853": 6, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 6852860, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 210834, + "Name_6709": "Inject The Venom", + "TrackId_2853": 8, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 7636561, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 233926, + "Name_6709": "Let's Get It Up", + "TrackId_2853": 7, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 8596840, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 263288, + "Name_6709": "Breaking The Rules", + "TrackId_2853": 12, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 8611245, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 263497, + "Name_6709": "Evil Walks", + "TrackId_2853": 10, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 1, + "Bytes_4196": 8817038, + "Composer_4614": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 270863, + "Name_6709": "Spellbound", + "TrackId_2853": 14, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 10, + "Bytes_4196": 4948095, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 206053, + "Name_6709": "Exploder", + "TrackId_2853": 93, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 4961887, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 206628, + "Name_6709": "Hypnotize", + "TrackId_2853": 94, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 5339931, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 222380, + "Name_6709": "Cochise", + "TrackId_2853": 85, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 5988186, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 249391, + "Name_6709": "What You Are", + "TrackId_2853": 88, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 6321091, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 263262, + "Name_6709": "Set It Off", + "TrackId_2853": 90, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 6672176, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 277890, + "Name_6709": "Show Me How to Live", + "TrackId_2853": 86, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 6709793, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 279457, + "Name_6709": "Gasoline", + "TrackId_2853": 87, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 7059624, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 294034, + "Name_6709": "Like a Stone", + "TrackId_2853": 89, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 7193162, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 299598, + "Name_6709": "Getaway Car", + "TrackId_2853": 97, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 10, + "Bytes_4196": 7289084, + "Composer_4614": "Audioslave/Chris Cornell", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 303595, + "Name_6709": "Light My Way", + "TrackId_2853": 96, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 100, + "Bytes_4196": 10276872, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 428016, + "Name_6709": "05 - Phantom of the Opera", + "TrackId_2853": 1272, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 4712576, + "Composer_4614": "David Murray/Paul Di'Anno/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 196284, + "Name_6709": "02 - Sanctuary", + "TrackId_2853": 1269, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 4739122, + "Composer_4614": "Harris/Paul Di´Anno", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 197276, + "Name_6709": "04 - Running Free", + "TrackId_2853": 1271, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 5189891, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 216058, + "Name_6709": "09 - Iron Maiden", + "TrackId_2853": 1276, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 5668992, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 236173, + "Name_6709": "01 - Prowler", + "TrackId_2853": 1268, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 6066304, + "Composer_4614": "Murray Dave", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 252708, + "Name_6709": "08 - Charlotte the Harlot", + "TrackId_2853": 1275, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 6226048, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 259343, + "Name_6709": "06 - Transylvania", + "TrackId_2853": 1273, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 7889024, + "Composer_4614": "Harris/Paul Di´Anno", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 328620, + "Name_6709": "03 - Remember Tomorrow", + "TrackId_2853": 1270, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 100, + "Bytes_4196": 7981184, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 332460, + "Name_6709": "07 - Strange World", + "TrackId_2853": 1274, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 101, + "Bytes_4196": 2543744, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 105926, + "Name_6709": "The Ides Of March", + "TrackId_2853": 1277, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 4188288, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 174471, + "Name_6709": "Wrathchild", + "TrackId_2853": 1278, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 4493440, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 187141, + "Name_6709": "Genghis Khan", + "TrackId_2853": 1281, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 4804736, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 200150, + "Name_6709": "Purgatory", + "TrackId_2853": 1285, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 4874368, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 203049, + "Name_6709": "Another Life", + "TrackId_2853": 1280, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 5584861, + "Composer_4614": "Di´Anno/Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 232515, + "Name_6709": "Innocent Exile", + "TrackId_2853": 1282, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 6205786, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 258377, + "Name_6709": "Murders In The Rue Morgue", + "TrackId_2853": 1279, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 6934660, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 288757, + "Name_6709": "Drifter", + "TrackId_2853": 1286, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 7227440, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 300956, + "Name_6709": "Killers", + "TrackId_2853": 1283, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 101, + "Bytes_4196": 8937600, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 372349, + "Name_6709": "Prodigal Son", + "TrackId_2853": 1284, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 102, + "Bytes_4196": 10589917, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 441155, + "Name_6709": "Phantom Of The Opera", + "TrackId_2853": 1304, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 10836304, + "Composer_4614": "Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 451422, + "Name_6709": "Hallowed Be Thy Name", + "TrackId_2853": 1296, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 10921567, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 454974, + "Name_6709": "Powerslave", + "TrackId_2853": 1294, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 1154488, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 48013, + "Name_6709": "Intro- Churchill S Speech", + "TrackId_2853": 1287, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 18949518, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 789472, + "Name_6709": "Rime Of The Ancient Mariner", + "TrackId_2853": 1293, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 4410181, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 183666, + "Name_6709": "Wrathchild", + "TrackId_2853": 1300, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 4912986, + "Composer_4614": "Harris/Di Anno", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 204617, + "Name_6709": "Running Free", + "TrackId_2853": 1299, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 5521744, + "Composer_4614": "Smith/Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 229982, + "Name_6709": "Flight Of Icarus", + "TrackId_2853": 1292, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 5561241, + "Composer_4614": "Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 231627, + "Name_6709": "Run To The Hills", + "TrackId_2853": 1298, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 102, + "Bytes_4196": 6289117, + "Composer_4614": "Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 261955, + "Name_6709": "Iron Maiden", + "TrackId_2853": 1297, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 103, + "Bytes_4196": 10361452, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 431542, + "Name_6709": "Fear Of The Dark", + "TrackId_2853": 1314, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 11479913, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 478145, + "Name_6709": "The Evil That Men Do", + "TrackId_2853": 1312, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 4182963, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 174106, + "Name_6709": "Wrathchild", + "TrackId_2853": 1307, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 5118995, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 213106, + "Name_6709": "Can I Play With Madness", + "TrackId_2853": 1309, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 5599853, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 233142, + "Name_6709": "Be Quick Or Be Dead", + "TrackId_2853": 1305, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 5947795, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 247640, + "Name_6709": "Tailgunner", + "TrackId_2853": 1311, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 6831163, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 284447, + "Name_6709": "From Here To Eternity", + "TrackId_2853": 1308, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 7060625, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 294008, + "Name_6709": "The Number Of The Beast", + "TrackId_2853": 1306, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 8091301, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 336953, + "Name_6709": "Wasting Love", + "TrackId_2853": 1310, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 103, + "Bytes_4196": 9905048, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 412525, + "Name_6709": "Afraid To Shoot Strangers", + "TrackId_2853": 1313, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 104, + "Bytes_4196": 10577743, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 440555, + "Name_6709": "Heaven Can Wait", + "TrackId_2853": 1317, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 10751410, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 447791, + "Name_6709": "Hallowed Be Thy Name", + "TrackId_2853": 1321, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 11380851, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 474017, + "Name_6709": "Running Free", + "TrackId_2853": 1324, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 11874875, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 494602, + "Name_6709": "Iron Maiden", + "TrackId_2853": 1320, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 5588560, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 232672, + "Name_6709": "The Trooper", + "TrackId_2853": 1322, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 5665052, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 235859, + "Name_6709": "Run To The Hills", + "TrackId_2853": 1318, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 6302648, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 262426, + "Name_6709": "The Clairvoyant", + "TrackId_2853": 1316, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 7648679, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 318511, + "Name_6709": "Sanctuary", + "TrackId_2853": 1323, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 8122030, + "Composer_4614": "Adrian Smith/Bruce Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 338233, + "Name_6709": "2 Minutes To Midnight", + "TrackId_2853": 1319, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 104, + "Bytes_4196": 9045532, + "Composer_4614": null, + "MediaTypeId_5637": 1, + "Milliseconds_6648": 376711, + "Name_6709": "Bring Your Daughter... To The Slaughter...", + "TrackId_2853": 1315, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 105, + "Bytes_4196": 3672064, + "Composer_4614": "Bruce Dickinson/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 229459, + "Name_6709": "Holy Smoke", + "TrackId_2853": 1326, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 3960832, + "Composer_4614": "Adrian Smith/Bruce Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 247510, + "Name_6709": "Hooks In You", + "TrackId_2853": 1332, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4018088, + "Composer_4614": "David Murray/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 250853, + "Name_6709": "Fates Warning", + "TrackId_2853": 1329, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4071587, + "Composer_4614": "Bruce Dickinson/David Murray", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 254197, + "Name_6709": "Public Enema Number One", + "TrackId_2853": 1328, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4089856, + "Composer_4614": "Bruce Dickinson/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 255582, + "Name_6709": "Tailgunner", + "TrackId_2853": 1325, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4141056, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 258768, + "Name_6709": "The Assassin", + "TrackId_2853": 1330, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4225024, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 263941, + "Name_6709": "No Prayer For The Dying", + "TrackId_2853": 1327, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4407296, + "Composer_4614": "Bruce Dickinson/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 275408, + "Name_6709": "Run Silent Run Deep", + "TrackId_2853": 1331, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 4548608, + "Composer_4614": "Bruce Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 284238, + "Name_6709": "Bring Your Daughter... ...To The Slaughter", + "TrackId_2853": 1333, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 105, + "Bytes_4196": 5322752, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 332617, + "Name_6709": "Mother Russia", + "TrackId_2853": 1334, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 106, + "Bytes_4196": 3306324, + "Composer_4614": "Adrian Smith/Bruce Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 206367, + "Name_6709": "Sun And Steel", + "TrackId_2853": 1342, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 3543040, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 221309, + "Name_6709": "Quest For Fire", + "TrackId_2853": 1341, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 3686400, + "Composer_4614": "Adrian Smith/Bruce Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 230269, + "Name_6709": "Flight Of The Icarus", + "TrackId_2853": 1337, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 4024320, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 251454, + "Name_6709": "The Trooper", + "TrackId_2853": 1339, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 4710400, + "Composer_4614": "David Murray/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 294347, + "Name_6709": "Still Life", + "TrackId_2853": 1340, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 5212160, + "Composer_4614": "Adrian Smith/Bruce Dickinson/Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 325694, + "Name_6709": "Die With Your Boots On", + "TrackId_2853": 1338, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 5914624, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 369554, + "Name_6709": "Where Eagles Dare", + "TrackId_2853": 1335, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 6539264, + "Composer_4614": "Bruce Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 408607, + "Name_6709": "Revelations", + "TrackId_2853": 1336, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 106, + "Bytes_4196": 7129264, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 445283, + "Name_6709": "To Tame A Land", + "TrackId_2853": 1343, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5025": 107, + "Bytes_4196": 19599577, + "Composer_4614": "Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 816509, + "Name_6709": "Rime of the Ancient Mariner", + "TrackId_2853": 1351, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 5828861, + "Composer_4614": "Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 242729, + "Name_6709": "Flash of The Blade", + "TrackId_2853": 1347, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 6074756, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 252891, + "Name_6709": "Losfer Words", + "TrackId_2853": 1346, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 6472088, + "Composer_4614": "Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 269531, + "Name_6709": "Aces High", + "TrackId_2853": 1344, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 7696518, + "Composer_4614": "Dickinson/Smith", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 320548, + "Name_6709": "Back in the Village", + "TrackId_2853": 1349, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 8638809, + "Composer_4614": "Smith/Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 359810, + "Name_6709": "2 Minutes To Midnight", + "TrackId_2853": 1345, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 8800686, + "Composer_4614": "Steve Harris", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 366471, + "Name_6709": "Duelists", + "TrackId_2853": 1348, + "UnitPrice_0732": 0.99 + }, + { + "AlbumId_5025": 107, + "Bytes_4196": 9791106, + "Composer_4614": "Dickinson", + "MediaTypeId_5637": 1, + "Milliseconds_6648": 407823, + "Name_6709": "Powerslave", + "TrackId_2853": 1350, + "UnitPrice_0732": 0.99 + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2b3d954b51b6154a/request.json b/test-snapshots/query/2b3d954b51b6154a/request.json new file mode 100644 index 0000000..c7a01dc --- /dev/null +++ b/test-snapshots/query/2b3d954b51b6154a/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_5025": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_4196": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_4614": { + "type": "column", + "column": "Composer", + "fields": null + }, + "UnitPrice_0732": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "MediaTypeId_5637": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_6648": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_6709": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_2853": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2b421f0c7496eb7c/expected.json b/test-snapshots/query/2b421f0c7496eb7c/expected.json new file mode 100644 index 0000000..a340cbf --- /dev/null +++ b/test-snapshots/query/2b421f0c7496eb7c/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Address_4089": "7727B 41 Ave", + "FirstName_1228": "Steve", + "Title_3400": "Sales Support Agent" + }, + { + "Address_4089": "590 Columbia Boulevard West", + "FirstName_1228": "Robert", + "Title_3400": "IT Staff" + }, + { + "Address_4089": "825 8 Ave SW", + "FirstName_1228": "Nancy", + "Title_3400": "Sales Manager" + }, + { + "Address_4089": "5827 Bowness Road NW", + "FirstName_1228": "Michael", + "Title_3400": "IT Manager" + }, + { + "Address_4089": "683 10 Street SW", + "FirstName_1228": "Margaret", + "Title_3400": "Sales Support Agent" + }, + { + "Address_4089": "923 7 ST NW", + "FirstName_1228": "Laura", + "Title_3400": "IT Staff" + }, + { + "Address_4089": "1111 6 Ave SW", + "FirstName_1228": "Jane", + "Title_3400": "Sales Support Agent" + }, + { + "Address_4089": "11120 Jasper Ave NW", + "FirstName_1228": "Andrew", + "Title_3400": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2b421f0c7496eb7c/request.json b/test-snapshots/query/2b421f0c7496eb7c/request.json new file mode 100644 index 0000000..87b57d6 --- /dev/null +++ b/test-snapshots/query/2b421f0c7496eb7c/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_4089": { + "type": "column", + "column": "Address", + "fields": null + }, + "Title_3400": { + "type": "column", + "column": "Title", + "fields": null + }, + "FirstName_1228": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2b4e20cc906ef3d9/expected.json b/test-snapshots/query/2b4e20cc906ef3d9/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/2b4e20cc906ef3d9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2b4e20cc906ef3d9/request.json b/test-snapshots/query/2b4e20cc906ef3d9/request.json new file mode 100644 index 0000000..29587cf --- /dev/null +++ b/test-snapshots/query/2b4e20cc906ef3d9/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Inject The Venom" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2baf7e40d3aa0c66/expected.json b/test-snapshots/query/2baf7e40d3aa0c66/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/2baf7e40d3aa0c66/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2baf7e40d3aa0c66/request.json b/test-snapshots/query/2baf7e40d3aa0c66/request.json new file mode 100644 index 0000000..623e2b3 --- /dev/null +++ b/test-snapshots/query/2baf7e40d3aa0c66/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2bc539d0b6027777/expected.json b/test-snapshots/query/2bc539d0b6027777/expected.json new file mode 100644 index 0000000..1d3ebf9 --- /dev/null +++ b/test-snapshots/query/2bc539d0b6027777/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2bc539d0b6027777/request.json b/test-snapshots/query/2bc539d0b6027777/request.json new file mode 100644 index 0000000..7668433 --- /dev/null +++ b/test-snapshots/query/2bc539d0b6027777/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "WA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2bdab478a9f306ed/expected.json b/test-snapshots/query/2bdab478a9f306ed/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/2bdab478a9f306ed/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2bdab478a9f306ed/request.json b/test-snapshots/query/2bdab478a9f306ed/request.json new file mode 100644 index 0000000..c485a52 --- /dev/null +++ b/test-snapshots/query/2bdab478a9f306ed/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2bec942b104ddf12/expected.json b/test-snapshots/query/2bec942b104ddf12/expected.json new file mode 100644 index 0000000..8291c4f --- /dev/null +++ b/test-snapshots/query/2bec942b104ddf12/expected.json @@ -0,0 +1,158 @@ +[ + { + "rows": [ + { + "Address_8605": "1111 6 Ave SW", + "BirthDate_4927": "1973-08-29", + "City_2877": "Calgary", + "Country_2659": "Canada", + "Email_1964": "jane@chinookcorp.com", + "EmployeeId_3907": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (403) 262-6712", + "FirstName_9980": "Jane", + "HireDate_7326": "2002-04-01", + "LastName_6075": "Peacock", + "Phone_2184": "+1 (403) 262-3443", + "PostalCode_0736": "T2P 5M5", + "State_8712": "AB", + "Title_2759": "Sales Support Agent" + }, + { + "Address_8605": "11120 Jasper Ave NW", + "BirthDate_4927": "1962-02-18", + "City_2877": "Edmonton", + "Country_2659": "Canada", + "Email_1964": "andrew@chinookcorp.com", + "EmployeeId_3907": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (780) 428-3457", + "FirstName_9980": "Andrew", + "HireDate_7326": "2002-08-14", + "LastName_6075": "Adams", + "Phone_2184": "+1 (780) 428-9482", + "PostalCode_0736": "T5K 2N1", + "State_8712": "AB", + "Title_2759": "General Manager" + }, + { + "Address_8605": "5827 Bowness Road NW", + "BirthDate_4927": "1973-07-01", + "City_2877": "Calgary", + "Country_2659": "Canada", + "Email_1964": "michael@chinookcorp.com", + "EmployeeId_3907": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (403) 246-9899", + "FirstName_9980": "Michael", + "HireDate_7326": "2003-10-17", + "LastName_6075": "Mitchell", + "Phone_2184": "+1 (403) 246-9887", + "PostalCode_0736": "T3B 0C5", + "State_8712": "AB", + "Title_2759": "IT Manager" + }, + { + "Address_8605": "590 Columbia Boulevard West", + "BirthDate_4927": "1970-05-29", + "City_2877": "Lethbridge", + "Country_2659": "Canada", + "Email_1964": "robert@chinookcorp.com", + "EmployeeId_3907": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (403) 456-8485", + "FirstName_9980": "Robert", + "HireDate_7326": "2004-01-02", + "LastName_6075": "King", + "Phone_2184": "+1 (403) 456-9986", + "PostalCode_0736": "T1K 5N8", + "State_8712": "AB", + "Title_2759": "IT Staff" + }, + { + "Address_8605": "683 10 Street SW", + "BirthDate_4927": "1947-09-19", + "City_2877": "Calgary", + "Country_2659": "Canada", + "Email_1964": "margaret@chinookcorp.com", + "EmployeeId_3907": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (403) 263-4289", + "FirstName_9980": "Margaret", + "HireDate_7326": "2003-05-03", + "LastName_6075": "Park", + "Phone_2184": "+1 (403) 263-4423", + "PostalCode_0736": "T2P 5G3", + "State_8712": "AB", + "Title_2759": "Sales Support Agent" + }, + { + "Address_8605": "7727B 41 Ave", + "BirthDate_4927": "1965-03-03", + "City_2877": "Calgary", + "Country_2659": "Canada", + "Email_1964": "steve@chinookcorp.com", + "EmployeeId_3907": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "1 (780) 836-9543", + "FirstName_9980": "Steve", + "HireDate_7326": "2003-10-17", + "LastName_6075": "Johnson", + "Phone_2184": "1 (780) 836-9987", + "PostalCode_0736": "T3B 1Y7", + "State_8712": "AB", + "Title_2759": "Sales Support Agent" + }, + { + "Address_8605": "825 8 Ave SW", + "BirthDate_4927": "1958-12-08", + "City_2877": "Calgary", + "Country_2659": "Canada", + "Email_1964": "nancy@chinookcorp.com", + "EmployeeId_3907": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (403) 262-3322", + "FirstName_9980": "Nancy", + "HireDate_7326": "2002-05-01", + "LastName_6075": "Edwards", + "Phone_2184": "+1 (403) 262-3443", + "PostalCode_0736": "T2P 2T3", + "State_8712": "AB", + "Title_2759": "Sales Manager" + }, + { + "Address_8605": "923 7 ST NW", + "BirthDate_4927": "1968-01-09", + "City_2877": "Lethbridge", + "Country_2659": "Canada", + "Email_1964": "laura@chinookcorp.com", + "EmployeeId_3907": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_7146": "+1 (403) 467-8772", + "FirstName_9980": "Laura", + "HireDate_7326": "2004-03-04", + "LastName_6075": "Callahan", + "Phone_2184": "+1 (403) 467-3351", + "PostalCode_0736": "T1H 1Y8", + "State_8712": "AB", + "Title_2759": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2bec942b104ddf12/request.json b/test-snapshots/query/2bec942b104ddf12/request.json new file mode 100644 index 0000000..4df27e4 --- /dev/null +++ b/test-snapshots/query/2bec942b104ddf12/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_8605": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_4927": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_2877": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2659": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_1964": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_3907": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_7146": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_9980": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_7326": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6075": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_2184": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_0736": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Title_2759": { + "type": "column", + "column": "Title", + "fields": null + }, + "State_8712": { + "type": "column", + "column": "State", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2bf67aa73172d722/expected.json b/test-snapshots/query/2bf67aa73172d722/expected.json new file mode 100644 index 0000000..09c8083 --- /dev/null +++ b/test-snapshots/query/2bf67aa73172d722/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "City_2440": "Boston", + "CustomerId_0987": 23, + "Fax_9983": null + }, + { + "City_2440": "Chicago", + "CustomerId_0987": 24, + "Fax_9983": null + }, + { + "City_2440": "Cupertino", + "CustomerId_0987": 19, + "Fax_9983": "+1 (408) 996-1011" + }, + { + "City_2440": "Fort Worth", + "CustomerId_0987": 26, + "Fax_9983": null + }, + { + "City_2440": "Madison", + "CustomerId_0987": 25, + "Fax_9983": null + }, + { + "City_2440": "Mountain View", + "CustomerId_0987": 16, + "Fax_9983": "+1 (650) 253-0000" + }, + { + "City_2440": "Mountain View", + "CustomerId_0987": 20, + "Fax_9983": null + }, + { + "City_2440": "New York", + "CustomerId_0987": 18, + "Fax_9983": "+1 (212) 221-4679" + }, + { + "City_2440": "Orlando", + "CustomerId_0987": 22, + "Fax_9983": null + }, + { + "City_2440": "Redmond", + "CustomerId_0987": 17, + "Fax_9983": "+1 (425) 882-8081" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2bf67aa73172d722/request.json b/test-snapshots/query/2bf67aa73172d722/request.json new file mode 100644 index 0000000..91beb31 --- /dev/null +++ b/test-snapshots/query/2bf67aa73172d722/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Fax_9983": { + "type": "column", + "column": "Fax", + "fields": null + }, + "City_2440": { + "type": "column", + "column": "City", + "fields": null + }, + "CustomerId_0987": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2c09830ed2738225/expected.json b/test-snapshots/query/2c09830ed2738225/expected.json new file mode 100644 index 0000000..a95fc1d --- /dev/null +++ b/test-snapshots/query/2c09830ed2738225/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2c09830ed2738225/request.json b/test-snapshots/query/2c09830ed2738225/request.json new file mode 100644 index 0000000..ae9ee3b --- /dev/null +++ b/test-snapshots/query/2c09830ed2738225/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 46 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2c47d96623110373/expected.json b/test-snapshots/query/2c47d96623110373/expected.json new file mode 100644 index 0000000..4403c75 --- /dev/null +++ b/test-snapshots/query/2c47d96623110373/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceId_6995": 1, + "TrackId_9624": 4 + }, + { + "InvoiceId_6995": 1, + "TrackId_9624": 2 + }, + { + "InvoiceId_6995": 2, + "TrackId_9624": 12 + }, + { + "InvoiceId_6995": 2, + "TrackId_9624": 10 + }, + { + "InvoiceId_6995": 2, + "TrackId_9624": 8 + }, + { + "InvoiceId_6995": 2, + "TrackId_9624": 6 + }, + { + "InvoiceId_6995": 3, + "TrackId_9624": 36 + }, + { + "InvoiceId_6995": 3, + "TrackId_9624": 32 + }, + { + "InvoiceId_6995": 3, + "TrackId_9624": 28 + }, + { + "InvoiceId_6995": 3, + "TrackId_9624": 24 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2c47d96623110373/request.json b/test-snapshots/query/2c47d96623110373/request.json new file mode 100644 index 0000000..4e731ee --- /dev/null +++ b/test-snapshots/query/2c47d96623110373/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_6995": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "TrackId_9624": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2c4d732d07e75343/expected.json b/test-snapshots/query/2c4d732d07e75343/expected.json new file mode 100644 index 0000000..e88e1d5 --- /dev/null +++ b/test-snapshots/query/2c4d732d07e75343/expected.json @@ -0,0 +1,161 @@ +[ + { + "rows": [ + { + "Composer_6671": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 172, + "InvoiceLineId": 925, + "Quantity": 1, + "TrackId": 2107, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 172120, + "TrackId_1713": 2107, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 277, + "InvoiceLineId": 1499, + "Quantity": 1, + "TrackId": 2108, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 66, + "InvoiceLineId": 350, + "Quantity": 1, + "TrackId": 2108, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 357067, + "TrackId_1713": 2108, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 382, + "InvoiceLineId": 2073, + "Quantity": 1, + "TrackId": 2109, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 176352, + "TrackId_1713": 2109, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "A. Jamal", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 276871, + "TrackId_1713": 1908, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "A.Bouchard/J.Bouchard/S.Pearlman", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 332, + "InvoiceLineId": 1794, + "Quantity": 1, + "TrackId": 415, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 397531, + "TrackId_1713": 415, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "A.Isbell/A.Jones/O.Redding", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 186, + "InvoiceLineId": 1004, + "Quantity": 1, + "TrackId": 2589, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 206994, + "TrackId_1713": 2589, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 267728, + "TrackId_1713": 18, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 323761, + "TrackId_1713": 22, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 366654, + "TrackId_1713": 17, + "UnitPrice_1133": 0.99 + }, + { + "Composer_6671": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 109, + "InvoiceLineId": 583, + "Quantity": 1, + "TrackId": 19, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_6898": 1, + "Milliseconds_5791": 325041, + "TrackId_1713": 19, + "UnitPrice_1133": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2c4d732d07e75343/request.json b/test-snapshots/query/2c4d732d07e75343/request.json new file mode 100644 index 0000000..34052c8 --- /dev/null +++ b/test-snapshots/query/2c4d732d07e75343/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "TrackId_1713": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_1133": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Composer_6671": { + "type": "column", + "column": "Composer", + "fields": null + }, + "Milliseconds_5791": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "MediaTypeId_6898": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2c66298df9693ebd/expected.json b/test-snapshots/query/2c66298df9693ebd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2c66298df9693ebd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2c66298df9693ebd/request.json b/test-snapshots/query/2c66298df9693ebd/request.json new file mode 100644 index 0000000..8172f29 --- /dev/null +++ b/test-snapshots/query/2c66298df9693ebd/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2c92df6922688409/expected.json b/test-snapshots/query/2c92df6922688409/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2c92df6922688409/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2c92df6922688409/request.json b/test-snapshots/query/2c92df6922688409/request.json new file mode 100644 index 0000000..9c1f212 --- /dev/null +++ b/test-snapshots/query/2c92df6922688409/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2c972e5ce74e87ca/expected.json b/test-snapshots/query/2c972e5ce74e87ca/expected.json new file mode 100644 index 0000000..65fa666 --- /dev/null +++ b/test-snapshots/query/2c972e5ce74e87ca/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 10, + "Name": "Billy Cobham" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 100, + "Name": "Lenny Kravitz" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 101, + "Name": "Lulu Santos" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 101, + "Name": "Lulu Santos" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 102, + "Name": "Marillion" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 103, + "Name": "Marisa Monte" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 104, + "Name": "Marvin Gaye" + } + ] + } + }, + { + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 105, + "Name": "Men At Work" + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2c972e5ce74e87ca/request.json b/test-snapshots/query/2c972e5ce74e87ca/request.json new file mode 100644 index 0000000..fbcf46a --- /dev/null +++ b/test-snapshots/query/2c972e5ce74e87ca/request.json @@ -0,0 +1,39 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2cb5950197e88067/expected.json b/test-snapshots/query/2cb5950197e88067/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2cb5950197e88067/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2cb5950197e88067/request.json b/test-snapshots/query/2cb5950197e88067/request.json new file mode 100644 index 0000000..e20ab5e --- /dev/null +++ b/test-snapshots/query/2cb5950197e88067/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2cc0c0db0f48d30a/expected.json b/test-snapshots/query/2cc0c0db0f48d30a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2cc0c0db0f48d30a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2cc0c0db0f48d30a/request.json b/test-snapshots/query/2cc0c0db0f48d30a/request.json new file mode 100644 index 0000000..cade666 --- /dev/null +++ b/test-snapshots/query/2cc0c0db0f48d30a/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Hughes" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tim" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2cccb4b41c8ae958/expected.json b/test-snapshots/query/2cccb4b41c8ae958/expected.json new file mode 100644 index 0000000..d50dc8c --- /dev/null +++ b/test-snapshots/query/2cccb4b41c8ae958/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_7323": 1, + "Name_8726": "MPEG audio file" + }, + { + "MediaTypeId_7323": 2, + "Name_8726": "Protected AAC audio file" + }, + { + "MediaTypeId_7323": 3, + "Name_8726": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_7323": 4, + "Name_8726": "Purchased AAC audio file" + }, + { + "MediaTypeId_7323": 5, + "Name_8726": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2cccb4b41c8ae958/request.json b/test-snapshots/query/2cccb4b41c8ae958/request.json new file mode 100644 index 0000000..090c672 --- /dev/null +++ b/test-snapshots/query/2cccb4b41c8ae958/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_7323": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_8726": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2cdc46a4071fdfe0/expected.json b/test-snapshots/query/2cdc46a4071fdfe0/expected.json new file mode 100644 index 0000000..cd77d7c --- /dev/null +++ b/test-snapshots/query/2cdc46a4071fdfe0/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2cdc46a4071fdfe0/request.json b/test-snapshots/query/2cdc46a4071fdfe0/request.json new file mode 100644 index 0000000..7816313 --- /dev/null +++ b/test-snapshots/query/2cdc46a4071fdfe0/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2cfc9bbbc969f879/expected.json b/test-snapshots/query/2cfc9bbbc969f879/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2cfc9bbbc969f879/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2cfc9bbbc969f879/request.json b/test-snapshots/query/2cfc9bbbc969f879/request.json new file mode 100644 index 0000000..868670d --- /dev/null +++ b/test-snapshots/query/2cfc9bbbc969f879/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 5M5" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Michael" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2d08a3a45ac3512a/expected.json b/test-snapshots/query/2d08a3a45ac3512a/expected.json new file mode 100644 index 0000000..5d3fad9 --- /dev/null +++ b/test-snapshots/query/2d08a3a45ac3512a/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2d08a3a45ac3512a/request.json b/test-snapshots/query/2d08a3a45ac3512a/request.json new file mode 100644 index 0000000..d3606a1 --- /dev/null +++ b/test-snapshots/query/2d08a3a45ac3512a/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 246-9887" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2d484be1298a16e5/expected.json b/test-snapshots/query/2d484be1298a16e5/expected.json new file mode 100644 index 0000000..bf60677 --- /dev/null +++ b/test-snapshots/query/2d484be1298a16e5/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_2352": 1, + "Title_2957": "For Those About To Rock We Salute You" + }, + { + "AlbumId_2352": 4, + "Title_2957": "Let There Be Rock" + }, + { + "AlbumId_2352": 2, + "Title_2957": "Balls to the Wall" + }, + { + "AlbumId_2352": 3, + "Title_2957": "Restless and Wild" + }, + { + "AlbumId_2352": 5, + "Title_2957": "Big Ones" + }, + { + "AlbumId_2352": 6, + "Title_2957": "Jagged Little Pill" + }, + { + "AlbumId_2352": 7, + "Title_2957": "Facelift" + }, + { + "AlbumId_2352": 34, + "Title_2957": "Chill: Brazil (Disc 2)" + }, + { + "AlbumId_2352": 8, + "Title_2957": "Warner 25 Anos" + }, + { + "AlbumId_2352": 9, + "Title_2957": "Plays Metallica By Four Cellos" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2d484be1298a16e5/request.json b/test-snapshots/query/2d484be1298a16e5/request.json new file mode 100644 index 0000000..900c369 --- /dev/null +++ b/test-snapshots/query/2d484be1298a16e5/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_2352": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_2957": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2d53f6c1f395aa14/expected.json b/test-snapshots/query/2d53f6c1f395aa14/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2d53f6c1f395aa14/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2d53f6c1f395aa14/request.json b/test-snapshots/query/2d53f6c1f395aa14/request.json new file mode 100644 index 0000000..19f5c4b --- /dev/null +++ b/test-snapshots/query/2d53f6c1f395aa14/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (780) 428-9482" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2dc54a058e436d4c/expected.json b/test-snapshots/query/2dc54a058e436d4c/expected.json new file mode 100644 index 0000000..3b6590c --- /dev/null +++ b/test-snapshots/query/2dc54a058e436d4c/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_6545": 208, + "ArtistId_8576": 136 + }, + { + "AlbumId_6545": 240, + "ArtistId_8576": 150 + }, + { + "AlbumId_6545": 267, + "ArtistId_8576": 202 + }, + { + "AlbumId_6545": 334, + "ArtistId_8576": 264 + }, + { + "AlbumId_6545": 8, + "ArtistId_8576": 6 + }, + { + "AlbumId_6545": 239, + "ArtistId_8576": 150 + }, + { + "AlbumId_6545": 175, + "ArtistId_8576": 115 + }, + { + "AlbumId_6545": 287, + "ArtistId_8576": 221 + }, + { + "AlbumId_6545": 182, + "ArtistId_8576": 118 + }, + { + "AlbumId_6545": 53, + "ArtistId_8576": 21 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2dc54a058e436d4c/request.json b/test-snapshots/query/2dc54a058e436d4c/request.json new file mode 100644 index 0000000..b484449 --- /dev/null +++ b/test-snapshots/query/2dc54a058e436d4c/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_6545": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_8576": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2dd712e34b9c2b6d/expected.json b/test-snapshots/query/2dd712e34b9c2b6d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2dd712e34b9c2b6d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2dd712e34b9c2b6d/request.json b/test-snapshots/query/2dd712e34b9c2b6d/request.json new file mode 100644 index 0000000..7793fcc --- /dev/null +++ b/test-snapshots/query/2dd712e34b9c2b6d/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1033 N Park Ave" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edinburgh " + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Dubois" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2dda5cc1588f2893/expected.json b/test-snapshots/query/2dda5cc1588f2893/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2dda5cc1588f2893/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2dda5cc1588f2893/request.json b/test-snapshots/query/2dda5cc1588f2893/request.json new file mode 100644 index 0000000..20137ad --- /dev/null +++ b/test-snapshots/query/2dda5cc1588f2893/request.json @@ -0,0 +1,91 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2deb896a71a77b90/expected.json b/test-snapshots/query/2deb896a71a77b90/expected.json new file mode 100644 index 0000000..a29d552 --- /dev/null +++ b/test-snapshots/query/2deb896a71a77b90/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "City_2600": "Bordeaux", + "Email_0241": "wyatt.girard@yahoo.fr", + "FirstName_8573": "Wyatt" + }, + { + "City_2600": "Cupertino", + "Email_0241": "tgoyer@apple.com", + "FirstName_8573": "Tim" + }, + { + "City_2600": "Helsinki", + "Email_0241": "terhi.hamalainen@apple.fi", + "FirstName_8573": "Terhi" + }, + { + "City_2600": "Rio de Janeiro", + "Email_0241": "roberto.almeida@riotur.gov.br", + "FirstName_8573": "Roberto" + }, + { + "City_2600": "Toronto", + "Email_0241": "robbrown@shaw.ca", + "FirstName_8573": "Robert" + }, + { + "City_2600": "Bangalore", + "Email_0241": "puja_srivastava@yahoo.in", + "FirstName_8573": "Puja" + }, + { + "City_2600": "London", + "Email_0241": "phil.hughes@gmail.com", + "FirstName_8573": "Phil" + }, + { + "City_2600": "Berlin", + "Email_0241": "nschroder@surfeu.de", + "FirstName_8573": "Niklas" + }, + { + "City_2600": "New York", + "Email_0241": "michelleb@aol.com", + "FirstName_8573": "Michelle" + }, + { + "City_2600": "Delhi", + "Email_0241": "manoj.pareek@rediff.com", + "FirstName_8573": "Manoj" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2deb896a71a77b90/request.json b/test-snapshots/query/2deb896a71a77b90/request.json new file mode 100644 index 0000000..58e0978 --- /dev/null +++ b/test-snapshots/query/2deb896a71a77b90/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "FirstName_8573": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "City_2600": { + "type": "column", + "column": "City", + "fields": null + }, + "Email_0241": { + "type": "column", + "column": "Email", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2e0163cacf0dd934/expected.json b/test-snapshots/query/2e0163cacf0dd934/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2e0163cacf0dd934/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e0163cacf0dd934/request.json b/test-snapshots/query/2e0163cacf0dd934/request.json new file mode 100644 index 0000000..ca40a07 --- /dev/null +++ b/test-snapshots/query/2e0163cacf0dd934/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2e1b6682650ecfa3/expected.json b/test-snapshots/query/2e1b6682650ecfa3/expected.json new file mode 100644 index 0000000..a2a962b --- /dev/null +++ b/test-snapshots/query/2e1b6682650ecfa3/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_5723": 1, + "Bytes_7768": 11170334, + "Composer_4212": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_5221": 1, + "MediaTypeId_7301": 1, + "Milliseconds_6735": 343719, + "Name_2771": "For Those About To Rock (We Salute You)", + "TrackId_0687": 1, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 2, + "Bytes_7768": 5510424, + "Composer_4212": null, + "GenreId_5221": 1, + "MediaTypeId_7301": 2, + "Milliseconds_6735": 342562, + "Name_2771": "Balls to the Wall", + "TrackId_0687": 2, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 3, + "Bytes_7768": 3990994, + "Composer_4212": "F. Baltes, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId_5221": 1, + "MediaTypeId_7301": 2, + "Milliseconds_6735": 230619, + "Name_2771": "Fast As a Shark", + "TrackId_0687": 3, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 3, + "Bytes_7768": 4331779, + "Composer_4212": "F. Baltes, R.A. Smith-Diesel, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId_5221": 1, + "MediaTypeId_7301": 2, + "Milliseconds_6735": 252051, + "Name_2771": "Restless and Wild", + "TrackId_0687": 4, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 3, + "Bytes_7768": 6290521, + "Composer_4212": "Deaffy & R.A. Smith-Diesel", + "GenreId_5221": 1, + "MediaTypeId_7301": 2, + "Milliseconds_6735": 375418, + "Name_2771": "Princess of the Dawn", + "TrackId_0687": 5, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 1, + "Bytes_7768": 6713451, + "Composer_4212": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_5221": 1, + "MediaTypeId_7301": 1, + "Milliseconds_6735": 205662, + "Name_2771": "Put The Finger On You", + "TrackId_0687": 6, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 1, + "Bytes_7768": 7636561, + "Composer_4212": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_5221": 1, + "MediaTypeId_7301": 1, + "Milliseconds_6735": 233926, + "Name_2771": "Let's Get It Up", + "TrackId_0687": 7, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 1, + "Bytes_7768": 6852860, + "Composer_4212": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_5221": 1, + "MediaTypeId_7301": 1, + "Milliseconds_6735": 210834, + "Name_2771": "Inject The Venom", + "TrackId_0687": 8, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 1, + "Bytes_7768": 6599424, + "Composer_4212": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_5221": 1, + "MediaTypeId_7301": 1, + "Milliseconds_6735": 203102, + "Name_2771": "Snowballed", + "TrackId_0687": 9, + "UnitPrice_4953": 0.99 + }, + { + "AlbumId_5723": 1, + "Bytes_7768": 8611245, + "Composer_4212": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_5221": 1, + "MediaTypeId_7301": 1, + "Milliseconds_6735": 263497, + "Name_2771": "Evil Walks", + "TrackId_0687": 10, + "UnitPrice_4953": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e1b6682650ecfa3/request.json b/test-snapshots/query/2e1b6682650ecfa3/request.json new file mode 100644 index 0000000..250b731 --- /dev/null +++ b/test-snapshots/query/2e1b6682650ecfa3/request.json @@ -0,0 +1,67 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_5723": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7768": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_4212": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_5221": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_7301": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_6735": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_2771": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_0687": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_4953": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2e29e830056d317c/expected.json b/test-snapshots/query/2e29e830056d317c/expected.json new file mode 100644 index 0000000..599cf59 --- /dev/null +++ b/test-snapshots/query/2e29e830056d317c/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_8787": "7727B 41 Ave", + "BirthDate_0196": "1965-03-03", + "City_6413": "Calgary", + "Country_7314": "Canada", + "Email_9769": "steve@chinookcorp.com", + "EmployeeId_2649": 5, + "Fax_7141": "1 (780) 836-9543", + "FirstName_9933": "Steve", + "HireDate_1560": "2003-10-17", + "LastName_1258": "Johnson", + "Phone_1143": "1 (780) 836-9987", + "PostalCode_3617": "T3B 1Y7", + "ReportsTo_2920": 2 + }, + { + "Address_8787": "590 Columbia Boulevard West", + "BirthDate_0196": "1970-05-29", + "City_6413": "Lethbridge", + "Country_7314": "Canada", + "Email_9769": "robert@chinookcorp.com", + "EmployeeId_2649": 7, + "Fax_7141": "+1 (403) 456-8485", + "FirstName_9933": "Robert", + "HireDate_1560": "2004-01-02", + "LastName_1258": "King", + "Phone_1143": "+1 (403) 456-9986", + "PostalCode_3617": "T1K 5N8", + "ReportsTo_2920": 6 + }, + { + "Address_8787": "825 8 Ave SW", + "BirthDate_0196": "1958-12-08", + "City_6413": "Calgary", + "Country_7314": "Canada", + "Email_9769": "nancy@chinookcorp.com", + "EmployeeId_2649": 2, + "Fax_7141": "+1 (403) 262-3322", + "FirstName_9933": "Nancy", + "HireDate_1560": "2002-05-01", + "LastName_1258": "Edwards", + "Phone_1143": "+1 (403) 262-3443", + "PostalCode_3617": "T2P 2T3", + "ReportsTo_2920": 1 + }, + { + "Address_8787": "5827 Bowness Road NW", + "BirthDate_0196": "1973-07-01", + "City_6413": "Calgary", + "Country_7314": "Canada", + "Email_9769": "michael@chinookcorp.com", + "EmployeeId_2649": 6, + "Fax_7141": "+1 (403) 246-9899", + "FirstName_9933": "Michael", + "HireDate_1560": "2003-10-17", + "LastName_1258": "Mitchell", + "Phone_1143": "+1 (403) 246-9887", + "PostalCode_3617": "T3B 0C5", + "ReportsTo_2920": 1 + }, + { + "Address_8787": "683 10 Street SW", + "BirthDate_0196": "1947-09-19", + "City_6413": "Calgary", + "Country_7314": "Canada", + "Email_9769": "margaret@chinookcorp.com", + "EmployeeId_2649": 4, + "Fax_7141": "+1 (403) 263-4289", + "FirstName_9933": "Margaret", + "HireDate_1560": "2003-05-03", + "LastName_1258": "Park", + "Phone_1143": "+1 (403) 263-4423", + "PostalCode_3617": "T2P 5G3", + "ReportsTo_2920": 2 + }, + { + "Address_8787": "923 7 ST NW", + "BirthDate_0196": "1968-01-09", + "City_6413": "Lethbridge", + "Country_7314": "Canada", + "Email_9769": "laura@chinookcorp.com", + "EmployeeId_2649": 8, + "Fax_7141": "+1 (403) 467-8772", + "FirstName_9933": "Laura", + "HireDate_1560": "2004-03-04", + "LastName_1258": "Callahan", + "Phone_1143": "+1 (403) 467-3351", + "PostalCode_3617": "T1H 1Y8", + "ReportsTo_2920": 6 + }, + { + "Address_8787": "1111 6 Ave SW", + "BirthDate_0196": "1973-08-29", + "City_6413": "Calgary", + "Country_7314": "Canada", + "Email_9769": "jane@chinookcorp.com", + "EmployeeId_2649": 3, + "Fax_7141": "+1 (403) 262-6712", + "FirstName_9933": "Jane", + "HireDate_1560": "2002-04-01", + "LastName_1258": "Peacock", + "Phone_1143": "+1 (403) 262-3443", + "PostalCode_3617": "T2P 5M5", + "ReportsTo_2920": 2 + }, + { + "Address_8787": "11120 Jasper Ave NW", + "BirthDate_0196": "1962-02-18", + "City_6413": "Edmonton", + "Country_7314": "Canada", + "Email_9769": "andrew@chinookcorp.com", + "EmployeeId_2649": 1, + "Fax_7141": "+1 (780) 428-3457", + "FirstName_9933": "Andrew", + "HireDate_1560": "2002-08-14", + "LastName_1258": "Adams", + "Phone_1143": "+1 (780) 428-9482", + "PostalCode_3617": "T5K 2N1", + "ReportsTo_2920": null + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e29e830056d317c/request.json b/test-snapshots/query/2e29e830056d317c/request.json new file mode 100644 index 0000000..f79a28b --- /dev/null +++ b/test-snapshots/query/2e29e830056d317c/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_8787": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_0196": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_6413": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_7314": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_9769": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_2649": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_7141": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_9933": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_1560": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_1258": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1143": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_3617": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_2920": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2e2ba06103abcced/expected.json b/test-snapshots/query/2e2ba06103abcced/expected.json new file mode 100644 index 0000000..bc9da5b --- /dev/null +++ b/test-snapshots/query/2e2ba06103abcced/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-03-11" + } + ] + }, + "InvoiceId": 98, + "InvoiceLineId": 531, + "Quantity": 1, + "TrackId": 3247, + "UnitPrice": 1.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-03-11" + } + ] + }, + "InvoiceId": 98, + "InvoiceLineId": 532, + "Quantity": 1, + "TrackId": 3248, + "UnitPrice": 1.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-06-13" + } + ] + }, + "InvoiceId": 121, + "InvoiceLineId": 649, + "Quantity": 1, + "TrackId": 447, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-06-13" + } + ] + }, + "InvoiceId": 121, + "InvoiceLineId": 650, + "Quantity": 1, + "TrackId": 449, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-06-13" + } + ] + }, + "InvoiceId": 121, + "InvoiceLineId": 651, + "Quantity": 1, + "TrackId": 451, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-06-13" + } + ] + }, + "InvoiceId": 121, + "InvoiceLineId": 652, + "Quantity": 1, + "TrackId": 453, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-09-15" + } + ] + }, + "InvoiceId": 143, + "InvoiceLineId": 767, + "Quantity": 1, + "TrackId": 1153, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-09-15" + } + ] + }, + "InvoiceId": 143, + "InvoiceLineId": 768, + "Quantity": 1, + "TrackId": 1157, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-09-15" + } + ] + }, + "InvoiceId": 143, + "InvoiceLineId": 769, + "Quantity": 1, + "TrackId": 1161, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "CustomerId_2651": 1, + "InvoiceDate_3267": "2010-09-15" + } + ] + }, + "InvoiceId": 143, + "InvoiceLineId": 770, + "Quantity": 1, + "TrackId": 1165, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e2ba06103abcced/request.json b/test-snapshots/query/2e2ba06103abcced/request.json new file mode 100644 index 0000000..b41632d --- /dev/null +++ b/test-snapshots/query/2e2ba06103abcced/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceDate_3267": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "CustomerId_2651": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2e4ee4e0ebbf2150/expected.json b/test-snapshots/query/2e4ee4e0ebbf2150/expected.json new file mode 100644 index 0000000..551524c --- /dev/null +++ b/test-snapshots/query/2e4ee4e0ebbf2150/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9721373, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 293276, + "Name": "Razor", + "TrackId": 1008, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e4ee4e0ebbf2150/request.json b/test-snapshots/query/2e4ee4e0ebbf2150/request.json new file mode 100644 index 0000000..ddab211 --- /dev/null +++ b/test-snapshots/query/2e4ee4e0ebbf2150/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2e54d2822bfe04fa/expected.json b/test-snapshots/query/2e54d2822bfe04fa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2e54d2822bfe04fa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e54d2822bfe04fa/request.json b/test-snapshots/query/2e54d2822bfe04fa/request.json new file mode 100644 index 0000000..4eae4ea --- /dev/null +++ b/test-snapshots/query/2e54d2822bfe04fa/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2e621bc768f037ec/expected.json b/test-snapshots/query/2e621bc768f037ec/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2e621bc768f037ec/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2e621bc768f037ec/request.json b/test-snapshots/query/2e621bc768f037ec/request.json new file mode 100644 index 0000000..d4ef860 --- /dev/null +++ b/test-snapshots/query/2e621bc768f037ec/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2eb36bb3e100b0f8/expected.json b/test-snapshots/query/2eb36bb3e100b0f8/expected.json new file mode 100644 index 0000000..edb37cf --- /dev/null +++ b/test-snapshots/query/2eb36bb3e100b0f8/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_6444": 4 + }, + { + "MediaTypeId_6444": 3 + }, + { + "MediaTypeId_6444": 2 + }, + { + "MediaTypeId_6444": 1 + }, + { + "MediaTypeId_6444": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2eb36bb3e100b0f8/request.json b/test-snapshots/query/2eb36bb3e100b0f8/request.json new file mode 100644 index 0000000..134b11f --- /dev/null +++ b/test-snapshots/query/2eb36bb3e100b0f8/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_6444": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2ee5bc6c8ae8c977/expected.json b/test-snapshots/query/2ee5bc6c8ae8c977/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/2ee5bc6c8ae8c977/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2ee5bc6c8ae8c977/request.json b/test-snapshots/query/2ee5bc6c8ae8c977/request.json new file mode 100644 index 0000000..0d2d17d --- /dev/null +++ b/test-snapshots/query/2ee5bc6c8ae8c977/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2f4d17979309ff72/expected.json b/test-snapshots/query/2f4d17979309ff72/expected.json new file mode 100644 index 0000000..5fae296 --- /dev/null +++ b/test-snapshots/query/2f4d17979309ff72/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1154, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2f4d17979309ff72/request.json b/test-snapshots/query/2f4d17979309ff72/request.json new file mode 100644 index 0000000..8737598 --- /dev/null +++ b/test-snapshots/query/2f4d17979309ff72/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2f5f0b3efd8bd4de/expected.json b/test-snapshots/query/2f5f0b3efd8bd4de/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/2f5f0b3efd8bd4de/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2f5f0b3efd8bd4de/request.json b/test-snapshots/query/2f5f0b3efd8bd4de/request.json new file mode 100644 index 0000000..7075e3b --- /dev/null +++ b/test-snapshots/query/2f5f0b3efd8bd4de/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2f7d46701f7cbf6b/expected.json b/test-snapshots/query/2f7d46701f7cbf6b/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/2f7d46701f7cbf6b/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2f7d46701f7cbf6b/request.json b/test-snapshots/query/2f7d46701f7cbf6b/request.json new file mode 100644 index 0000000..4ac2651 --- /dev/null +++ b/test-snapshots/query/2f7d46701f7cbf6b/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2f8e5b2a34810718/expected.json b/test-snapshots/query/2f8e5b2a34810718/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/2f8e5b2a34810718/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2f8e5b2a34810718/request.json b/test-snapshots/query/2f8e5b2a34810718/request.json new file mode 100644 index 0000000..46c5cd2 --- /dev/null +++ b/test-snapshots/query/2f8e5b2a34810718/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2f9bd8f07139bded/expected.json b/test-snapshots/query/2f9bd8f07139bded/expected.json new file mode 100644 index 0000000..0531eda --- /dev/null +++ b/test-snapshots/query/2f9bd8f07139bded/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_7265": 1, + "Name_0259": "Rock" + }, + { + "GenreId_7265": 2, + "Name_0259": "Jazz" + }, + { + "GenreId_7265": 3, + "Name_0259": "Metal" + }, + { + "GenreId_7265": 4, + "Name_0259": "Alternative & Punk" + }, + { + "GenreId_7265": 5, + "Name_0259": "Rock And Roll" + }, + { + "GenreId_7265": 6, + "Name_0259": "Blues" + }, + { + "GenreId_7265": 7, + "Name_0259": "Latin" + }, + { + "GenreId_7265": 8, + "Name_0259": "Reggae" + }, + { + "GenreId_7265": 9, + "Name_0259": "Pop" + }, + { + "GenreId_7265": 10, + "Name_0259": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2f9bd8f07139bded/request.json b/test-snapshots/query/2f9bd8f07139bded/request.json new file mode 100644 index 0000000..e1e0e19 --- /dev/null +++ b/test-snapshots/query/2f9bd8f07139bded/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_7265": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_0259": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2f9d46d7e60bf9d2/expected.json b/test-snapshots/query/2f9d46d7e60bf9d2/expected.json new file mode 100644 index 0000000..c852662 --- /dev/null +++ b/test-snapshots/query/2f9d46d7e60bf9d2/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 102, + "Name": "Marillion" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2f9d46d7e60bf9d2/request.json b/test-snapshots/query/2f9d46d7e60bf9d2/request.json new file mode 100644 index 0000000..bb9ab12 --- /dev/null +++ b/test-snapshots/query/2f9d46d7e60bf9d2/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/2fa7c1df63582360/expected.json b/test-snapshots/query/2fa7c1df63582360/expected.json new file mode 100644 index 0000000..6a37818 --- /dev/null +++ b/test-snapshots/query/2fa7c1df63582360/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 6 + }, + { + "PlaylistId": 8, + "TrackId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2fa7c1df63582360/request.json b/test-snapshots/query/2fa7c1df63582360/request.json new file mode 100644 index 0000000..23795ff --- /dev/null +++ b/test-snapshots/query/2fa7c1df63582360/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2fb16af8cad4d8ee/expected.json b/test-snapshots/query/2fb16af8cad4d8ee/expected.json new file mode 100644 index 0000000..cd84ee9 --- /dev/null +++ b/test-snapshots/query/2fb16af8cad4d8ee/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 1 + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 8 + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_9064": 90 + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2fb16af8cad4d8ee/request.json b/test-snapshots/query/2fb16af8cad4d8ee/request.json new file mode 100644 index 0000000..ba5e3f0 --- /dev/null +++ b/test-snapshots/query/2fb16af8cad4d8ee/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId_9064": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2fc122fab31fe687/expected.json b/test-snapshots/query/2fc122fab31fe687/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/2fc122fab31fe687/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2fc122fab31fe687/request.json b/test-snapshots/query/2fc122fab31fe687/request.json new file mode 100644 index 0000000..4ac33e3 --- /dev/null +++ b/test-snapshots/query/2fc122fab31fe687/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2fc6c523a53d823e/expected.json b/test-snapshots/query/2fc6c523a53d823e/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/2fc6c523a53d823e/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2fc6c523a53d823e/request.json b/test-snapshots/query/2fc6c523a53d823e/request.json new file mode 100644 index 0000000..408080e --- /dev/null +++ b/test-snapshots/query/2fc6c523a53d823e/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/2fe02a1bc4c3d614/expected.json b/test-snapshots/query/2fe02a1bc4c3d614/expected.json new file mode 100644 index 0000000..dbc8564 --- /dev/null +++ b/test-snapshots/query/2fe02a1bc4c3d614/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "AlbumId_2388": 317, + "Composer_1578": "Wolfgang Amadeus Mozart", + "Milliseconds_9555": 174813, + "Name_4125": "Die Zauberflöte, K.620: \"Der Hölle Rache Kocht in Meinem Herze\"", + "TrackId_6305": 3451, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 342, + "Composer_1578": "Pietro Antonio Locatelli", + "Milliseconds_9555": 493573, + "Name_4125": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId_6305": 3498, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 324, + "Composer_1578": "Ludwig van Beethoven", + "Milliseconds_9555": 339567, + "Name_4125": "Prometheus Overture, Op. 43", + "TrackId_6305": 3479, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 283, + "Composer_1578": "Franz Joseph Haydn", + "Milliseconds_9555": 306687, + "Name_4125": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId_6305": 3414, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 325, + "Composer_1578": "Béla Bartók", + "Milliseconds_9555": 299350, + "Name_4125": "Sonata for Solo Violin: IV: Presto", + "TrackId_6305": 3480, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 294, + "Composer_1578": "Samuel Barber", + "Milliseconds_9555": 596519, + "Name_4125": "Adagio for Strings from the String Quartet, Op. 11", + "TrackId_6305": 3425, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 279, + "Composer_1578": "George Frideric Handel", + "Milliseconds_9555": 582029, + "Name_4125": "The Messiah: Behold, I Tell You a Mystery... The Trumpet Shall Sound", + "TrackId_6305": 3410, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 330, + "Composer_1578": "Henryk Górecki", + "Milliseconds_9555": 567494, + "Name_4125": "Symphony No. 3 Op. 36 for Orchestra and Soprano \"Symfonia Piesni Zalosnych\" Lento E Largo - Tranquillissimo", + "TrackId_6305": 3485, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 312, + "Composer_1578": "Hector Berlioz", + "Milliseconds_9555": 561967, + "Name_4125": "Symphonie Fantastique, Op. 14: V. Songe d'une nuit du sabbat", + "TrackId_6305": 3446, + "UnitPrice_9827": 0.99 + }, + { + "AlbumId_2388": 301, + "Composer_1578": "Frédéric Chopin", + "Milliseconds_9555": 560342, + "Name_4125": "Concerto for Piano No. 2 in F Minor, Op. 21: II. Larghetto", + "TrackId_6305": 3434, + "UnitPrice_9827": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/2fe02a1bc4c3d614/request.json b/test-snapshots/query/2fe02a1bc4c3d614/request.json new file mode 100644 index 0000000..733549e --- /dev/null +++ b/test-snapshots/query/2fe02a1bc4c3d614/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_2388": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "TrackId_6305": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Composer_1578": { + "type": "column", + "column": "Composer", + "fields": null + }, + "UnitPrice_9827": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Name_4125": { + "type": "column", + "column": "Name", + "fields": null + }, + "Milliseconds_9555": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/300c1f2f3808ca9c/expected.json b/test-snapshots/query/300c1f2f3808ca9c/expected.json new file mode 100644 index 0000000..09ef815 --- /dev/null +++ b/test-snapshots/query/300c1f2f3808ca9c/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/300c1f2f3808ca9c/request.json b/test-snapshots/query/300c1f2f3808ca9c/request.json new file mode 100644 index 0000000..bbe653a --- /dev/null +++ b/test-snapshots/query/300c1f2f3808ca9c/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address_5449": { + "type": "column", + "column": "Address", + "fields": null + }, + "Phone_7301": { + "type": "column", + "column": "Phone", + "fields": null + }, + "EmployeeId_1185": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "FirstName_0536": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3019837e64e7dd2/expected.json b/test-snapshots/query/3019837e64e7dd2/expected.json new file mode 100644 index 0000000..1f4040c --- /dev/null +++ b/test-snapshots/query/3019837e64e7dd2/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3019837e64e7dd2/request.json b/test-snapshots/query/3019837e64e7dd2/request.json new file mode 100644 index 0000000..ea5e26d --- /dev/null +++ b/test-snapshots/query/3019837e64e7dd2/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/304d549d5d0dd49/expected.json b/test-snapshots/query/304d549d5d0dd49/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/304d549d5d0dd49/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/304d549d5d0dd49/request.json b/test-snapshots/query/304d549d5d0dd49/request.json new file mode 100644 index 0000000..3b9a1a2 --- /dev/null +++ b/test-snapshots/query/304d549d5d0dd49/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/30b0d6af86eafa3b/expected.json b/test-snapshots/query/30b0d6af86eafa3b/expected.json new file mode 100644 index 0000000..1d3ebf9 --- /dev/null +++ b/test-snapshots/query/30b0d6af86eafa3b/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/30b0d6af86eafa3b/request.json b/test-snapshots/query/30b0d6af86eafa3b/request.json new file mode 100644 index 0000000..5b664e2 --- /dev/null +++ b/test-snapshots/query/30b0d6af86eafa3b/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/30be75c0a49953e/expected.json b/test-snapshots/query/30be75c0a49953e/expected.json new file mode 100644 index 0000000..4ff122b --- /dev/null +++ b/test-snapshots/query/30be75c0a49953e/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceId_1573": 412, + "TrackId_1022": 3177 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3046 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3055 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3064 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3073 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3082 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3091 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3100 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3109 + }, + { + "InvoiceId_1573": 411, + "TrackId_1022": 3118 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/30be75c0a49953e/request.json b/test-snapshots/query/30be75c0a49953e/request.json new file mode 100644 index 0000000..0980ead --- /dev/null +++ b/test-snapshots/query/30be75c0a49953e/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_1573": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "TrackId_1022": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/30cb71049c8cd92a/expected.json b/test-snapshots/query/30cb71049c8cd92a/expected.json new file mode 100644 index 0000000..f49bac9 --- /dev/null +++ b/test-snapshots/query/30cb71049c8cd92a/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 160, + "ArtistId": 106, + "Title": "Ace Of Spades" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/30cb71049c8cd92a/request.json b/test-snapshots/query/30cb71049c8cd92a/request.json new file mode 100644 index 0000000..988bf9e --- /dev/null +++ b/test-snapshots/query/30cb71049c8cd92a/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/30e060a09ca814d4/expected.json b/test-snapshots/query/30e060a09ca814d4/expected.json new file mode 100644 index 0000000..1a5deac --- /dev/null +++ b/test-snapshots/query/30e060a09ca814d4/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/30e060a09ca814d4/request.json b/test-snapshots/query/30e060a09ca814d4/request.json new file mode 100644 index 0000000..c3cd760 --- /dev/null +++ b/test-snapshots/query/30e060a09ca814d4/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/30e4face19c40844/expected.json b/test-snapshots/query/30e4face19c40844/expected.json new file mode 100644 index 0000000..fbcbcef --- /dev/null +++ b/test-snapshots/query/30e4face19c40844/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/30e4face19c40844/request.json b/test-snapshots/query/30e4face19c40844/request.json new file mode 100644 index 0000000..520cee7 --- /dev/null +++ b/test-snapshots/query/30e4face19c40844/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3104e7bbee7bc49/expected.json b/test-snapshots/query/3104e7bbee7bc49/expected.json new file mode 100644 index 0000000..a0378f3 --- /dev/null +++ b/test-snapshots/query/3104e7bbee7bc49/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3104e7bbee7bc49/request.json b/test-snapshots/query/3104e7bbee7bc49/request.json new file mode 100644 index 0000000..4cfaf12 --- /dev/null +++ b/test-snapshots/query/3104e7bbee7bc49/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "hleacock@gmail.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "32801" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/310f5786f83a21a9/expected.json b/test-snapshots/query/310f5786f83a21a9/expected.json new file mode 100644 index 0000000..77a853b --- /dev/null +++ b/test-snapshots/query/310f5786f83a21a9/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_6148": 1, + "Name_8429": "Rock" + }, + { + "GenreId_6148": 2, + "Name_8429": "Jazz" + }, + { + "GenreId_6148": 3, + "Name_8429": "Metal" + }, + { + "GenreId_6148": 4, + "Name_8429": "Alternative & Punk" + }, + { + "GenreId_6148": 5, + "Name_8429": "Rock And Roll" + }, + { + "GenreId_6148": 6, + "Name_8429": "Blues" + }, + { + "GenreId_6148": 7, + "Name_8429": "Latin" + }, + { + "GenreId_6148": 8, + "Name_8429": "Reggae" + }, + { + "GenreId_6148": 9, + "Name_8429": "Pop" + }, + { + "GenreId_6148": 10, + "Name_8429": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/310f5786f83a21a9/request.json b/test-snapshots/query/310f5786f83a21a9/request.json new file mode 100644 index 0000000..f674ec7 --- /dev/null +++ b/test-snapshots/query/310f5786f83a21a9/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_6148": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_8429": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/313112aeb9e5c5d2/expected.json b/test-snapshots/query/313112aeb9e5c5d2/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/313112aeb9e5c5d2/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/313112aeb9e5c5d2/request.json b/test-snapshots/query/313112aeb9e5c5d2/request.json new file mode 100644 index 0000000..a3e102b --- /dev/null +++ b/test-snapshots/query/313112aeb9e5c5d2/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 1Y7" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3131ae5af2829c8f/expected.json b/test-snapshots/query/3131ae5af2829c8f/expected.json new file mode 100644 index 0000000..b2ee37d --- /dev/null +++ b/test-snapshots/query/3131ae5af2829c8f/expected.json @@ -0,0 +1,220 @@ +[ + { + "rows": [ + { + "Bytes_0629": 10003747, + "Composer_4137": "Caetano Veloso - Djavan", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 218 + }, + { + "PlaylistId": 5, + "TrackId": 218 + }, + { + "PlaylistId": 8, + "TrackId": 218 + } + ] + }, + "Milliseconds_5245": 299337, + "TrackId_1333": 218, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10003794, + "Composer_4137": "O. Osbourne, R. Daisley, R. Rhoads", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 2101 + }, + { + "PlaylistId": 8, + "TrackId": 2101 + } + ] + }, + "Milliseconds_5245": 308897, + "TrackId_1333": 2101, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10005675, + "Composer_4137": "The Tea Party", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 2712 + }, + { + "PlaylistId": 5, + "TrackId": 2712 + }, + { + "PlaylistId": 8, + "TrackId": 2712 + } + ] + }, + "Milliseconds_5245": 306337, + "TrackId_1333": 2712, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10009697, + "Composer_4137": "Paul Di'Anno/Steve Harris", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 2140 + }, + { + "PlaylistId": 8, + "TrackId": 2140 + } + ] + }, + "Milliseconds_5245": 309995, + "TrackId_1333": 2140, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10012231, + "Composer_4137": "Acyi Marques/Arlindo Bruz/Braço, Beto Sem/Zeca Pagodinho", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 3159 + }, + { + "PlaylistId": 5, + "TrackId": 3159 + }, + { + "PlaylistId": 8, + "TrackId": 3159 + } + ] + }, + "Milliseconds_5245": 299102, + "TrackId_1333": 3159, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10014683, + "Composer_4137": "Edward Van Halen, Alex Van Halen, Michael Anthony,/Edward Van Halen, Alex Van Halen, Michael Anthony, Sammy Hagar", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 3078 + }, + { + "PlaylistId": 5, + "TrackId": 3078 + }, + { + "PlaylistId": 8, + "TrackId": 3078 + } + ] + }, + "Milliseconds_5245": 308950, + "TrackId_1333": 3078, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10019269, + "Composer_4137": "Gilberto Gil", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1115 + }, + { + "PlaylistId": 5, + "TrackId": 1115 + }, + { + "PlaylistId": 8, + "TrackId": 1115 + } + ] + }, + "Milliseconds_5245": 302733, + "TrackId_1333": 1115, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10019861, + "Composer_4137": "G M Sumner", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 2653 + }, + { + "PlaylistId": 5, + "TrackId": 2653 + }, + { + "PlaylistId": 8, + "TrackId": 2653 + } + ] + }, + "Milliseconds_5245": 302080, + "TrackId_1333": 2653, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10020122, + "Composer_4137": null, + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 373 + }, + { + "PlaylistId": 8, + "TrackId": 373 + } + ] + }, + "Milliseconds_5245": 296254, + "TrackId_1333": 373, + "UnitPrice_8679": 0.99 + }, + { + "Bytes_0629": 10022428, + "Composer_4137": "D.Coverdal/G.Hughes/Glenn Hughes/I.Paice/Ian Paice/J.Lord/John Lord", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 810 + }, + { + "PlaylistId": 8, + "TrackId": 810 + } + ] + }, + "Milliseconds_5245": 306860, + "TrackId_1333": 810, + "UnitPrice_8679": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3131ae5af2829c8f/request.json b/test-snapshots/query/3131ae5af2829c8f/request.json new file mode 100644 index 0000000..d9cc198 --- /dev/null +++ b/test-snapshots/query/3131ae5af2829c8f/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "TrackId_1333": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Bytes_0629": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_4137": { + "type": "column", + "column": "Composer", + "fields": null + }, + "UnitPrice_8679": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Milliseconds_5245": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/315ca5802fb3e919/expected.json b/test-snapshots/query/315ca5802fb3e919/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/315ca5802fb3e919/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/315ca5802fb3e919/request.json b/test-snapshots/query/315ca5802fb3e919/request.json new file mode 100644 index 0000000..3287f18 --- /dev/null +++ b/test-snapshots/query/315ca5802fb3e919/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/316005aa5cd2f86c/expected.json b/test-snapshots/query/316005aa5cd2f86c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/316005aa5cd2f86c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/316005aa5cd2f86c/request.json b/test-snapshots/query/316005aa5cd2f86c/request.json new file mode 100644 index 0000000..79bc204 --- /dev/null +++ b/test-snapshots/query/316005aa5cd2f86c/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/31688158c4827693/expected.json b/test-snapshots/query/31688158c4827693/expected.json new file mode 100644 index 0000000..467cbdd --- /dev/null +++ b/test-snapshots/query/31688158c4827693/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_1278": 18, + "TrackId_5938": 597 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1278 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1283 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1335 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1345 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1380 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1392 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 152 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 160 + }, + { + "PlaylistId_1278": 17, + "TrackId_5938": 1801 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/31688158c4827693/request.json b/test-snapshots/query/31688158c4827693/request.json new file mode 100644 index 0000000..00b89ac --- /dev/null +++ b/test-snapshots/query/31688158c4827693/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_1278": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_5938": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/31773ed8acce1ccc/expected.json b/test-snapshots/query/31773ed8acce1ccc/expected.json new file mode 100644 index 0000000..73fdc88 --- /dev/null +++ b/test-snapshots/query/31773ed8acce1ccc/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_3903": "TV Shows", + "PlaylistId_5157": 10 + }, + { + "Name_3903": "TV Shows", + "PlaylistId_5157": 3 + }, + { + "Name_3903": "On-The-Go 1", + "PlaylistId_5157": 18 + }, + { + "Name_3903": "Music Videos", + "PlaylistId_5157": 9 + }, + { + "Name_3903": "Music", + "PlaylistId_5157": 1 + }, + { + "Name_3903": "Music", + "PlaylistId_5157": 8 + }, + { + "Name_3903": "Movies", + "PlaylistId_5157": 2 + }, + { + "Name_3903": "Movies", + "PlaylistId_5157": 7 + }, + { + "Name_3903": "Heavy Metal Classic", + "PlaylistId_5157": 17 + }, + { + "Name_3903": "Grunge", + "PlaylistId_5157": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/31773ed8acce1ccc/request.json b/test-snapshots/query/31773ed8acce1ccc/request.json new file mode 100644 index 0000000..e619629 --- /dev/null +++ b/test-snapshots/query/31773ed8acce1ccc/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_3903": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_5157": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/319a8b1098204df/expected.json b/test-snapshots/query/319a8b1098204df/expected.json new file mode 100644 index 0000000..6877a1e --- /dev/null +++ b/test-snapshots/query/319a8b1098204df/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/319a8b1098204df/request.json b/test-snapshots/query/319a8b1098204df/request.json new file mode 100644 index 0000000..771a198 --- /dev/null +++ b/test-snapshots/query/319a8b1098204df/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/31b1818a9984402a/expected.json b/test-snapshots/query/31b1818a9984402a/expected.json new file mode 100644 index 0000000..c5b4c4f --- /dev/null +++ b/test-snapshots/query/31b1818a9984402a/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 226, + "Bytes": 490750393, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622250, + "Name": "Battlestar Galactica: The Story So Far", + "TrackId": 2819, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 1054423946, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 5286953, + "Name": "Occupation / Precipice", + "TrackId": 2820, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 462818231, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2620245, + "Name": "A Day In the Life", + "TrackId": 2833, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 466820021, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2618000, + "Name": "Exodus, Pt. 2", + "TrackId": 2822, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 475079441, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2621708, + "Name": "Exodus, Pt. 1", + "TrackId": 2821, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 483484911, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2626626, + "Name": "Collaborators", + "TrackId": 2823, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 486233524, + "Composer": null, + "GenreId": 20, + "MediaTypeId": 3, + "Milliseconds": 2622622, + "Name": "Crossroads, Pt. 1", + "TrackId": 2837, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 489715554, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2563938, + "Name": "A Measure of Salvation", + "TrackId": 2825, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 490375760, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2623875, + "Name": "The Passage", + "TrackId": 2828, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 492700163, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624207, + "Name": "Taking a Break from All Your Worries", + "TrackId": 2831, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/31b1818a9984402a/request.json b/test-snapshots/query/31b1818a9984402a/request.json new file mode 100644 index 0000000..4f67304 --- /dev/null +++ b/test-snapshots/query/31b1818a9984402a/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/31d0a0bc7cc16d25/expected.json b/test-snapshots/query/31d0a0bc7cc16d25/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/31d0a0bc7cc16d25/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/31d0a0bc7cc16d25/request.json b/test-snapshots/query/31d0a0bc7cc16d25/request.json new file mode 100644 index 0000000..8fcd656 --- /dev/null +++ b/test-snapshots/query/31d0a0bc7cc16d25/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205662 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3200c012e836b65d/expected.json b/test-snapshots/query/3200c012e836b65d/expected.json new file mode 100644 index 0000000..d7ddce6 --- /dev/null +++ b/test-snapshots/query/3200c012e836b65d/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3200c012e836b65d/request.json b/test-snapshots/query/3200c012e836b65d/request.json new file mode 100644 index 0000000..cce6b87 --- /dev/null +++ b/test-snapshots/query/3200c012e836b65d/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address_0122": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_9977": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_4740": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2701": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_6747": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_9945": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_9385": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_4096": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_5138": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6424": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Title_4539": { + "type": "column", + "column": "Title", + "fields": null + }, + "PostalCode_5216": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_8860": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_1568": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/32130ba56029e98e/expected.json b/test-snapshots/query/32130ba56029e98e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/32130ba56029e98e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/32130ba56029e98e/request.json b/test-snapshots/query/32130ba56029e98e/request.json new file mode 100644 index 0000000..a4ab6fc --- /dev/null +++ b/test-snapshots/query/32130ba56029e98e/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/322e63a33c469e68/expected.json b/test-snapshots/query/322e63a33c469e68/expected.json new file mode 100644 index 0000000..c64f946 --- /dev/null +++ b/test-snapshots/query/322e63a33c469e68/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/322e63a33c469e68/request.json b/test-snapshots/query/322e63a33c469e68/request.json new file mode 100644 index 0000000..5c0398b --- /dev/null +++ b/test-snapshots/query/322e63a33c469e68/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/32accd64114c4505/expected.json b/test-snapshots/query/32accd64114c4505/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/32accd64114c4505/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/32accd64114c4505/request.json b/test-snapshots/query/32accd64114c4505/request.json new file mode 100644 index 0000000..1dd23ac --- /dev/null +++ b/test-snapshots/query/32accd64114c4505/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lethbridge" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/32b8c558d634a44f/expected.json b/test-snapshots/query/32b8c558d634a44f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/32b8c558d634a44f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/32b8c558d634a44f/request.json b/test-snapshots/query/32b8c558d634a44f/request.json new file mode 100644 index 0000000..7a13727 --- /dev/null +++ b/test-snapshots/query/32b8c558d634a44f/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/32be867883a157a0/expected.json b/test-snapshots/query/32be867883a157a0/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/32be867883a157a0/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/32be867883a157a0/request.json b/test-snapshots/query/32be867883a157a0/request.json new file mode 100644 index 0000000..e3fe608 --- /dev/null +++ b/test-snapshots/query/32be867883a157a0/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/32bf57d2b37e5ec5/expected.json b/test-snapshots/query/32bf57d2b37e5ec5/expected.json new file mode 100644 index 0000000..f090198 --- /dev/null +++ b/test-snapshots/query/32bf57d2b37e5ec5/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Heavy Metal Classic", + "PlaylistId": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/32bf57d2b37e5ec5/request.json b/test-snapshots/query/32bf57d2b37e5ec5/request.json new file mode 100644 index 0000000..532c8ee --- /dev/null +++ b/test-snapshots/query/32bf57d2b37e5ec5/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/330c1f213ca1f5e7/expected.json b/test-snapshots/query/330c1f213ca1f5e7/expected.json new file mode 100644 index 0000000..e62d6d8 --- /dev/null +++ b/test-snapshots/query/330c1f213ca1f5e7/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_8045": "...And Found" + }, + { + "Name_8045": "...In Translation" + }, + { + "Name_8045": ".07%" + }, + { + "Name_8045": "A Benihana Christmas, Pts. 1 & 2" + }, + { + "Name_8045": "A Day In the Life" + }, + { + "Name_8045": "A Measure of Salvation" + }, + { + "Name_8045": "A Tale of Two Cities" + }, + { + "Name_8045": "Abandoned" + }, + { + "Name_8045": "Adrift" + }, + { + "Name_8045": "All the Best Cowboys Have Daddy Issues" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/330c1f213ca1f5e7/request.json b/test-snapshots/query/330c1f213ca1f5e7/request.json new file mode 100644 index 0000000..a27e6d4 --- /dev/null +++ b/test-snapshots/query/330c1f213ca1f5e7/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_8045": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/330db6b45a2f29d9/expected.json b/test-snapshots/query/330db6b45a2f29d9/expected.json new file mode 100644 index 0000000..e2d8143 --- /dev/null +++ b/test-snapshots/query/330db6b45a2f29d9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 15, + "Name": "Electronica/Dance" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/330db6b45a2f29d9/request.json b/test-snapshots/query/330db6b45a2f29d9/request.json new file mode 100644 index 0000000..146f501 --- /dev/null +++ b/test-snapshots/query/330db6b45a2f29d9/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3315ef2b163c70c1/expected.json b/test-snapshots/query/3315ef2b163c70c1/expected.json new file mode 100644 index 0000000..e809809 --- /dev/null +++ b/test-snapshots/query/3315ef2b163c70c1/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3315ef2b163c70c1/request.json b/test-snapshots/query/3315ef2b163c70c1/request.json new file mode 100644 index 0000000..2ea5089 --- /dev/null +++ b/test-snapshots/query/3315ef2b163c70c1/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/331608e851f34af0/expected.json b/test-snapshots/query/331608e851f34af0/expected.json new file mode 100644 index 0000000..e72b9ab --- /dev/null +++ b/test-snapshots/query/331608e851f34af0/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-01-08", + "InvoiceId": 85, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-02-18", + "InvoiceId": 96, + "Total": 21.86 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-10-19", + "InvoiceId": 151, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/331608e851f34af0/request.json b/test-snapshots/query/331608e851f34af0/request.json new file mode 100644 index 0000000..a92e221 --- /dev/null +++ b/test-snapshots/query/331608e851f34af0/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1010" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/331dccb8d891b151/expected.json b/test-snapshots/query/331dccb8d891b151/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/331dccb8d891b151/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/331dccb8d891b151/request.json b/test-snapshots/query/331dccb8d891b151/request.json new file mode 100644 index 0000000..bcbe3bc --- /dev/null +++ b/test-snapshots/query/331dccb8d891b151/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/33205df8449bf338/expected.json b/test-snapshots/query/33205df8449bf338/expected.json new file mode 100644 index 0000000..5ac2d43 --- /dev/null +++ b/test-snapshots/query/33205df8449bf338/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "Bytes_0890": 38747, + "Composer_9710": "Samuel Rosa", + "Milliseconds_6253": 1071, + "TrackId_7092": 2461 + }, + { + "Bytes_0890": 161266, + "Composer_9710": null, + "Milliseconds_6253": 4884, + "TrackId_7092": 168 + }, + { + "Bytes_0890": 211997, + "Composer_9710": null, + "Milliseconds_6253": 6373, + "TrackId_7092": 170 + }, + { + "Bytes_0890": 224313, + "Composer_9710": null, + "Milliseconds_6253": 6635, + "TrackId_7092": 178 + }, + { + "Bytes_0890": 319888, + "Composer_9710": "L. Muggerud", + "Milliseconds_6253": 7941, + "TrackId_7092": 3304 + }, + { + "Bytes_0890": 387360, + "Composer_9710": null, + "Milliseconds_6253": 11650, + "TrackId_7092": 172 + }, + { + "Bytes_0890": 850698, + "Composer_9710": "L. Muggerud", + "Milliseconds_6253": 21211, + "TrackId_7092": 3310 + }, + { + "Bytes_0890": 967098, + "Composer_9710": null, + "Milliseconds_6253": 29048, + "TrackId_7092": 2241 + }, + { + "Bytes_0890": 1039615, + "Composer_9710": "Gilberto Gil", + "Milliseconds_6253": 32287, + "TrackId_7092": 1086 + }, + { + "Bytes_0890": 1103013, + "Composer_9710": "Chico Science", + "Milliseconds_6253": 33149, + "TrackId_7092": 246 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33205df8449bf338/request.json b/test-snapshots/query/33205df8449bf338/request.json new file mode 100644 index 0000000..d37d384 --- /dev/null +++ b/test-snapshots/query/33205df8449bf338/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Milliseconds_6253": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Bytes_0890": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_9710": { + "type": "column", + "column": "Composer", + "fields": null + }, + "TrackId_7092": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3323e0ab436e0fe6/expected.json b/test-snapshots/query/3323e0ab436e0fe6/expected.json new file mode 100644 index 0000000..5614cff --- /dev/null +++ b/test-snapshots/query/3323e0ab436e0fe6/expected.json @@ -0,0 +1,13 @@ +[ + { + "aggregates": { + "ArtistId_avg_6712": 121.942363112, + "ArtistId_count_7704": 347, + "ArtistId_median_1014": 112, + "ArtistId_min_3701": 1, + "Title_count_7790": 347, + "Title_max_7456": "[1997] Black Light Syndrome", + "Title_min_0824": "...And Justice For All" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/3323e0ab436e0fe6/request.json b/test-snapshots/query/3323e0ab436e0fe6/request.json new file mode 100644 index 0000000..d45ec8e --- /dev/null +++ b/test-snapshots/query/3323e0ab436e0fe6/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "Title_min_0824": { + "type": "single_column", + "column": "Title", + "function": "min" + }, + "ArtistId_count_7704": { + "type": "single_column", + "column": "ArtistId", + "function": "count" + }, + "ArtistId_median_1014": { + "type": "single_column", + "column": "ArtistId", + "function": "median" + }, + "ArtistId_min_3701": { + "type": "single_column", + "column": "ArtistId", + "function": "min" + }, + "Title_max_7456": { + "type": "single_column", + "column": "Title", + "function": "max" + }, + "Title_count_7790": { + "type": "single_column", + "column": "Title", + "function": "count" + }, + "ArtistId_avg_6712": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/332d8e05ed28330b/expected.json b/test-snapshots/query/332d8e05ed28330b/expected.json new file mode 100644 index 0000000..9408164 --- /dev/null +++ b/test-snapshots/query/332d8e05ed28330b/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "City_4743": "Buenos Aires", + "Country_7841": "Argentina", + "CustomerId_4862": 56, + "Email_6860": "diego.gutierrez@yahoo.ar", + "Fax_7689": null, + "FirstName_6004": "Diego", + "LastName_3199": "Gutiérrez", + "Phone_1954": "+54 (0)11 4311 4333", + "PostalCode_5524": "1106", + "State_3214": null + }, + { + "City_4743": "Sidney", + "Country_7841": "Australia", + "CustomerId_4862": 55, + "Email_6860": "mark.taylor@yahoo.au", + "Fax_7689": null, + "FirstName_6004": "Mark", + "LastName_3199": "Taylor", + "Phone_1954": "+61 (02) 9332 3633", + "PostalCode_5524": "2010", + "State_3214": "NSW" + }, + { + "City_4743": "Vienne", + "Country_7841": "Austria", + "CustomerId_4862": 7, + "Email_6860": "astrid.gruber@apple.at", + "Fax_7689": null, + "FirstName_6004": "Astrid", + "LastName_3199": "Gruber", + "Phone_1954": "+43 01 5134505", + "PostalCode_5524": "1010", + "State_3214": null + }, + { + "City_4743": "Brussels", + "Country_7841": "Belgium", + "CustomerId_4862": 8, + "Email_6860": "daan_peeters@apple.be", + "Fax_7689": null, + "FirstName_6004": "Daan", + "LastName_3199": "Peeters", + "Phone_1954": "+32 02 219 03 03", + "PostalCode_5524": "1000", + "State_3214": null + }, + { + "City_4743": "Rio de Janeiro", + "Country_7841": "Brazil", + "CustomerId_4862": 12, + "Email_6860": "roberto.almeida@riotur.gov.br", + "Fax_7689": "+55 (21) 2271-7070", + "FirstName_6004": "Roberto", + "LastName_3199": "Almeida", + "Phone_1954": "+55 (21) 2271-7000", + "PostalCode_5524": "20040-020", + "State_3214": "RJ" + }, + { + "City_4743": "São José dos Campos", + "Country_7841": "Brazil", + "CustomerId_4862": 1, + "Email_6860": "luisg@embraer.com.br", + "Fax_7689": "+55 (12) 3923-5566", + "FirstName_6004": "Luís", + "LastName_3199": "Gonçalves", + "Phone_1954": "+55 (12) 3923-5555", + "PostalCode_5524": "12227-000", + "State_3214": "SP" + }, + { + "City_4743": "Brasília", + "Country_7841": "Brazil", + "CustomerId_4862": 13, + "Email_6860": "fernadaramos4@uol.com.br", + "Fax_7689": "+55 (61) 3363-7855", + "FirstName_6004": "Fernanda", + "LastName_3199": "Ramos", + "Phone_1954": "+55 (61) 3363-5547", + "PostalCode_5524": "71020-677", + "State_3214": "DF" + }, + { + "City_4743": "São Paulo", + "Country_7841": "Brazil", + "CustomerId_4862": 10, + "Email_6860": "eduardo@woodstock.com.br", + "Fax_7689": "+55 (11) 3033-4564", + "FirstName_6004": "Eduardo", + "LastName_3199": "Martins", + "Phone_1954": "+55 (11) 3033-5446", + "PostalCode_5524": "01007-010", + "State_3214": "SP" + }, + { + "City_4743": "São Paulo", + "Country_7841": "Brazil", + "CustomerId_4862": 11, + "Email_6860": "alero@uol.com.br", + "Fax_7689": "+55 (11) 3055-8131", + "FirstName_6004": "Alexandre", + "LastName_3199": "Rocha", + "Phone_1954": "+55 (11) 3055-3278", + "PostalCode_5524": "01310-200", + "State_3214": "SP" + }, + { + "City_4743": "Toronto", + "Country_7841": "Canada", + "CustomerId_4862": 29, + "Email_6860": "robbrown@shaw.ca", + "Fax_7689": null, + "FirstName_6004": "Robert", + "LastName_3199": "Brown", + "Phone_1954": "+1 (416) 363-8888", + "PostalCode_5524": "M6J 1V1", + "State_3214": "ON" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/332d8e05ed28330b/request.json b/test-snapshots/query/332d8e05ed28330b/request.json new file mode 100644 index 0000000..dd7309b --- /dev/null +++ b/test-snapshots/query/332d8e05ed28330b/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "State_3214": { + "type": "column", + "column": "State", + "fields": null + }, + "City_4743": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_5524": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Country_7841": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_4862": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_6860": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_7689": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6004": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_3199": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1954": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/33483e3189468569/expected.json b/test-snapshots/query/33483e3189468569/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/33483e3189468569/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33483e3189468569/request.json b/test-snapshots/query/33483e3189468569/request.json new file mode 100644 index 0000000..7c8a41c --- /dev/null +++ b/test-snapshots/query/33483e3189468569/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3380908578a6fc1d/expected.json b/test-snapshots/query/3380908578a6fc1d/expected.json new file mode 100644 index 0000000..1a69041 --- /dev/null +++ b/test-snapshots/query/3380908578a6fc1d/expected.json @@ -0,0 +1,121 @@ +[ + { + "rows": [ + { + "Composer_9487": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 172, + "InvoiceLineId": 925, + "Quantity": 1, + "TrackId": 2107, + "UnitPrice": 0.99 + } + ] + } + }, + { + "Composer_9487": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 277, + "InvoiceLineId": 1499, + "Quantity": 1, + "TrackId": 2108, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 66, + "InvoiceLineId": 350, + "Quantity": 1, + "TrackId": 2108, + "UnitPrice": 0.99 + } + ] + } + }, + { + "Composer_9487": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 382, + "InvoiceLineId": 2073, + "Quantity": 1, + "TrackId": 2109, + "UnitPrice": 0.99 + } + ] + } + }, + { + "Composer_9487": "A. Jamal", + "FK_InvoiceLineTrackId": { + "rows": [] + } + }, + { + "Composer_9487": "A.Bouchard/J.Bouchard/S.Pearlman", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 332, + "InvoiceLineId": 1794, + "Quantity": 1, + "TrackId": 415, + "UnitPrice": 0.99 + } + ] + } + }, + { + "Composer_9487": "A.Isbell/A.Jones/O.Redding", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 186, + "InvoiceLineId": 1004, + "Quantity": 1, + "TrackId": 2589, + "UnitPrice": 0.99 + } + ] + } + }, + { + "Composer_9487": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [] + } + }, + { + "Composer_9487": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [] + } + }, + { + "Composer_9487": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [] + } + }, + { + "Composer_9487": "AC/DC", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 109, + "InvoiceLineId": 583, + "Quantity": 1, + "TrackId": 19, + "UnitPrice": 0.99 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3380908578a6fc1d/request.json b/test-snapshots/query/3380908578a6fc1d/request.json new file mode 100644 index 0000000..71aab76 --- /dev/null +++ b/test-snapshots/query/3380908578a6fc1d/request.json @@ -0,0 +1,59 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Composer_9487": { + "type": "column", + "column": "Composer", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/33b2f5e13d229b3c/expected.json b/test-snapshots/query/33b2f5e13d229b3c/expected.json new file mode 100644 index 0000000..adfffb1 --- /dev/null +++ b/test-snapshots/query/33b2f5e13d229b3c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + }, + { + "UnitPrice_4588": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33b2f5e13d229b3c/request.json b/test-snapshots/query/33b2f5e13d229b3c/request.json new file mode 100644 index 0000000..09b8616 --- /dev/null +++ b/test-snapshots/query/33b2f5e13d229b3c/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "UnitPrice_4588": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/33b6196aaf18849e/expected.json b/test-snapshots/query/33b6196aaf18849e/expected.json new file mode 100644 index 0000000..742e8e5 --- /dev/null +++ b/test-snapshots/query/33b6196aaf18849e/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 262, + "Bytes": 4011615, + "Composer": "Luca Gusella", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 246503, + "Name": "Amanda", + "TrackId": 3349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 262, + "Bytes": 4821485, + "Composer": "Andrea Dulbecco", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 307385, + "Name": "Despertar", + "TrackId": 3350, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4615841, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 285837, + "Name": "Din Din Wo (Little Child)", + "TrackId": 3351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4855457, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 300605, + "Name": "I Ka Barra (Your Work)", + "TrackId": 3354, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 5327463, + "Composer": "Karsh Kale/Vishal Vaid", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 327122, + "Name": "Distance", + "TrackId": 3352, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 6034098, + "Composer": "Karsh Kale", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 366085, + "Name": "One Step Beyond", + "TrackId": 3358, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3240609, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 199923, + "Name": "Love Comes", + "TrackId": 3355, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3453849, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 212044, + "Name": "I Guess You're Right", + "TrackId": 3353, + "UnitPrice": 0.99 + }, + { + "AlbumId": 266, + "Bytes": 2775071, + "Composer": "Luciana Souza", + "GenreId": 7, + "MediaTypeId": 5, + "Milliseconds": 172710, + "Name": "Muita Bobeira", + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "AlbumId": 267, + "Bytes": 4292028, + "Composer": "Aaron Goldberg", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 266936, + "Name": "OAM's Blues", + "TrackId": 3357, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33b6196aaf18849e/request.json b/test-snapshots/query/33b6196aaf18849e/request.json new file mode 100644 index 0000000..5f65431 --- /dev/null +++ b/test-snapshots/query/33b6196aaf18849e/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/33b78090c9a7a661/expected.json b/test-snapshots/query/33b78090c9a7a661/expected.json new file mode 100644 index 0000000..6668926 --- /dev/null +++ b/test-snapshots/query/33b78090c9a7a661/expected.json @@ -0,0 +1,18 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 17, + "TrackId": 1 + }, + { + "PlaylistId": 8, + "TrackId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33b78090c9a7a661/request.json b/test-snapshots/query/33b78090c9a7a661/request.json new file mode 100644 index 0000000..a1ab827 --- /dev/null +++ b/test-snapshots/query/33b78090c9a7a661/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/33d02bc1fdc6bf46/expected.json b/test-snapshots/query/33d02bc1fdc6bf46/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/33d02bc1fdc6bf46/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33d02bc1fdc6bf46/request.json b/test-snapshots/query/33d02bc1fdc6bf46/request.json new file mode 100644 index 0000000..5bae4c3 --- /dev/null +++ b/test-snapshots/query/33d02bc1fdc6bf46/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/33d9582848cfe59b/expected.json b/test-snapshots/query/33d9582848cfe59b/expected.json new file mode 100644 index 0000000..f3ff3be --- /dev/null +++ b/test-snapshots/query/33d9582848cfe59b/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_7554": "TV Shows" + }, + { + "Name_7554": "TV Shows" + }, + { + "Name_7554": "On-The-Go 1" + }, + { + "Name_7554": "Music Videos" + }, + { + "Name_7554": "Music" + }, + { + "Name_7554": "Music" + }, + { + "Name_7554": "Movies" + }, + { + "Name_7554": "Movies" + }, + { + "Name_7554": "Heavy Metal Classic" + }, + { + "Name_7554": "Grunge" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/33d9582848cfe59b/request.json b/test-snapshots/query/33d9582848cfe59b/request.json new file mode 100644 index 0000000..89c5320 --- /dev/null +++ b/test-snapshots/query/33d9582848cfe59b/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_7554": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3407489b6ec9bb64/expected.json b/test-snapshots/query/3407489b6ec9bb64/expected.json new file mode 100644 index 0000000..b397a8f --- /dev/null +++ b/test-snapshots/query/3407489b6ec9bb64/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "AlbumId_8922": 1, + "Bytes_6546": 11170334, + "Composer_2385": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1135": 1, + "MediaTypeId_0130": 1, + "Milliseconds_9237": 343719, + "Name_3446": "For Those About To Rock (We Salute You)", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 2, + "Bytes_6546": 5510424, + "Composer_2385": null, + "GenreId_1135": 1, + "MediaTypeId_0130": 2, + "Milliseconds_9237": 342562, + "Name_3446": "Balls to the Wall", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 3, + "Bytes_6546": 3990994, + "Composer_2385": "F. Baltes, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId_1135": 1, + "MediaTypeId_0130": 2, + "Milliseconds_9237": 230619, + "Name_3446": "Fast As a Shark", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 3, + "Bytes_6546": 4331779, + "Composer_2385": "F. Baltes, R.A. Smith-Diesel, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId_1135": 1, + "MediaTypeId_0130": 2, + "Milliseconds_9237": 252051, + "Name_3446": "Restless and Wild", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 3, + "Bytes_6546": 6290521, + "Composer_2385": "Deaffy & R.A. Smith-Diesel", + "GenreId_1135": 1, + "MediaTypeId_0130": 2, + "Milliseconds_9237": 375418, + "Name_3446": "Princess of the Dawn", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 1, + "Bytes_6546": 6713451, + "Composer_2385": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1135": 1, + "MediaTypeId_0130": 1, + "Milliseconds_9237": 205662, + "Name_3446": "Put The Finger On You", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 1, + "Bytes_6546": 7636561, + "Composer_2385": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1135": 1, + "MediaTypeId_0130": 1, + "Milliseconds_9237": 233926, + "Name_3446": "Let's Get It Up", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 1, + "Bytes_6546": 6852860, + "Composer_2385": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1135": 1, + "MediaTypeId_0130": 1, + "Milliseconds_9237": 210834, + "Name_3446": "Inject The Venom", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 1, + "Bytes_6546": 6599424, + "Composer_2385": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1135": 1, + "MediaTypeId_0130": 1, + "Milliseconds_9237": 203102, + "Name_3446": "Snowballed", + "UnitPrice_0715": 0.99 + }, + { + "AlbumId_8922": 1, + "Bytes_6546": 8611245, + "Composer_2385": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1135": 1, + "MediaTypeId_0130": 1, + "Milliseconds_9237": 263497, + "Name_3446": "Evil Walks", + "UnitPrice_0715": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3407489b6ec9bb64/request.json b/test-snapshots/query/3407489b6ec9bb64/request.json new file mode 100644 index 0000000..e5e39ef --- /dev/null +++ b/test-snapshots/query/3407489b6ec9bb64/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_8922": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6546": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_2385": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_1135": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_0130": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_9237": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_3446": { + "type": "column", + "column": "Name", + "fields": null + }, + "UnitPrice_0715": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/341e376183d95da8/expected.json b/test-snapshots/query/341e376183d95da8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/341e376183d95da8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/341e376183d95da8/request.json b/test-snapshots/query/341e376183d95da8/request.json new file mode 100644 index 0000000..540fbdc --- /dev/null +++ b/test-snapshots/query/341e376183d95da8/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 1Y7" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/34579acc77a61501/expected.json b/test-snapshots/query/34579acc77a61501/expected.json new file mode 100644 index 0000000..da6e5e6 --- /dev/null +++ b/test-snapshots/query/34579acc77a61501/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Address_8050": "9, Place Louis Barthou", + "City_1716": "Bordeaux", + "FirstName_7443": "Wyatt", + "LastName_6202": "Girard", + "PostalCode_4691": "33000", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "1 Infinite Loop", + "City_1716": "Cupertino", + "FirstName_7443": "Tim", + "LastName_6202": "Goyer", + "PostalCode_4691": "95014", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "Porthaninkatu 9", + "City_1716": "Helsinki", + "FirstName_7443": "Terhi", + "LastName_6202": "Hämäläinen", + "PostalCode_4691": "00530", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "Praça Pio X, 119", + "City_1716": "Rio de Janeiro", + "FirstName_7443": "Roberto", + "LastName_6202": "Almeida", + "PostalCode_4691": "20040-020", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "796 Dundas Street West", + "City_1716": "Toronto", + "FirstName_7443": "Robert", + "LastName_6202": "Brown", + "PostalCode_4691": "M6J 1V1", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "3,Raj Bhavan Road", + "City_1716": "Bangalore", + "FirstName_7443": "Puja", + "LastName_6202": "Srivastava", + "PostalCode_4691": "560001", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "113 Lupus St", + "City_1716": "London", + "FirstName_7443": "Phil", + "LastName_6202": "Hughes", + "PostalCode_4691": "SW1V 3EN", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "Barbarossastraße 19", + "City_1716": "Berlin", + "FirstName_7443": "Niklas", + "LastName_6202": "Schröder", + "PostalCode_4691": "10779", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "627 Broadway", + "City_1716": "New York", + "FirstName_7443": "Michelle", + "LastName_6202": "Brooks", + "PostalCode_4691": "10012-2612", + "SupportRepId_7071": 3 + }, + { + "Address_8050": "12,Community Centre", + "City_1716": "Delhi", + "FirstName_7443": "Manoj", + "LastName_6202": "Pareek", + "PostalCode_4691": "110017", + "SupportRepId_7071": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/34579acc77a61501/request.json b/test-snapshots/query/34579acc77a61501/request.json new file mode 100644 index 0000000..258c19c --- /dev/null +++ b/test-snapshots/query/34579acc77a61501/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_8050": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_1716": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_4691": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "FirstName_7443": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "SupportRepId_7071": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "LastName_6202": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3467e855278673d1/expected.json b/test-snapshots/query/3467e855278673d1/expected.json new file mode 100644 index 0000000..65c9f3e --- /dev/null +++ b/test-snapshots/query/3467e855278673d1/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 199836, + "Name_9335": "C.O.D.", + "TrackId_1875": 11 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 203102, + "Name_9335": "Snowballed", + "TrackId_1875": 9 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 205662, + "Name_9335": "Put The Finger On You", + "TrackId_1875": 6 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 205688, + "Name_9335": "Night Of The Long Knives", + "TrackId_1875": 13 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 210834, + "Name_9335": "Inject The Venom", + "TrackId_1875": 8 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 233926, + "Name_9335": "Let's Get It Up", + "TrackId_1875": 7 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 263288, + "Name_9335": "Breaking The Rules", + "TrackId_1875": 12 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 263497, + "Name_9335": "Evil Walks", + "TrackId_1875": 10 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 270863, + "Name_9335": "Spellbound", + "TrackId_1875": 14 + }, + { + "Composer_2691": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7925": 1, + "Milliseconds_4469": 343719, + "Name_9335": "For Those About To Rock (We Salute You)", + "TrackId_1875": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3467e855278673d1/request.json b/test-snapshots/query/3467e855278673d1/request.json new file mode 100644 index 0000000..153bb2b --- /dev/null +++ b/test-snapshots/query/3467e855278673d1/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_9335": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_1875": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Composer_2691": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_7925": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Milliseconds_4469": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/34872d5e897f5a7e/expected.json b/test-snapshots/query/34872d5e897f5a7e/expected.json new file mode 100644 index 0000000..c5dd5f2 --- /dev/null +++ b/test-snapshots/query/34872d5e897f5a7e/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_7879": 1 + }, + { + "MediaTypeId_7879": 2 + }, + { + "MediaTypeId_7879": 3 + }, + { + "MediaTypeId_7879": 4 + }, + { + "MediaTypeId_7879": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/34872d5e897f5a7e/request.json b/test-snapshots/query/34872d5e897f5a7e/request.json new file mode 100644 index 0000000..10401ee --- /dev/null +++ b/test-snapshots/query/34872d5e897f5a7e/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_7879": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/34e25c35022e1346/expected.json b/test-snapshots/query/34e25c35022e1346/expected.json new file mode 100644 index 0000000..4107f31 --- /dev/null +++ b/test-snapshots/query/34e25c35022e1346/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/34e25c35022e1346/request.json b/test-snapshots/query/34e25c35022e1346/request.json new file mode 100644 index 0000000..2a0f43d --- /dev/null +++ b/test-snapshots/query/34e25c35022e1346/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "WA" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/34e5301cee8d3bf9/expected.json b/test-snapshots/query/34e5301cee8d3bf9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/34e5301cee8d3bf9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/34e5301cee8d3bf9/request.json b/test-snapshots/query/34e5301cee8d3bf9/request.json new file mode 100644 index 0000000..c054356 --- /dev/null +++ b/test-snapshots/query/34e5301cee8d3bf9/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3508e898ed939596/expected.json b/test-snapshots/query/3508e898ed939596/expected.json new file mode 100644 index 0000000..389c95e --- /dev/null +++ b/test-snapshots/query/3508e898ed939596/expected.json @@ -0,0 +1,226 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (408) 996-1011", + "Phone_0089": "+1 (408) 996-1010", + "State_1794": "CA", + "SupportRepId_7779": 3 + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (425) 882-8081", + "Phone_0089": "+1 (425) 882-8080", + "State_1794": "WA", + "SupportRepId_7779": 5 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (425) 882-8081", + "Phone_0089": "+1 (425) 882-8080", + "State_1794": "WA", + "SupportRepId_7779": 5 + } + ] + }, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Country_8170": "USA", + "Fax_7307": "+1 (425) 882-8081", + "Phone_0089": "+1 (425) 882-8080", + "State_1794": "WA", + "SupportRepId_7779": 5 + } + ] + }, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3508e898ed939596/request.json b/test-snapshots/query/3508e898ed939596/request.json new file mode 100644 index 0000000..71eb33b --- /dev/null +++ b/test-snapshots/query/3508e898ed939596/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Fax_7307": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Phone_0089": { + "type": "column", + "column": "Phone", + "fields": null + }, + "SupportRepId_7779": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Country_8170": { + "type": "column", + "column": "Country", + "fields": null + }, + "State_1794": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/351cb9407384f2ca/expected.json b/test-snapshots/query/351cb9407384f2ca/expected.json new file mode 100644 index 0000000..f089552 --- /dev/null +++ b/test-snapshots/query/351cb9407384f2ca/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2011-06-24", + "InvoiceId": 207, + "Total": 8.91 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-01-28", + "InvoiceId": 336, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-08-04", + "InvoiceId": 381, + "Total": 5.94 + }, + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + }, + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-09-24", + "InvoiceId": 62, + "Total": 0.99 + }, + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2011-03-18", + "InvoiceId": 183, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/351cb9407384f2ca/request.json b/test-snapshots/query/351cb9407384f2ca/request.json new file mode 100644 index 0000000..9738804 --- /dev/null +++ b/test-snapshots/query/351cb9407384f2ca/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "EH4 1HH" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/35305d208d743980/expected.json b/test-snapshots/query/35305d208d743980/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/35305d208d743980/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/35305d208d743980/request.json b/test-snapshots/query/35305d208d743980/request.json new file mode 100644 index 0000000..12829fd --- /dev/null +++ b/test-snapshots/query/35305d208d743980/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/353f107d7a365ac0/expected.json b/test-snapshots/query/353f107d7a365ac0/expected.json new file mode 100644 index 0000000..adea825 --- /dev/null +++ b/test-snapshots/query/353f107d7a365ac0/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_6236": 1, + "ArtistId_7393": 1, + "Title_6748": "For Those About To Rock We Salute You" + }, + { + "AlbumId_6236": 2, + "ArtistId_7393": 2, + "Title_6748": "Balls to the Wall" + }, + { + "AlbumId_6236": 3, + "ArtistId_7393": 2, + "Title_6748": "Restless and Wild" + }, + { + "AlbumId_6236": 4, + "ArtistId_7393": 1, + "Title_6748": "Let There Be Rock" + }, + { + "AlbumId_6236": 5, + "ArtistId_7393": 3, + "Title_6748": "Big Ones" + }, + { + "AlbumId_6236": 6, + "ArtistId_7393": 4, + "Title_6748": "Jagged Little Pill" + }, + { + "AlbumId_6236": 7, + "ArtistId_7393": 5, + "Title_6748": "Facelift" + }, + { + "AlbumId_6236": 8, + "ArtistId_7393": 6, + "Title_6748": "Warner 25 Anos" + }, + { + "AlbumId_6236": 9, + "ArtistId_7393": 7, + "Title_6748": "Plays Metallica By Four Cellos" + }, + { + "AlbumId_6236": 10, + "ArtistId_7393": 8, + "Title_6748": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/353f107d7a365ac0/request.json b/test-snapshots/query/353f107d7a365ac0/request.json new file mode 100644 index 0000000..0aa49d7 --- /dev/null +++ b/test-snapshots/query/353f107d7a365ac0/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_6236": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_7393": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_6748": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3546454292f7535a/expected.json b/test-snapshots/query/3546454292f7535a/expected.json new file mode 100644 index 0000000..b4fb2ea --- /dev/null +++ b/test-snapshots/query/3546454292f7535a/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 10, + "Total_8382": 5.94 + }, + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 183, + "Total_8382": 1.98 + }, + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 194, + "Total_8382": 21.86 + }, + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 249, + "Total_8382": 8.91 + }, + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 378, + "Total_8382": 1.98 + }, + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 401, + "Total_8382": 3.96 + }, + { + "BillingCity_3238": "Dublin", + "BillingCountry_5886": "Ireland", + "BillingPostalCode_4134": null, + "BillingState_3073": "Dublin", + "CustomerId_3752": 46, + "InvoiceId_7314": 62, + "Total_8382": 0.99 + }, + { + "BillingCity_3238": "Lisbon", + "BillingCountry_5886": "Portugal", + "BillingPostalCode_4134": null, + "BillingState_3073": null, + "CustomerId_3752": 34, + "InvoiceId_7314": 125, + "Total_8382": 0.99 + }, + { + "BillingCity_3238": "Lisbon", + "BillingCountry_5886": "Portugal", + "BillingPostalCode_4134": null, + "BillingState_3073": null, + "CustomerId_3752": 34, + "InvoiceId_7314": 246, + "Total_8382": 1.98 + }, + { + "BillingCity_3238": "Lisbon", + "BillingCountry_5886": "Portugal", + "BillingPostalCode_4134": null, + "BillingState_3073": null, + "CustomerId_3752": 34, + "InvoiceId_7314": 257, + "Total_8382": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3546454292f7535a/request.json b/test-snapshots/query/3546454292f7535a/request.json new file mode 100644 index 0000000..6459b50 --- /dev/null +++ b/test-snapshots/query/3546454292f7535a/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceId_7314": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingCity_3238": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_5886": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_4134": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_3073": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_3752": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Total_8382": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/354a95bc24b400a2/expected.json b/test-snapshots/query/354a95bc24b400a2/expected.json new file mode 100644 index 0000000..27a8a35 --- /dev/null +++ b/test-snapshots/query/354a95bc24b400a2/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 10, + "ArtistId": 8, + "Title": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/354a95bc24b400a2/request.json b/test-snapshots/query/354a95bc24b400a2/request.json new file mode 100644 index 0000000..a84e47f --- /dev/null +++ b/test-snapshots/query/354a95bc24b400a2/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/355092194f1d932/expected.json b/test-snapshots/query/355092194f1d932/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/355092194f1d932/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/355092194f1d932/request.json b/test-snapshots/query/355092194f1d932/request.json new file mode 100644 index 0000000..ab0e16e --- /dev/null +++ b/test-snapshots/query/355092194f1d932/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "825 8 Ave SW" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/356406f6cd50f27d/expected.json b/test-snapshots/query/356406f6cd50f27d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/356406f6cd50f27d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/356406f6cd50f27d/request.json b/test-snapshots/query/356406f6cd50f27d/request.json new file mode 100644 index 0000000..43e9ba1 --- /dev/null +++ b/test-snapshots/query/356406f6cd50f27d/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 53 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Pareek" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "hleacock@gmail.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/356e3f5de2489eb0/expected.json b/test-snapshots/query/356e3f5de2489eb0/expected.json new file mode 100644 index 0000000..a00eeb1 --- /dev/null +++ b/test-snapshots/query/356e3f5de2489eb0/expected.json @@ -0,0 +1,48 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/356e3f5de2489eb0/request.json b/test-snapshots/query/356e3f5de2489eb0/request.json new file mode 100644 index 0000000..beafec3 --- /dev/null +++ b/test-snapshots/query/356e3f5de2489eb0/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/356f7086fccc75e5/expected.json b/test-snapshots/query/356f7086fccc75e5/expected.json new file mode 100644 index 0000000..3c7c46a --- /dev/null +++ b/test-snapshots/query/356f7086fccc75e5/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_6137": 275 + }, + { + "ArtistId_6137": 274 + }, + { + "ArtistId_6137": 273 + }, + { + "ArtistId_6137": 272 + }, + { + "ArtistId_6137": 271 + }, + { + "ArtistId_6137": 270 + }, + { + "ArtistId_6137": 269 + }, + { + "ArtistId_6137": 268 + }, + { + "ArtistId_6137": 267 + }, + { + "ArtistId_6137": 266 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/356f7086fccc75e5/request.json b/test-snapshots/query/356f7086fccc75e5/request.json new file mode 100644 index 0000000..9f707ad --- /dev/null +++ b/test-snapshots/query/356f7086fccc75e5/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_6137": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/35be4715e0094d0e/expected.json b/test-snapshots/query/35be4715e0094d0e/expected.json new file mode 100644 index 0000000..815f053 --- /dev/null +++ b/test-snapshots/query/35be4715e0094d0e/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "AlbumId_3719": 347, + "Composer_9506": "Philip Glass", + "GenreId_4654": 10, + "Name_8695": "Koyaanisqatsi" + }, + { + "AlbumId_3719": 346, + "Composer_9506": "Wolfgang Amadeus Mozart", + "GenreId_4654": 24, + "Name_8695": "Quintet for Horn, Violin, 2 Violas, and Cello in E Flat Major, K. 407/386c: III. Allegro" + }, + { + "AlbumId_3719": 345, + "Composer_9506": "Claudio Monteverdi", + "GenreId_4654": 24, + "Name_8695": "L'orfeo, Act 3, Sinfonia (Orchestra)" + }, + { + "AlbumId_3719": 344, + "Composer_9506": "Franz Schubert", + "GenreId_4654": 24, + "Name_8695": "String Quartet No. 12 in C Minor, D. 703 \"Quartettsatz\": II. Andante - Allegro assai" + }, + { + "AlbumId_3719": 343, + "Composer_9506": null, + "GenreId_4654": 24, + "Name_8695": "Pini Di Roma (Pinien Von Rom) I Pini Della Via Appia" + }, + { + "AlbumId_3719": 342, + "Composer_9506": "Pietro Antonio Locatelli", + "GenreId_4654": 24, + "Name_8695": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro" + }, + { + "AlbumId_3719": 341, + "Composer_9506": null, + "GenreId_4654": 24, + "Name_8695": "Erlkonig, D.328" + }, + { + "AlbumId_3719": 340, + "Composer_9506": null, + "GenreId_4654": 24, + "Name_8695": "Étude 1, In C Major - Preludio (Presto) - Liszt" + }, + { + "AlbumId_3719": 339, + "Composer_9506": "Niccolò Paganini", + "GenreId_4654": 24, + "Name_8695": "24 Caprices, Op. 1, No. 24, for Solo Violin, in A Minor" + }, + { + "AlbumId_3719": 338, + "Composer_9506": "Carl Nielsen", + "GenreId_4654": 24, + "Name_8695": "Symphony No. 2, Op. 16 - \"The Four Temperaments\": II. Allegro Comodo e Flemmatico" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/35be4715e0094d0e/request.json b/test-snapshots/query/35be4715e0094d0e/request.json new file mode 100644 index 0000000..c34d8ef --- /dev/null +++ b/test-snapshots/query/35be4715e0094d0e/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_3719": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Name_8695": { + "type": "column", + "column": "Name", + "fields": null + }, + "Composer_9506": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_4654": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/35f4d1af26342832/expected.json b/test-snapshots/query/35f4d1af26342832/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/35f4d1af26342832/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/35f4d1af26342832/request.json b/test-snapshots/query/35f4d1af26342832/request.json new file mode 100644 index 0000000..4474126 --- /dev/null +++ b/test-snapshots/query/35f4d1af26342832/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Manager" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3613259c5ef2c57b/expected.json b/test-snapshots/query/3613259c5ef2c57b/expected.json new file mode 100644 index 0000000..a0026d8 --- /dev/null +++ b/test-snapshots/query/3613259c5ef2c57b/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "GenreId_9583": 24, + "TrackId_6138": 3359, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 15, + "TrackId_6138": 3358, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 2, + "TrackId_6138": 3357, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 7, + "TrackId_6138": 3356, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 1, + "TrackId_6138": 3355, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 16, + "TrackId_6138": 3354, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 1, + "TrackId_6138": 3353, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 15, + "TrackId_6138": 3352, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 16, + "TrackId_6138": 3351, + "UnitPrice_2645": 0.99 + }, + { + "GenreId_9583": 2, + "TrackId_6138": 3350, + "UnitPrice_2645": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3613259c5ef2c57b/request.json b/test-snapshots/query/3613259c5ef2c57b/request.json new file mode 100644 index 0000000..cb1ed56 --- /dev/null +++ b/test-snapshots/query/3613259c5ef2c57b/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "GenreId_9583": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "TrackId_6138": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_2645": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3620f36b6c508c4a/expected.json b/test-snapshots/query/3620f36b6c508c4a/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/3620f36b6c508c4a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3620f36b6c508c4a/request.json b/test-snapshots/query/3620f36b6c508c4a/request.json new file mode 100644 index 0000000..8dbfe15 --- /dev/null +++ b/test-snapshots/query/3620f36b6c508c4a/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3630ceac4730c0ad/expected.json b/test-snapshots/query/3630ceac4730c0ad/expected.json new file mode 100644 index 0000000..fba8785 --- /dev/null +++ b/test-snapshots/query/3630ceac4730c0ad/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 17, + "TrackId": 1278 + }, + { + "PlaylistId": 17, + "TrackId": 1283 + }, + { + "PlaylistId": 17, + "TrackId": 1335 + }, + { + "PlaylistId": 17, + "TrackId": 1345 + }, + { + "PlaylistId": 17, + "TrackId": 1380 + }, + { + "PlaylistId": 17, + "TrackId": 1392 + }, + { + "PlaylistId": 17, + "TrackId": 152 + }, + { + "PlaylistId": 17, + "TrackId": 160 + }, + { + "PlaylistId": 17, + "TrackId": 1801 + }, + { + "PlaylistId": 17, + "TrackId": 1830 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3630ceac4730c0ad/request.json b/test-snapshots/query/3630ceac4730c0ad/request.json new file mode 100644 index 0000000..b5f8848 --- /dev/null +++ b/test-snapshots/query/3630ceac4730c0ad/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/36883ad6204cfcb7/expected.json b/test-snapshots/query/36883ad6204cfcb7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/36883ad6204cfcb7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/36883ad6204cfcb7/request.json b/test-snapshots/query/36883ad6204cfcb7/request.json new file mode 100644 index 0000000..a3923cb --- /dev/null +++ b/test-snapshots/query/36883ad6204cfcb7/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/36aa16a286c8905e/expected.json b/test-snapshots/query/36aa16a286c8905e/expected.json new file mode 100644 index 0000000..baa9b91 --- /dev/null +++ b/test-snapshots/query/36aa16a286c8905e/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/36aa16a286c8905e/request.json b/test-snapshots/query/36aa16a286c8905e/request.json new file mode 100644 index 0000000..a979eb2 --- /dev/null +++ b/test-snapshots/query/36aa16a286c8905e/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/36c8a0b92e96cd4/expected.json b/test-snapshots/query/36c8a0b92e96cd4/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/36c8a0b92e96cd4/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/36c8a0b92e96cd4/request.json b/test-snapshots/query/36c8a0b92e96cd4/request.json new file mode 100644 index 0000000..9b6eb14 --- /dev/null +++ b/test-snapshots/query/36c8a0b92e96cd4/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/36d23ad4ccf69be0/expected.json b/test-snapshots/query/36d23ad4ccf69be0/expected.json new file mode 100644 index 0000000..a21539a --- /dev/null +++ b/test-snapshots/query/36d23ad4ccf69be0/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/36d23ad4ccf69be0/request.json b/test-snapshots/query/36d23ad4ccf69be0/request.json new file mode 100644 index 0000000..df7ee9b --- /dev/null +++ b/test-snapshots/query/36d23ad4ccf69be0/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/373bd35a52e0097a/expected.json b/test-snapshots/query/373bd35a52e0097a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/373bd35a52e0097a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/373bd35a52e0097a/request.json b/test-snapshots/query/373bd35a52e0097a/request.json new file mode 100644 index 0000000..d2cd85b --- /dev/null +++ b/test-snapshots/query/373bd35a52e0097a/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/37597d373f4d359e/expected.json b/test-snapshots/query/37597d373f4d359e/expected.json new file mode 100644 index 0000000..f0d2cca --- /dev/null +++ b/test-snapshots/query/37597d373f4d359e/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6806": "90’s Music" + }, + { + "Name_6806": "Audiobooks" + }, + { + "Name_6806": "Audiobooks" + }, + { + "Name_6806": "Brazilian Music" + }, + { + "Name_6806": "Classical" + }, + { + "Name_6806": "Classical 101 - Deep Cuts" + }, + { + "Name_6806": "Classical 101 - Next Steps" + }, + { + "Name_6806": "Classical 101 - The Basics" + }, + { + "Name_6806": "Grunge" + }, + { + "Name_6806": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/37597d373f4d359e/request.json b/test-snapshots/query/37597d373f4d359e/request.json new file mode 100644 index 0000000..ceb1efb --- /dev/null +++ b/test-snapshots/query/37597d373f4d359e/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_6806": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/37901aa0ab129091/expected.json b/test-snapshots/query/37901aa0ab129091/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/37901aa0ab129091/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/37901aa0ab129091/request.json b/test-snapshots/query/37901aa0ab129091/request.json new file mode 100644 index 0000000..de8d72f --- /dev/null +++ b/test-snapshots/query/37901aa0ab129091/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/37a93f82e3a63916/expected.json b/test-snapshots/query/37a93f82e3a63916/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/37a93f82e3a63916/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/37a93f82e3a63916/request.json b/test-snapshots/query/37a93f82e3a63916/request.json new file mode 100644 index 0000000..74c909a --- /dev/null +++ b/test-snapshots/query/37a93f82e3a63916/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "110017" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tremblay" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/37c77d5869394b1/expected.json b/test-snapshots/query/37c77d5869394b1/expected.json new file mode 100644 index 0000000..393cd2b --- /dev/null +++ b/test-snapshots/query/37c77d5869394b1/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_6557": 412, + "InvoiceLineId_1710": 2240, + "Quantity_4394": 1, + "TrackId_3331": 3177, + "UnitPrice_7179": 1.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2239, + "Quantity_4394": 1, + "TrackId_3331": 3163, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2238, + "Quantity_4394": 1, + "TrackId_3331": 3154, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2237, + "Quantity_4394": 1, + "TrackId_3331": 3145, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2236, + "Quantity_4394": 1, + "TrackId_3331": 3136, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2235, + "Quantity_4394": 1, + "TrackId_3331": 3127, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2234, + "Quantity_4394": 1, + "TrackId_3331": 3118, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2233, + "Quantity_4394": 1, + "TrackId_3331": 3109, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2232, + "Quantity_4394": 1, + "TrackId_3331": 3100, + "UnitPrice_7179": 0.99 + }, + { + "InvoiceId_6557": 411, + "InvoiceLineId_1710": 2231, + "Quantity_4394": 1, + "TrackId_3331": 3091, + "UnitPrice_7179": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/37c77d5869394b1/request.json b/test-snapshots/query/37c77d5869394b1/request.json new file mode 100644 index 0000000..ebc1782 --- /dev/null +++ b/test-snapshots/query/37c77d5869394b1/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_6557": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_1710": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_4394": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_3331": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_7179": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/37d5cc1c121c32f8/expected.json b/test-snapshots/query/37d5cc1c121c32f8/expected.json new file mode 100644 index 0000000..81e043d --- /dev/null +++ b/test-snapshots/query/37d5cc1c121c32f8/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 8, + "TrackId": 1000 + } + ] + }, + "Milliseconds_7405": 302994 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 8, + "TrackId": 1001 + } + ] + }, + "Milliseconds_7405": 209684 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 8, + "TrackId": 1002 + } + ] + }, + "Milliseconds_7405": 265848 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 8, + "TrackId": 1003 + } + ] + }, + "Milliseconds_7405": 193280 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 8, + "TrackId": 1004 + } + ] + }, + "Milliseconds_7405": 316264 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 8, + "TrackId": 1005 + } + ] + }, + "Milliseconds_7405": 271908 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 8, + "TrackId": 1006 + } + ] + }, + "Milliseconds_7405": 229198 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 8, + "TrackId": 1007 + } + ] + }, + "Milliseconds_7405": 200724 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 8, + "TrackId": 1008 + } + ] + }, + "Milliseconds_7405": 293276 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1009 + }, + { + "PlaylistId": 8, + "TrackId": 1009 + } + ] + }, + "Milliseconds_7405": 263653 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/37d5cc1c121c32f8/request.json b/test-snapshots/query/37d5cc1c121c32f8/request.json new file mode 100644 index 0000000..4528dcf --- /dev/null +++ b/test-snapshots/query/37d5cc1c121c32f8/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Milliseconds_7405": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/37eddf55e6fc297d/expected.json b/test-snapshots/query/37eddf55e6fc297d/expected.json new file mode 100644 index 0000000..6668926 --- /dev/null +++ b/test-snapshots/query/37eddf55e6fc297d/expected.json @@ -0,0 +1,18 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 17, + "TrackId": 1 + }, + { + "PlaylistId": 8, + "TrackId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/37eddf55e6fc297d/request.json b/test-snapshots/query/37eddf55e6fc297d/request.json new file mode 100644 index 0000000..b357bf3 --- /dev/null +++ b/test-snapshots/query/37eddf55e6fc297d/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/381b3d7f31f661eb/expected.json b/test-snapshots/query/381b3d7f31f661eb/expected.json new file mode 100644 index 0000000..dc78aa7 --- /dev/null +++ b/test-snapshots/query/381b3d7f31f661eb/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_2781": 1, + "Title_2298": "For Those About To Rock We Salute You" + }, + { + "AlbumId_2781": 2, + "Title_2298": "Balls to the Wall" + }, + { + "AlbumId_2781": 3, + "Title_2298": "Restless and Wild" + }, + { + "AlbumId_2781": 4, + "Title_2298": "Let There Be Rock" + }, + { + "AlbumId_2781": 5, + "Title_2298": "Big Ones" + }, + { + "AlbumId_2781": 6, + "Title_2298": "Jagged Little Pill" + }, + { + "AlbumId_2781": 7, + "Title_2298": "Facelift" + }, + { + "AlbumId_2781": 8, + "Title_2298": "Warner 25 Anos" + }, + { + "AlbumId_2781": 9, + "Title_2298": "Plays Metallica By Four Cellos" + }, + { + "AlbumId_2781": 10, + "Title_2298": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/381b3d7f31f661eb/request.json b/test-snapshots/query/381b3d7f31f661eb/request.json new file mode 100644 index 0000000..cd41114 --- /dev/null +++ b/test-snapshots/query/381b3d7f31f661eb/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_2781": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_2298": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3820212eb6865840/expected.json b/test-snapshots/query/3820212eb6865840/expected.json new file mode 100644 index 0000000..7f3d7fd --- /dev/null +++ b/test-snapshots/query/3820212eb6865840/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_9386": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "Title_9386": "Mozart: Chamber Music" + }, + { + "Title_9386": "Monteverdi: L'Orfeo" + }, + { + "Title_9386": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "Title_9386": "Respighi:Pines of Rome" + }, + { + "Title_9386": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "Title_9386": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "Title_9386": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "Title_9386": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "Title_9386": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3820212eb6865840/request.json b/test-snapshots/query/3820212eb6865840/request.json new file mode 100644 index 0000000..6042569 --- /dev/null +++ b/test-snapshots/query/3820212eb6865840/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_9386": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3825ad8eb242e438/expected.json b/test-snapshots/query/3825ad8eb242e438/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3825ad8eb242e438/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3825ad8eb242e438/request.json b/test-snapshots/query/3825ad8eb242e438/request.json new file mode 100644 index 0000000..af60930 --- /dev/null +++ b/test-snapshots/query/3825ad8eb242e438/request.json @@ -0,0 +1,171 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Manager" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T5K 2N1" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3825be21a743da15/expected.json b/test-snapshots/query/3825be21a743da15/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3825be21a743da15/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3825be21a743da15/request.json b/test-snapshots/query/3825be21a743da15/request.json new file mode 100644 index 0000000..17c0319 --- /dev/null +++ b/test-snapshots/query/3825be21a743da15/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/382b270fbf725c3/expected.json b/test-snapshots/query/382b270fbf725c3/expected.json new file mode 100644 index 0000000..8eb654f --- /dev/null +++ b/test-snapshots/query/382b270fbf725c3/expected.json @@ -0,0 +1,281 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "Bytes_8091": 10003747, + "GenreId_8129": 7, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10003794, + "GenreId_8129": 3, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10005675, + "GenreId_8129": 4, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10009697, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10012231, + "GenreId_8129": 7, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10014683, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10019269, + "GenreId_8129": 7, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10019861, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10020122, + "GenreId_8129": 10, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10022428, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + } + ] + }, + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "Bytes_8091": 10085867, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10887931, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 16454937, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 2229617, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 3819535, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 8052374, + "GenreId_8129": 23, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 9785346, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + } + ] + }, + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "Bytes_8091": 10201342, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 10564704, + "GenreId_8129": 9, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 11157785, + "GenreId_8129": 23, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 1189062, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 1208080, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 1851753, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 1944738, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 1973559, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 2081895, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 2189002, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + } + ] + }, + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "Bytes_8091": 1054423946, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 1059546140, + "GenreId_8129": 21, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 183867185, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 197937785, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 201654606, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 204995876, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 206500939, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 207045178, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 207607466, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + }, + { + "Bytes_8091": 207748198, + "GenreId_8129": 19, + "UnitPrice_1087": 1.99 + } + ] + }, + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "Bytes_8091": 2775071, + "GenreId_8129": 7, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 3240609, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 3453849, + "GenreId_8129": 1, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 4011615, + "GenreId_8129": 2, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 4292028, + "GenreId_8129": 2, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 4615841, + "GenreId_8129": 16, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 4821485, + "GenreId_8129": 2, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 4855457, + "GenreId_8129": 16, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 5327463, + "GenreId_8129": 15, + "UnitPrice_1087": 0.99 + }, + { + "Bytes_8091": 5817216, + "GenreId_8129": 24, + "UnitPrice_1087": 0.99 + } + ] + }, + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/382b270fbf725c3/request.json b/test-snapshots/query/382b270fbf725c3/request.json new file mode 100644 index 0000000..80a24af --- /dev/null +++ b/test-snapshots/query/382b270fbf725c3/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "UnitPrice_1087": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Bytes_8091": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "GenreId_8129": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/38570955658d1a1e/expected.json b/test-snapshots/query/38570955658d1a1e/expected.json new file mode 100644 index 0000000..22a1202 --- /dev/null +++ b/test-snapshots/query/38570955658d1a1e/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/38570955658d1a1e/request.json b/test-snapshots/query/38570955658d1a1e/request.json new file mode 100644 index 0000000..2e9e7ed --- /dev/null +++ b/test-snapshots/query/38570955658d1a1e/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/389ac6d1bdcd4b63/expected.json b/test-snapshots/query/389ac6d1bdcd4b63/expected.json new file mode 100644 index 0000000..510c0d5 --- /dev/null +++ b/test-snapshots/query/389ac6d1bdcd4b63/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_3773": "11120 Jasper Ave NW", + "BirthDate_8397": "1962-02-18", + "City_1550": "Edmonton", + "Country_8617": "Canada", + "Email_4529": "andrew@chinookcorp.com", + "Fax_9530": "+1 (780) 428-3457", + "FirstName_6610": "Andrew", + "HireDate_8677": "2002-08-14", + "LastName_6326": "Adams", + "Phone_0472": "+1 (780) 428-9482", + "PostalCode_1555": "T5K 2N1", + "State_9549": "AB", + "Title_2425": "General Manager" + }, + { + "Address_3773": "923 7 ST NW", + "BirthDate_8397": "1968-01-09", + "City_1550": "Lethbridge", + "Country_8617": "Canada", + "Email_4529": "laura@chinookcorp.com", + "Fax_9530": "+1 (403) 467-8772", + "FirstName_6610": "Laura", + "HireDate_8677": "2004-03-04", + "LastName_6326": "Callahan", + "Phone_0472": "+1 (403) 467-3351", + "PostalCode_1555": "T1H 1Y8", + "State_9549": "AB", + "Title_2425": "IT Staff" + }, + { + "Address_3773": "825 8 Ave SW", + "BirthDate_8397": "1958-12-08", + "City_1550": "Calgary", + "Country_8617": "Canada", + "Email_4529": "nancy@chinookcorp.com", + "Fax_9530": "+1 (403) 262-3322", + "FirstName_6610": "Nancy", + "HireDate_8677": "2002-05-01", + "LastName_6326": "Edwards", + "Phone_0472": "+1 (403) 262-3443", + "PostalCode_1555": "T2P 2T3", + "State_9549": "AB", + "Title_2425": "Sales Manager" + }, + { + "Address_3773": "7727B 41 Ave", + "BirthDate_8397": "1965-03-03", + "City_1550": "Calgary", + "Country_8617": "Canada", + "Email_4529": "steve@chinookcorp.com", + "Fax_9530": "1 (780) 836-9543", + "FirstName_6610": "Steve", + "HireDate_8677": "2003-10-17", + "LastName_6326": "Johnson", + "Phone_0472": "1 (780) 836-9987", + "PostalCode_1555": "T3B 1Y7", + "State_9549": "AB", + "Title_2425": "Sales Support Agent" + }, + { + "Address_3773": "590 Columbia Boulevard West", + "BirthDate_8397": "1970-05-29", + "City_1550": "Lethbridge", + "Country_8617": "Canada", + "Email_4529": "robert@chinookcorp.com", + "Fax_9530": "+1 (403) 456-8485", + "FirstName_6610": "Robert", + "HireDate_8677": "2004-01-02", + "LastName_6326": "King", + "Phone_0472": "+1 (403) 456-9986", + "PostalCode_1555": "T1K 5N8", + "State_9549": "AB", + "Title_2425": "IT Staff" + }, + { + "Address_3773": "5827 Bowness Road NW", + "BirthDate_8397": "1973-07-01", + "City_1550": "Calgary", + "Country_8617": "Canada", + "Email_4529": "michael@chinookcorp.com", + "Fax_9530": "+1 (403) 246-9899", + "FirstName_6610": "Michael", + "HireDate_8677": "2003-10-17", + "LastName_6326": "Mitchell", + "Phone_0472": "+1 (403) 246-9887", + "PostalCode_1555": "T3B 0C5", + "State_9549": "AB", + "Title_2425": "IT Manager" + }, + { + "Address_3773": "683 10 Street SW", + "BirthDate_8397": "1947-09-19", + "City_1550": "Calgary", + "Country_8617": "Canada", + "Email_4529": "margaret@chinookcorp.com", + "Fax_9530": "+1 (403) 263-4289", + "FirstName_6610": "Margaret", + "HireDate_8677": "2003-05-03", + "LastName_6326": "Park", + "Phone_0472": "+1 (403) 263-4423", + "PostalCode_1555": "T2P 5G3", + "State_9549": "AB", + "Title_2425": "Sales Support Agent" + }, + { + "Address_3773": "1111 6 Ave SW", + "BirthDate_8397": "1973-08-29", + "City_1550": "Calgary", + "Country_8617": "Canada", + "Email_4529": "jane@chinookcorp.com", + "Fax_9530": "+1 (403) 262-6712", + "FirstName_6610": "Jane", + "HireDate_8677": "2002-04-01", + "LastName_6326": "Peacock", + "Phone_0472": "+1 (403) 262-3443", + "PostalCode_1555": "T2P 5M5", + "State_9549": "AB", + "Title_2425": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/389ac6d1bdcd4b63/request.json b/test-snapshots/query/389ac6d1bdcd4b63/request.json new file mode 100644 index 0000000..1364b6e --- /dev/null +++ b/test-snapshots/query/389ac6d1bdcd4b63/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_3773": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_8397": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_1550": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_8617": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_4529": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_9549": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_9530": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6610": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_8677": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6326": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_0472": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_1555": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Title_2425": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/38e6a38de1a251d9/expected.json b/test-snapshots/query/38e6a38de1a251d9/expected.json new file mode 100644 index 0000000..f3bfa28 --- /dev/null +++ b/test-snapshots/query/38e6a38de1a251d9/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-01-08", + "InvoiceId": 85, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-02-18", + "InvoiceId": 96, + "Total": 21.86 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-10-19", + "InvoiceId": 151, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/38e6a38de1a251d9/request.json b/test-snapshots/query/38e6a38de1a251d9/request.json new file mode 100644 index 0000000..fdfa07b --- /dev/null +++ b/test-snapshots/query/38e6a38de1a251d9/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 020 7976 5722" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3910436ae1b09950/expected.json b/test-snapshots/query/3910436ae1b09950/expected.json new file mode 100644 index 0000000..59bc1e9 --- /dev/null +++ b/test-snapshots/query/3910436ae1b09950/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3910436ae1b09950/request.json b/test-snapshots/query/3910436ae1b09950/request.json new file mode 100644 index 0000000..e72d3b0 --- /dev/null +++ b/test-snapshots/query/3910436ae1b09950/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/39111739f1d4d2d0/expected.json b/test-snapshots/query/39111739f1d4d2d0/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/39111739f1d4d2d0/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/39111739f1d4d2d0/request.json b/test-snapshots/query/39111739f1d4d2d0/request.json new file mode 100644 index 0000000..0eac45c --- /dev/null +++ b/test-snapshots/query/39111739f1d4d2d0/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/391eccf536a9a5dc/expected.json b/test-snapshots/query/391eccf536a9a5dc/expected.json new file mode 100644 index 0000000..ed35475 --- /dev/null +++ b/test-snapshots/query/391eccf536a9a5dc/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/391eccf536a9a5dc/request.json b/test-snapshots/query/391eccf536a9a5dc/request.json new file mode 100644 index 0000000..2a0479b --- /dev/null +++ b/test-snapshots/query/391eccf536a9a5dc/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "manoj.pareek@rediff.com" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/392fe362f41c789d/expected.json b/test-snapshots/query/392fe362f41c789d/expected.json new file mode 100644 index 0000000..3e5d082 --- /dev/null +++ b/test-snapshots/query/392fe362f41c789d/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingAddress_3695": "Theodor-Heuss-Straße 34", + "BillingPostalCode_0953": "70174", + "BillingState_8328": null, + "CustomerId_6504": 2, + "InvoiceDate_3951": "2009-01-01", + "InvoiceId_5426": 1, + "Total_6981": 1.98 + }, + { + "BillingAddress_3695": "Ullevålsveien 14", + "BillingPostalCode_0953": "0171", + "BillingState_8328": null, + "CustomerId_6504": 4, + "InvoiceDate_3951": "2009-01-02", + "InvoiceId_5426": 2, + "Total_6981": 3.96 + }, + { + "BillingAddress_3695": "Grétrystraat 63", + "BillingPostalCode_0953": "1000", + "BillingState_8328": null, + "CustomerId_6504": 8, + "InvoiceDate_3951": "2009-01-03", + "InvoiceId_5426": 3, + "Total_6981": 5.94 + }, + { + "BillingAddress_3695": "8210 111 ST NW", + "BillingPostalCode_0953": "T6G 2C7", + "BillingState_8328": "AB", + "CustomerId_6504": 14, + "InvoiceDate_3951": "2009-01-06", + "InvoiceId_5426": 4, + "Total_6981": 8.91 + }, + { + "BillingAddress_3695": "69 Salem Street", + "BillingPostalCode_0953": "2113", + "BillingState_8328": "MA", + "CustomerId_6504": 23, + "InvoiceDate_3951": "2009-01-11", + "InvoiceId_5426": 5, + "Total_6981": 13.86 + }, + { + "BillingAddress_3695": "Berger Straße 10", + "BillingPostalCode_0953": "60316", + "BillingState_8328": null, + "CustomerId_6504": 37, + "InvoiceDate_3951": "2009-01-19", + "InvoiceId_5426": 6, + "Total_6981": 0.99 + }, + { + "BillingAddress_3695": "Barbarossastraße 19", + "BillingPostalCode_0953": "10779", + "BillingState_8328": null, + "CustomerId_6504": 38, + "InvoiceDate_3951": "2009-02-01", + "InvoiceId_5426": 7, + "Total_6981": 1.98 + }, + { + "BillingAddress_3695": "8, Rue Hanovre", + "BillingPostalCode_0953": "75002", + "BillingState_8328": null, + "CustomerId_6504": 40, + "InvoiceDate_3951": "2009-02-01", + "InvoiceId_5426": 8, + "Total_6981": 1.98 + }, + { + "BillingAddress_3695": "9, Place Louis Barthou", + "BillingPostalCode_0953": "33000", + "BillingState_8328": null, + "CustomerId_6504": 42, + "InvoiceDate_3951": "2009-02-02", + "InvoiceId_5426": 9, + "Total_6981": 3.96 + }, + { + "BillingAddress_3695": "3 Chatham Street", + "BillingPostalCode_0953": null, + "BillingState_8328": "Dublin", + "CustomerId_6504": 46, + "InvoiceDate_3951": "2009-02-03", + "InvoiceId_5426": 10, + "Total_6981": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/392fe362f41c789d/request.json b/test-snapshots/query/392fe362f41c789d/request.json new file mode 100644 index 0000000..ae5efcc --- /dev/null +++ b/test-snapshots/query/392fe362f41c789d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_3695": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "InvoiceId_5426": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_6981": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingPostalCode_0953": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_8328": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_6504": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_3951": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/396f4dfd6ecc5160/expected.json b/test-snapshots/query/396f4dfd6ecc5160/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/396f4dfd6ecc5160/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/396f4dfd6ecc5160/request.json b/test-snapshots/query/396f4dfd6ecc5160/request.json new file mode 100644 index 0000000..68ee4da --- /dev/null +++ b/test-snapshots/query/396f4dfd6ecc5160/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3973d889a52f1d3f/expected.json b/test-snapshots/query/3973d889a52f1d3f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3973d889a52f1d3f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3973d889a52f1d3f/request.json b/test-snapshots/query/3973d889a52f1d3f/request.json new file mode 100644 index 0000000..1b7ced1 --- /dev/null +++ b/test-snapshots/query/3973d889a52f1d3f/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Johnson" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/39a7592487ed0610/expected.json b/test-snapshots/query/39a7592487ed0610/expected.json new file mode 100644 index 0000000..0bbffd3 --- /dev/null +++ b/test-snapshots/query/39a7592487ed0610/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/39a7592487ed0610/request.json b/test-snapshots/query/39a7592487ed0610/request.json new file mode 100644 index 0000000..9293052 --- /dev/null +++ b/test-snapshots/query/39a7592487ed0610/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-04-14" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/39bfb637059259c9/expected.json b/test-snapshots/query/39bfb637059259c9/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/39bfb637059259c9/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/39bfb637059259c9/request.json b/test-snapshots/query/39bfb637059259c9/request.json new file mode 100644 index 0000000..3f09195 --- /dev/null +++ b/test-snapshots/query/39bfb637059259c9/request.json @@ -0,0 +1,101 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3a180106ca03db4d/expected.json b/test-snapshots/query/3a180106ca03db4d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3a180106ca03db4d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3a180106ca03db4d/request.json b/test-snapshots/query/3a180106ca03db4d/request.json new file mode 100644 index 0000000..f0cc007 --- /dev/null +++ b/test-snapshots/query/3a180106ca03db4d/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 262-3322" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "jane@chinookcorp.com" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3a3b722b0224cf67/expected.json b/test-snapshots/query/3a3b722b0224cf67/expected.json new file mode 100644 index 0000000..c54e83f --- /dev/null +++ b/test-snapshots/query/3a3b722b0224cf67/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3a3b722b0224cf67/request.json b/test-snapshots/query/3a3b722b0224cf67/request.json new file mode 100644 index 0000000..2c35dd0 --- /dev/null +++ b/test-snapshots/query/3a3b722b0224cf67/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1009 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3a65d97768e3dec3/expected.json b/test-snapshots/query/3a65d97768e3dec3/expected.json new file mode 100644 index 0000000..8261e68 --- /dev/null +++ b/test-snapshots/query/3a65d97768e3dec3/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3a65d97768e3dec3/request.json b/test-snapshots/query/3a65d97768e3dec3/request.json new file mode 100644 index 0000000..d482fdc --- /dev/null +++ b/test-snapshots/query/3a65d97768e3dec3/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3a72ffb28a160d13/expected.json b/test-snapshots/query/3a72ffb28a160d13/expected.json new file mode 100644 index 0000000..cc46c1e --- /dev/null +++ b/test-snapshots/query/3a72ffb28a160d13/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "BillingCountry_count_4695": 412, + "CustomerId_sum_2814": 12331, + "InvoiceDate_max_0928": "2013-12-22", + "InvoiceDate_min_8432": "2009-01-01", + "InvoiceId_count_7341": 412 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/3a72ffb28a160d13/request.json b/test-snapshots/query/3a72ffb28a160d13/request.json new file mode 100644 index 0000000..a05df4c --- /dev/null +++ b/test-snapshots/query/3a72ffb28a160d13/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Invoice", + "query": { + "aggregates": { + "BillingCountry_count_4695": { + "type": "single_column", + "column": "BillingCountry", + "function": "count" + }, + "InvoiceId_count_7341": { + "type": "single_column", + "column": "InvoiceId", + "function": "count" + }, + "CustomerId_sum_2814": { + "type": "single_column", + "column": "CustomerId", + "function": "sum" + }, + "InvoiceDate_max_0928": { + "type": "single_column", + "column": "InvoiceDate", + "function": "max" + }, + "InvoiceDate_min_8432": { + "type": "single_column", + "column": "InvoiceDate", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3a7eba92851a3794/expected.json b/test-snapshots/query/3a7eba92851a3794/expected.json new file mode 100644 index 0000000..8f8ff9f --- /dev/null +++ b/test-snapshots/query/3a7eba92851a3794/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3a7eba92851a3794/request.json b/test-snapshots/query/3a7eba92851a3794/request.json new file mode 100644 index 0000000..d7a2189 --- /dev/null +++ b/test-snapshots/query/3a7eba92851a3794/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3a87640abbfa637d/expected.json b/test-snapshots/query/3a87640abbfa637d/expected.json new file mode 100644 index 0000000..3f9c0cd --- /dev/null +++ b/test-snapshots/query/3a87640abbfa637d/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 8, + "TrackId": 1003 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3a87640abbfa637d/request.json b/test-snapshots/query/3a87640abbfa637d/request.json new file mode 100644 index 0000000..af6f1ed --- /dev/null +++ b/test-snapshots/query/3a87640abbfa637d/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3abb7c4ca3da6568/expected.json b/test-snapshots/query/3abb7c4ca3da6568/expected.json new file mode 100644 index 0000000..6d2fef0 --- /dev/null +++ b/test-snapshots/query/3abb7c4ca3da6568/expected.json @@ -0,0 +1,240 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 1 + }, + { + "PlaylistId_7674": 17, + "TrackId_3244": 1 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 11 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 11 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 9 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 9 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 13 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 13 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 6 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 6 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 8 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 8 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 7 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 7 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 12 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 12 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 10 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 10 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_7674": 1, + "TrackId_3244": 14 + }, + { + "PlaylistId_7674": 8, + "TrackId_3244": 14 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3abb7c4ca3da6568/request.json b/test-snapshots/query/3abb7c4ca3da6568/request.json new file mode 100644 index 0000000..6b6fe41 --- /dev/null +++ b/test-snapshots/query/3abb7c4ca3da6568/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId_7674": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_3244": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3ad103fdb399221d/expected.json b/test-snapshots/query/3ad103fdb399221d/expected.json new file mode 100644 index 0000000..36226b4 --- /dev/null +++ b/test-snapshots/query/3ad103fdb399221d/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "AlbumId_7647": 1, + "Bytes_9309": 11170334, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 6566314, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 6599424, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 6706347, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 6713451, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 6852860, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 7636561, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 8596840, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 8611245, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "AlbumId_7647": 1, + "Bytes_9309": 8817038, + "Composer_7098": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3ad103fdb399221d/request.json b/test-snapshots/query/3ad103fdb399221d/request.json new file mode 100644 index 0000000..0fc1c31 --- /dev/null +++ b/test-snapshots/query/3ad103fdb399221d/request.json @@ -0,0 +1,59 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_7647": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_9309": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_7098": { + "type": "column", + "column": "Composer", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3aff6742a74aaaff/expected.json b/test-snapshots/query/3aff6742a74aaaff/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3aff6742a74aaaff/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3aff6742a74aaaff/request.json b/test-snapshots/query/3aff6742a74aaaff/request.json new file mode 100644 index 0000000..50c633d --- /dev/null +++ b/test-snapshots/query/3aff6742a74aaaff/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "825 8 Ave SW" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 (780) 836-9543" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3b0d968c182c0293/expected.json b/test-snapshots/query/3b0d968c182c0293/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3b0d968c182c0293/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b0d968c182c0293/request.json b/test-snapshots/query/3b0d968c182c0293/request.json new file mode 100644 index 0000000..7393196 --- /dev/null +++ b/test-snapshots/query/3b0d968c182c0293/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 246-9899" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Steve" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3b1e3895d5f6cef/expected.json b/test-snapshots/query/3b1e3895d5f6cef/expected.json new file mode 100644 index 0000000..b69d3de --- /dev/null +++ b/test-snapshots/query/3b1e3895d5f6cef/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1057 + }, + { + "PlaylistId": 1, + "TrackId": 1058 + }, + { + "PlaylistId": 1, + "TrackId": 1059 + }, + { + "PlaylistId": 1, + "TrackId": 1060 + }, + { + "PlaylistId": 1, + "TrackId": 1061 + }, + { + "PlaylistId": 1, + "TrackId": 1062 + }, + { + "PlaylistId": 1, + "TrackId": 1063 + }, + { + "PlaylistId": 1, + "TrackId": 1064 + }, + { + "PlaylistId": 1, + "TrackId": 1066 + }, + { + "PlaylistId": 1, + "TrackId": 1067 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b1e3895d5f6cef/request.json b/test-snapshots/query/3b1e3895d5f6cef/request.json new file mode 100644 index 0000000..792b066 --- /dev/null +++ b/test-snapshots/query/3b1e3895d5f6cef/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3b1fc4ba4e39f408/expected.json b/test-snapshots/query/3b1fc4ba4e39f408/expected.json new file mode 100644 index 0000000..0f9cd54 --- /dev/null +++ b/test-snapshots/query/3b1fc4ba4e39f408/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b1fc4ba4e39f408/request.json b/test-snapshots/query/3b1fc4ba4e39f408/request.json new file mode 100644 index 0000000..27acd31 --- /dev/null +++ b/test-snapshots/query/3b1fc4ba4e39f408/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "London" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3b2ede0fbf2cde9c/expected.json b/test-snapshots/query/3b2ede0fbf2cde9c/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/3b2ede0fbf2cde9c/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b2ede0fbf2cde9c/request.json b/test-snapshots/query/3b2ede0fbf2cde9c/request.json new file mode 100644 index 0000000..2506ea2 --- /dev/null +++ b/test-snapshots/query/3b2ede0fbf2cde9c/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3b309746e282a17b/expected.json b/test-snapshots/query/3b309746e282a17b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3b309746e282a17b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b309746e282a17b/request.json b/test-snapshots/query/3b309746e282a17b/request.json new file mode 100644 index 0000000..83436a8 --- /dev/null +++ b/test-snapshots/query/3b309746e282a17b/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lethbridge" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1111 6 Ave SW" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3b5d54456078e5a1/expected.json b/test-snapshots/query/3b5d54456078e5a1/expected.json new file mode 100644 index 0000000..e3c2442 --- /dev/null +++ b/test-snapshots/query/3b5d54456078e5a1/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_7024": "90’s Music", + "PlaylistId_2077": 5 + }, + { + "Name_7024": "Audiobooks", + "PlaylistId_2077": 4 + }, + { + "Name_7024": "Audiobooks", + "PlaylistId_2077": 6 + }, + { + "Name_7024": "Brazilian Music", + "PlaylistId_2077": 11 + }, + { + "Name_7024": "Classical", + "PlaylistId_2077": 12 + }, + { + "Name_7024": "Classical 101 - Deep Cuts", + "PlaylistId_2077": 13 + }, + { + "Name_7024": "Classical 101 - Next Steps", + "PlaylistId_2077": 14 + }, + { + "Name_7024": "Classical 101 - The Basics", + "PlaylistId_2077": 15 + }, + { + "Name_7024": "Grunge", + "PlaylistId_2077": 16 + }, + { + "Name_7024": "Heavy Metal Classic", + "PlaylistId_2077": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b5d54456078e5a1/request.json b/test-snapshots/query/3b5d54456078e5a1/request.json new file mode 100644 index 0000000..11bb9c0 --- /dev/null +++ b/test-snapshots/query/3b5d54456078e5a1/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_7024": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_2077": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3b91241d3074eac7/expected.json b/test-snapshots/query/3b91241d3074eac7/expected.json new file mode 100644 index 0000000..cc27fd5 --- /dev/null +++ b/test-snapshots/query/3b91241d3074eac7/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 11170334, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 343719, + "Name_9586": "For Those About To Rock (We Salute You)", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 11170334, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 343719, + "Name_9586": "For Those About To Rock (We Salute You)", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 17, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 11170334, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 343719, + "Name_9586": "For Those About To Rock (We Salute You)", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6566314, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 199836, + "Name_9586": "C.O.D.", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6566314, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 199836, + "Name_9586": "C.O.D.", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6599424, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 203102, + "Name_9586": "Snowballed", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6599424, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 203102, + "Name_9586": "Snowballed", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6706347, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 205688, + "Name_9586": "Night Of The Long Knives", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6706347, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 205688, + "Name_9586": "Night Of The Long Knives", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_4699": 1, + "Bytes_9369": 6713451, + "Composer_3978": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1530": 1, + "MediaTypeId_4182": 1, + "Milliseconds_0380": 205662, + "Name_9586": "Put The Finger On You", + "UnitPrice_5916": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3b91241d3074eac7/request.json b/test-snapshots/query/3b91241d3074eac7/request.json new file mode 100644 index 0000000..5be40dd --- /dev/null +++ b/test-snapshots/query/3b91241d3074eac7/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_4699": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_9369": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_3978": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_1530": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4182": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_0380": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_9586": { + "type": "column", + "column": "Name", + "fields": null + }, + "UnitPrice_5916": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3bbdeb39dc587ff3/expected.json b/test-snapshots/query/3bbdeb39dc587ff3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3bbdeb39dc587ff3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3bbdeb39dc587ff3/request.json b/test-snapshots/query/3bbdeb39dc587ff3/request.json new file mode 100644 index 0000000..e8a61ea --- /dev/null +++ b/test-snapshots/query/3bbdeb39dc587ff3/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 58 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "FL" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3bdea7144d2d59ca/expected.json b/test-snapshots/query/3bdea7144d2d59ca/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3bdea7144d2d59ca/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3bdea7144d2d59ca/request.json b/test-snapshots/query/3bdea7144d2d59ca/request.json new file mode 100644 index 0000000..0fd6876 --- /dev/null +++ b/test-snapshots/query/3bdea7144d2d59ca/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3bfc6e812bcde939/expected.json b/test-snapshots/query/3bfc6e812bcde939/expected.json new file mode 100644 index 0000000..7e2e015 --- /dev/null +++ b/test-snapshots/query/3bfc6e812bcde939/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 221, + "InvoiceLineId": 1195, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3bfc6e812bcde939/request.json b/test-snapshots/query/3bfc6e812bcde939/request.json new file mode 100644 index 0000000..7703af5 --- /dev/null +++ b/test-snapshots/query/3bfc6e812bcde939/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 252 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3c09e7791b164c60/expected.json b/test-snapshots/query/3c09e7791b164c60/expected.json new file mode 100644 index 0000000..bc40c7e --- /dev/null +++ b/test-snapshots/query/3c09e7791b164c60/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 15, + "TrackId": 3403 + }, + { + "PlaylistId": 15, + "TrackId": 3404 + }, + { + "PlaylistId": 15, + "TrackId": 3405 + }, + { + "PlaylistId": 15, + "TrackId": 3406 + }, + { + "PlaylistId": 15, + "TrackId": 3407 + }, + { + "PlaylistId": 15, + "TrackId": 3408 + }, + { + "PlaylistId": 15, + "TrackId": 3409 + }, + { + "PlaylistId": 15, + "TrackId": 3410 + }, + { + "PlaylistId": 15, + "TrackId": 3411 + }, + { + "PlaylistId": 15, + "TrackId": 3412 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3c09e7791b164c60/request.json b/test-snapshots/query/3c09e7791b164c60/request.json new file mode 100644 index 0000000..91c611a --- /dev/null +++ b/test-snapshots/query/3c09e7791b164c60/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3c3dcdd5ecb804f6/expected.json b/test-snapshots/query/3c3dcdd5ecb804f6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3c3dcdd5ecb804f6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3c3dcdd5ecb804f6/request.json b/test-snapshots/query/3c3dcdd5ecb804f6/request.json new file mode 100644 index 0000000..78d62fa --- /dev/null +++ b/test-snapshots/query/3c3dcdd5ecb804f6/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3c43543ebb07431f/expected.json b/test-snapshots/query/3c43543ebb07431f/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/3c43543ebb07431f/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3c43543ebb07431f/request.json b/test-snapshots/query/3c43543ebb07431f/request.json new file mode 100644 index 0000000..3dd206b --- /dev/null +++ b/test-snapshots/query/3c43543ebb07431f/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3c4525d3f9379ec0/expected.json b/test-snapshots/query/3c4525d3f9379ec0/expected.json new file mode 100644 index 0000000..aba5713 --- /dev/null +++ b/test-snapshots/query/3c4525d3f9379ec0/expected.json @@ -0,0 +1,187 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 100 + }, + { + "AlbumId_7729": 101 + } + ] + }, + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + }, + { + "AlbumId_7729": 121 + } + ] + }, + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId_7729": 226 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + }, + { + "AlbumId_7729": 227 + } + ] + }, + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId_7729": 260 + }, + { + "AlbumId_7729": 283 + }, + { + "AlbumId_7729": 318 + }, + { + "AlbumId_7729": 324 + }, + { + "AlbumId_7729": 325 + }, + { + "AlbumId_7729": 340 + }, + { + "AlbumId_7729": 342 + } + ] + }, + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId_7729": 262 + }, + { + "AlbumId_7729": 262 + }, + { + "AlbumId_7729": 263 + }, + { + "AlbumId_7729": 263 + }, + { + "AlbumId_7729": 264 + }, + { + "AlbumId_7729": 264 + }, + { + "AlbumId_7729": 265 + }, + { + "AlbumId_7729": 265 + }, + { + "AlbumId_7729": 266 + }, + { + "AlbumId_7729": 267 + } + ] + }, + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3c4525d3f9379ec0/request.json b/test-snapshots/query/3c4525d3f9379ec0/request.json new file mode 100644 index 0000000..69936e2 --- /dev/null +++ b/test-snapshots/query/3c4525d3f9379ec0/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_7729": { + "type": "column", + "column": "AlbumId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3c9392d0a05dd3d0/expected.json b/test-snapshots/query/3c9392d0a05dd3d0/expected.json new file mode 100644 index 0000000..0c677f9 --- /dev/null +++ b/test-snapshots/query/3c9392d0a05dd3d0/expected.json @@ -0,0 +1,406 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 15 + }, + { + "InvoiceId_1713": 210 + }, + { + "InvoiceId_1713": 233 + }, + { + "InvoiceId_1713": 255 + }, + { + "InvoiceId_1713": 26 + }, + { + "InvoiceId_1713": 307 + }, + { + "InvoiceId_1713": 81 + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 111 + }, + { + "InvoiceId_1713": 14 + }, + { + "InvoiceId_1713": 232 + }, + { + "InvoiceId_1713": 243 + }, + { + "InvoiceId_1713": 298 + }, + { + "InvoiceId_1713": 37 + }, + { + "InvoiceId_1713": 59 + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 168 + }, + { + "InvoiceId_1713": 191 + }, + { + "InvoiceId_1713": 213 + }, + { + "InvoiceId_1713": 265 + }, + { + "InvoiceId_1713": 386 + }, + { + "InvoiceId_1713": 397 + }, + { + "InvoiceId_1713": 39 + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 106 + }, + { + "InvoiceId_1713": 117 + }, + { + "InvoiceId_1713": 172 + }, + { + "InvoiceId_1713": 301 + }, + { + "InvoiceId_1713": 324 + }, + { + "InvoiceId_1713": 346 + }, + { + "InvoiceId_1713": 398 + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 141 + }, + { + "InvoiceId_1713": 152 + }, + { + "InvoiceId_1713": 207 + }, + { + "InvoiceId_1713": 20 + }, + { + "InvoiceId_1713": 336 + }, + { + "InvoiceId_1713": 359 + }, + { + "InvoiceId_1713": 381 + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 109 + }, + { + "InvoiceId_1713": 238 + }, + { + "InvoiceId_1713": 261 + }, + { + "InvoiceId_1713": 283 + }, + { + "InvoiceId_1713": 335 + }, + { + "InvoiceId_1713": 43 + }, + { + "InvoiceId_1713": 54 + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 120 + }, + { + "InvoiceId_1713": 131 + }, + { + "InvoiceId_1713": 186 + }, + { + "InvoiceId_1713": 315 + }, + { + "InvoiceId_1713": 338 + }, + { + "InvoiceId_1713": 360 + }, + { + "InvoiceId_1713": 412 + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 114 + }, + { + "InvoiceId_1713": 136 + }, + { + "InvoiceId_1713": 188 + }, + { + "InvoiceId_1713": 309 + }, + { + "InvoiceId_1713": 320 + }, + { + "InvoiceId_1713": 375 + }, + { + "InvoiceId_1713": 91 + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 110 + }, + { + "InvoiceId_1713": 165 + }, + { + "InvoiceId_1713": 294 + }, + { + "InvoiceId_1713": 317 + }, + { + "InvoiceId_1713": 339 + }, + { + "InvoiceId_1713": 391 + }, + { + "InvoiceId_1713": 99 + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "InvoiceId_1713": 134 + }, + { + "InvoiceId_1713": 13 + }, + { + "InvoiceId_1713": 145 + }, + { + "InvoiceId_1713": 200 + }, + { + "InvoiceId_1713": 329 + }, + { + "InvoiceId_1713": 352 + }, + { + "InvoiceId_1713": 374 + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3c9392d0a05dd3d0/request.json b/test-snapshots/query/3c9392d0a05dd3d0/request.json new file mode 100644 index 0000000..7296af6 --- /dev/null +++ b/test-snapshots/query/3c9392d0a05dd3d0/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId_1713": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3cbec4e729f352c8/expected.json b/test-snapshots/query/3cbec4e729f352c8/expected.json new file mode 100644 index 0000000..9b5f726 --- /dev/null +++ b/test-snapshots/query/3cbec4e729f352c8/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_9960": "11120 Jasper Ave NW", + "BirthDate_6077": "1962-02-18", + "City_6783": "Edmonton", + "Country_7582": "Canada", + "EmployeeId_5328": 1, + "Fax_3049": "+1 (780) 428-3457", + "FirstName_6529": "Andrew", + "LastName_9792": "Adams", + "Phone_1036": "+1 (780) 428-9482", + "PostalCode_9403": "T5K 2N1", + "ReportsTo_8584": null, + "State_3742": "AB", + "Title_8238": "General Manager" + }, + { + "Address_9960": "1111 6 Ave SW", + "BirthDate_6077": "1973-08-29", + "City_6783": "Calgary", + "Country_7582": "Canada", + "EmployeeId_5328": 3, + "Fax_3049": "+1 (403) 262-6712", + "FirstName_6529": "Jane", + "LastName_9792": "Peacock", + "Phone_1036": "+1 (403) 262-3443", + "PostalCode_9403": "T2P 5M5", + "ReportsTo_8584": 2, + "State_3742": "AB", + "Title_8238": "Sales Support Agent" + }, + { + "Address_9960": "923 7 ST NW", + "BirthDate_6077": "1968-01-09", + "City_6783": "Lethbridge", + "Country_7582": "Canada", + "EmployeeId_5328": 8, + "Fax_3049": "+1 (403) 467-8772", + "FirstName_6529": "Laura", + "LastName_9792": "Callahan", + "Phone_1036": "+1 (403) 467-3351", + "PostalCode_9403": "T1H 1Y8", + "ReportsTo_8584": 6, + "State_3742": "AB", + "Title_8238": "IT Staff" + }, + { + "Address_9960": "683 10 Street SW", + "BirthDate_6077": "1947-09-19", + "City_6783": "Calgary", + "Country_7582": "Canada", + "EmployeeId_5328": 4, + "Fax_3049": "+1 (403) 263-4289", + "FirstName_6529": "Margaret", + "LastName_9792": "Park", + "Phone_1036": "+1 (403) 263-4423", + "PostalCode_9403": "T2P 5G3", + "ReportsTo_8584": 2, + "State_3742": "AB", + "Title_8238": "Sales Support Agent" + }, + { + "Address_9960": "5827 Bowness Road NW", + "BirthDate_6077": "1973-07-01", + "City_6783": "Calgary", + "Country_7582": "Canada", + "EmployeeId_5328": 6, + "Fax_3049": "+1 (403) 246-9899", + "FirstName_6529": "Michael", + "LastName_9792": "Mitchell", + "Phone_1036": "+1 (403) 246-9887", + "PostalCode_9403": "T3B 0C5", + "ReportsTo_8584": 1, + "State_3742": "AB", + "Title_8238": "IT Manager" + }, + { + "Address_9960": "825 8 Ave SW", + "BirthDate_6077": "1958-12-08", + "City_6783": "Calgary", + "Country_7582": "Canada", + "EmployeeId_5328": 2, + "Fax_3049": "+1 (403) 262-3322", + "FirstName_6529": "Nancy", + "LastName_9792": "Edwards", + "Phone_1036": "+1 (403) 262-3443", + "PostalCode_9403": "T2P 2T3", + "ReportsTo_8584": 1, + "State_3742": "AB", + "Title_8238": "Sales Manager" + }, + { + "Address_9960": "590 Columbia Boulevard West", + "BirthDate_6077": "1970-05-29", + "City_6783": "Lethbridge", + "Country_7582": "Canada", + "EmployeeId_5328": 7, + "Fax_3049": "+1 (403) 456-8485", + "FirstName_6529": "Robert", + "LastName_9792": "King", + "Phone_1036": "+1 (403) 456-9986", + "PostalCode_9403": "T1K 5N8", + "ReportsTo_8584": 6, + "State_3742": "AB", + "Title_8238": "IT Staff" + }, + { + "Address_9960": "7727B 41 Ave", + "BirthDate_6077": "1965-03-03", + "City_6783": "Calgary", + "Country_7582": "Canada", + "EmployeeId_5328": 5, + "Fax_3049": "1 (780) 836-9543", + "FirstName_6529": "Steve", + "LastName_9792": "Johnson", + "Phone_1036": "1 (780) 836-9987", + "PostalCode_9403": "T3B 1Y7", + "ReportsTo_8584": 2, + "State_3742": "AB", + "Title_8238": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3cbec4e729f352c8/request.json b/test-snapshots/query/3cbec4e729f352c8/request.json new file mode 100644 index 0000000..5f0371f --- /dev/null +++ b/test-snapshots/query/3cbec4e729f352c8/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_9960": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_6077": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_6783": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_7582": { + "type": "column", + "column": "Country", + "fields": null + }, + "Title_8238": { + "type": "column", + "column": "Title", + "fields": null + }, + "EmployeeId_5328": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_3049": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6529": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "State_3742": { + "type": "column", + "column": "State", + "fields": null + }, + "LastName_9792": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1036": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_9403": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_8584": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3ceacd1df083ed22/expected.json b/test-snapshots/query/3ceacd1df083ed22/expected.json new file mode 100644 index 0000000..2fbed18 --- /dev/null +++ b/test-snapshots/query/3ceacd1df083ed22/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "ArtistId": 90, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "Title": "Powerslave" + }, + { + "AlbumId": 108, + "ArtistId": 90, + "Title": "Rock In Rio [CD1]" + }, + { + "AlbumId": 109, + "ArtistId": 90, + "Title": "Rock In Rio [CD2]" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3ceacd1df083ed22/request.json b/test-snapshots/query/3ceacd1df083ed22/request.json new file mode 100644 index 0000000..27678db --- /dev/null +++ b/test-snapshots/query/3ceacd1df083ed22/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3cf0697cbe4564b7/expected.json b/test-snapshots/query/3cf0697cbe4564b7/expected.json new file mode 100644 index 0000000..c67eab8 --- /dev/null +++ b/test-snapshots/query/3cf0697cbe4564b7/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_8896": 347, + "ArtistId_0420": 275, + "Title_9665": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_8896": 346, + "ArtistId_0420": 274, + "Title_9665": "Mozart: Chamber Music" + }, + { + "AlbumId_8896": 345, + "ArtistId_0420": 273, + "Title_9665": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_8896": 344, + "ArtistId_0420": 272, + "Title_9665": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_8896": 343, + "ArtistId_0420": 226, + "Title_9665": "Respighi:Pines of Rome" + }, + { + "AlbumId_8896": 342, + "ArtistId_0420": 271, + "Title_9665": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_8896": 341, + "ArtistId_0420": 270, + "Title_9665": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_8896": 340, + "ArtistId_0420": 269, + "Title_9665": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_8896": 339, + "ArtistId_0420": 268, + "Title_9665": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_8896": 338, + "ArtistId_0420": 267, + "Title_9665": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3cf0697cbe4564b7/request.json b/test-snapshots/query/3cf0697cbe4564b7/request.json new file mode 100644 index 0000000..cb5061e --- /dev/null +++ b/test-snapshots/query/3cf0697cbe4564b7/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_8896": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_0420": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_9665": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3d018a3d71b36da4/expected.json b/test-snapshots/query/3d018a3d71b36da4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3d018a3d71b36da4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3d018a3d71b36da4/request.json b/test-snapshots/query/3d018a3d71b36da4/request.json new file mode 100644 index 0000000..0529292 --- /dev/null +++ b/test-snapshots/query/3d018a3d71b36da4/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3d0a0c1bb229434a/expected.json b/test-snapshots/query/3d0a0c1bb229434a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3d0a0c1bb229434a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3d0a0c1bb229434a/request.json b/test-snapshots/query/3d0a0c1bb229434a/request.json new file mode 100644 index 0000000..8677dcf --- /dev/null +++ b/test-snapshots/query/3d0a0c1bb229434a/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3d340aeea4a47d1b/expected.json b/test-snapshots/query/3d340aeea4a47d1b/expected.json new file mode 100644 index 0000000..a20038d --- /dev/null +++ b/test-snapshots/query/3d340aeea4a47d1b/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_1289": 347, + "ArtistId_4109": 275, + "Title_3486": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_1289": 346, + "ArtistId_4109": 274, + "Title_3486": "Mozart: Chamber Music" + }, + { + "AlbumId_1289": 345, + "ArtistId_4109": 273, + "Title_3486": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_1289": 344, + "ArtistId_4109": 272, + "Title_3486": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_1289": 343, + "ArtistId_4109": 226, + "Title_3486": "Respighi:Pines of Rome" + }, + { + "AlbumId_1289": 342, + "ArtistId_4109": 271, + "Title_3486": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_1289": 341, + "ArtistId_4109": 270, + "Title_3486": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_1289": 340, + "ArtistId_4109": 269, + "Title_3486": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_1289": 339, + "ArtistId_4109": 268, + "Title_3486": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_1289": 338, + "ArtistId_4109": 267, + "Title_3486": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3d340aeea4a47d1b/request.json b/test-snapshots/query/3d340aeea4a47d1b/request.json new file mode 100644 index 0000000..3a8a4f9 --- /dev/null +++ b/test-snapshots/query/3d340aeea4a47d1b/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_1289": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_4109": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_3486": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3d34e2e93d3f6164/expected.json b/test-snapshots/query/3d34e2e93d3f6164/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3d34e2e93d3f6164/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3d34e2e93d3f6164/request.json b/test-snapshots/query/3d34e2e93d3f6164/request.json new file mode 100644 index 0000000..0063bdc --- /dev/null +++ b/test-snapshots/query/3d34e2e93d3f6164/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "WA" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8.91 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3d561e168e8c9f14/expected.json b/test-snapshots/query/3d561e168e8c9f14/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3d561e168e8c9f14/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3d561e168e8c9f14/request.json b/test-snapshots/query/3d561e168e8c9f14/request.json new file mode 100644 index 0000000..c09799b --- /dev/null +++ b/test-snapshots/query/3d561e168e8c9f14/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3dd8a5020f332cfe/expected.json b/test-snapshots/query/3dd8a5020f332cfe/expected.json new file mode 100644 index 0000000..74d835c --- /dev/null +++ b/test-snapshots/query/3dd8a5020f332cfe/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_6677": 10 + }, + { + "PlaylistId_6677": 3 + }, + { + "PlaylistId_6677": 18 + }, + { + "PlaylistId_6677": 9 + }, + { + "PlaylistId_6677": 8 + }, + { + "PlaylistId_6677": 1 + }, + { + "PlaylistId_6677": 7 + }, + { + "PlaylistId_6677": 2 + }, + { + "PlaylistId_6677": 17 + }, + { + "PlaylistId_6677": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3dd8a5020f332cfe/request.json b/test-snapshots/query/3dd8a5020f332cfe/request.json new file mode 100644 index 0000000..41ead1d --- /dev/null +++ b/test-snapshots/query/3dd8a5020f332cfe/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "PlaylistId_6677": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3df850943316f86d/expected.json b/test-snapshots/query/3df850943316f86d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3df850943316f86d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3df850943316f86d/request.json b/test-snapshots/query/3df850943316f86d/request.json new file mode 100644 index 0000000..46693ee --- /dev/null +++ b/test-snapshots/query/3df850943316f86d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3dfe45abca109a3d/expected.json b/test-snapshots/query/3dfe45abca109a3d/expected.json new file mode 100644 index 0000000..f259d7a --- /dev/null +++ b/test-snapshots/query/3dfe45abca109a3d/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 412 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/3dfe45abca109a3d/request.json b/test-snapshots/query/3dfe45abca109a3d/request.json new file mode 100644 index 0000000..2864aa4 --- /dev/null +++ b/test-snapshots/query/3dfe45abca109a3d/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Invoice", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3e09cbfb6c5c49aa/expected.json b/test-snapshots/query/3e09cbfb6c5c49aa/expected.json new file mode 100644 index 0000000..e910cd1 --- /dev/null +++ b/test-snapshots/query/3e09cbfb6c5c49aa/expected.json @@ -0,0 +1,1186 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 1, + "Name_9791": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + }, + { + "AlbumId": 20, + "Bytes": 14184984, + "Composer": "Buddy Guy", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 433397, + "Name": "Stone Crazy", + "TrackId": 196, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 6, + "Name_9791": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 13, + "Name_9791": "Heavy Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6455255, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 268878, + "Name": "The Trooper", + "TrackId": 1290, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6605094, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275121, + "Name": "The Number Of The Beast", + "TrackId": 1295, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 8799380, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366550, + "Name": "2 Minutes To Midnight", + "TrackId": 1289, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 3, + "Name_9791": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 11, + "Bytes": 10029406, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 309786, + "Name": "The Curse", + "TrackId": 110, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7542942, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233195, + "Name": "Man Or Animal", + "TrackId": 106, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7609178, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233691, + "Name": "Drown Me Slowly", + "TrackId": 103, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7710800, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 237714, + "Name": "The Worm", + "TrackId": 105, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8273592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255529, + "Name": "Your Time Has Come", + "TrackId": 99, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8357387, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255869, + "Name": "Doesn't Remind Me", + "TrackId": 102, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8944205, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 273763, + "Name": "Yesterday To Tomorrow", + "TrackId": 107, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9003592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 278125, + "Name": "Dandelion", + "TrackId": 108, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9006158, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 276688, + "Name": "Heaven's Dead", + "TrackId": 104, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9106160, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 279484, + "Name": "Be Yourself", + "TrackId": 101, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 4, + "Name_9791": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 115, + "Bytes": 10498031, + "Composer": "Bobby Byrd/James Brown/Ron Lenhoff", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 316551, + "Name": "Get Up (I Feel Like Being A) Sex Machine", + "TrackId": 1423, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 11183457, + "Composer": "Full Force/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 334236, + "Name": "I'm Real", + "TrackId": 1431, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4174420, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 127399, + "Name": "Papa's Got A Brand New Bag Pt.1", + "TrackId": 1418, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4711323, + "Composer": "Ted Wright", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 143725, + "Name": "Out Of Sight", + "TrackId": 1417, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5394585, + "Composer": "James Brown/Johnny Terry", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 165067, + "Name": "Please Please Please", + "TrackId": 1414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5468472, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "I Got You (I Feel Good)", + "TrackId": 1419, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5478117, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "Say It Loud, I'm Black And I'm Proud Pt.1", + "TrackId": 1422, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5513208, + "Composer": "Lowman Pauling", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 166739, + "Name": "Think", + "TrackId": 1415, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5541611, + "Composer": "Betty Newsome/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 168228, + "Name": "It's A Man's Man's Man's World", + "TrackId": 1420, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5643213, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 172408, + "Name": "Cold Sweat", + "TrackId": 1421, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 14, + "Name_9791": "R&B/Soul" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 118, + "Bytes": 10334529, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 309995, + "Name": "The Kids", + "TrackId": 1460, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 10843832, + "Composer": "Toby Smith/Wallis Buchanan", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 322455, + "Name": "Journey To Arnhemland", + "TrackId": 1463, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11043559, + "Composer": "Stuard Zender/Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 329534, + "Name": "Mr. Moon", + "TrackId": 1461, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11796244, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 354560, + "Name": "Light Years", + "TrackId": 1458, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12676962, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 382197, + "Name": "Manifest Destiny", + "TrackId": 1459, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12777210, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 384130, + "Name": "Morning Glory", + "TrackId": 1464, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12906520, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 385697, + "Name": "Space Cowboy", + "TrackId": 1465, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 14019705, + "Composer": "Stuart Zender", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 422321, + "Name": "Scam", + "TrackId": 1462, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 17582818, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 529684, + "Name": "Just Another Story", + "TrackId": 1455, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 8644290, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 257097, + "Name": "Stillness In Time", + "TrackId": 1456, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 15, + "Name_9791": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 12, + "Bytes": 1299960, + "Composer": "Ned Fairchild", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 107807, + "Name": "20 Flight Rock", + "TrackId": 122, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1704918, + "Composer": "Little Richard", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106266, + "Name": "Good Golly Miss Molly", + "TrackId": 121, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1707084, + "Composer": "Enotris Johnson/Little Richard/Robert \"Bumps\" Blackwell", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106396, + "Name": "Long Tall Sally", + "TrackId": 112, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1862126, + "Composer": "Larry Williams", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 116088, + "Name": "Bad Boy", + "TrackId": 113, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2206986, + "Composer": "Brian Holland/Freddie Gorman/Georgia Dobbins/Robert Bateman/William Garrett", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 137639, + "Name": "Please Mr. Postman", + "TrackId": 115, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2247846, + "Composer": "Eddie Cochran/Jerry Capehart", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 140199, + "Name": "C'Mon Everybody", + "TrackId": 116, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2276788, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 141923, + "Name": "Rock 'N' Roll Music", + "TrackId": 117, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2301989, + "Composer": "Bo Diddley", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143595, + "Name": "Roadrunner", + "TrackId": 119, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2306019, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143830, + "Name": "Carol", + "TrackId": 120, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2365897, + "Composer": "Berry Gordy, Jr./Janie Bradford", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 147591, + "Name": "Money", + "TrackId": 111, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 5, + "Name_9791": "Rock And Roll" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 122, + "Bytes": 10211473, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 310073, + "Name": "Engenho De Dentro", + "TrackId": 1506, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10599953, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 317100, + "Name": "W/Brasil (Chama O Síndico)", + "TrackId": 1510, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10724982, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 326321, + "Name": "Selassiê", + "TrackId": 1514, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10996656, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 338076, + "Name": "Que Maravilha", + "TrackId": 1516, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 11314756, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 343484, + "Name": "Salve Simpatia", + "TrackId": 1509, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12010478, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 355239, + "Name": "Alcohol", + "TrackId": 1507, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12304520, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 367281, + "Name": "Os Alquimistas Estão Chegando", + "TrackId": 1512, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12524725, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 380081, + "Name": "Santa Clara Clareou", + "TrackId": 1517, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 13022833, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 389276, + "Name": "Charles Anjo 45", + "TrackId": 1513, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 14946972, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 452519, + "Name": "País Tropical", + "TrackId": 1511, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 7, + "Name_9791": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 124, + "Bytes": 3948371, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 118804, + "Name": "Cuando Eu For Pro Ceu", + "TrackId": 1541, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6031174, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 180924, + "Name": "Cafezinho", + "TrackId": 1544, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6056200, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 182308, + "Name": "No Futuro", + "TrackId": 1535, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6400532, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 190484, + "Name": "Choramingando", + "TrackId": 1533, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6774566, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 203415, + "Name": "Do Nosso Amor", + "TrackId": 1542, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7104588, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 208457, + "Name": "Borogodo", + "TrackId": 1543, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7248336, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 220891, + "Name": "Enquanto O Dia Não Vem", + "TrackId": 1545, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7257390, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 213263, + "Name": "Papelão", + "TrackId": 1540, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7764601, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 230582, + "Name": "Por Merecer", + "TrackId": 1534, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 8077282, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 241084, + "Name": "Voce Inteira", + "TrackId": 1536, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_6407": 16, + "Name_9791": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e09cbfb6c5c49aa/request.json b/test-snapshots/query/3e09cbfb6c5c49aa/request.json new file mode 100644 index 0000000..7105c25 --- /dev/null +++ b/test-snapshots/query/3e09cbfb6c5c49aa/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_6407": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_9791": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3e0f41cd0293665c/expected.json b/test-snapshots/query/3e0f41cd0293665c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3e0f41cd0293665c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e0f41cd0293665c/request.json b/test-snapshots/query/3e0f41cd0293665c/request.json new file mode 100644 index 0000000..95e8b4a --- /dev/null +++ b/test-snapshots/query/3e0f41cd0293665c/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3e211a59a6d70602/expected.json b/test-snapshots/query/3e211a59a6d70602/expected.json new file mode 100644 index 0000000..a2183ac --- /dev/null +++ b/test-snapshots/query/3e211a59a6d70602/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "TrackId_1407": 597 + }, + { + "TrackId_1407": 1 + }, + { + "TrackId_1407": 2 + }, + { + "TrackId_1407": 3 + }, + { + "TrackId_1407": 4 + }, + { + "TrackId_1407": 5 + }, + { + "TrackId_1407": 152 + }, + { + "TrackId_1407": 160 + }, + { + "TrackId_1407": 1278 + }, + { + "TrackId_1407": 1283 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e211a59a6d70602/request.json b/test-snapshots/query/3e211a59a6d70602/request.json new file mode 100644 index 0000000..52f71c1 --- /dev/null +++ b/test-snapshots/query/3e211a59a6d70602/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "TrackId_1407": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3e3e3710beaf7096/expected.json b/test-snapshots/query/3e3e3710beaf7096/expected.json new file mode 100644 index 0000000..a0ce596 --- /dev/null +++ b/test-snapshots/query/3e3e3710beaf7096/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 100, + "Name": "Lenny Kravitz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e3e3710beaf7096/request.json b/test-snapshots/query/3e3e3710beaf7096/request.json new file mode 100644 index 0000000..267b260 --- /dev/null +++ b/test-snapshots/query/3e3e3710beaf7096/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3e66409293a0a5db/expected.json b/test-snapshots/query/3e66409293a0a5db/expected.json new file mode 100644 index 0000000..d6ca6bb --- /dev/null +++ b/test-snapshots/query/3e66409293a0a5db/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "AlbumId_1899": 1, + "Bytes_7010": 11170334, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 343719, + "Name_5867": "For Those About To Rock (We Salute You)", + "TrackId_0606": 1, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 6566314, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 199836, + "Name_5867": "C.O.D.", + "TrackId_0606": 11, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 6599424, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 203102, + "Name_5867": "Snowballed", + "TrackId_0606": 9, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 6706347, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 205688, + "Name_5867": "Night Of The Long Knives", + "TrackId_0606": 13, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 6713451, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 205662, + "Name_5867": "Put The Finger On You", + "TrackId_0606": 6, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 6852860, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 210834, + "Name_5867": "Inject The Venom", + "TrackId_0606": 8, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 7636561, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 233926, + "Name_5867": "Let's Get It Up", + "TrackId_0606": 7, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 8596840, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 263288, + "Name_5867": "Breaking The Rules", + "TrackId_0606": 12, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 8611245, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 263497, + "Name_5867": "Evil Walks", + "TrackId_0606": 10, + "UnitPrice_5646": 0.99 + }, + { + "AlbumId_1899": 1, + "Bytes_7010": 8817038, + "Composer_1968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + }, + "MediaTypeId_0966": 1, + "Milliseconds_3239": 270863, + "Name_5867": "Spellbound", + "TrackId_0606": 14, + "UnitPrice_5646": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e66409293a0a5db/request.json b/test-snapshots/query/3e66409293a0a5db/request.json new file mode 100644 index 0000000..913bbeb --- /dev/null +++ b/test-snapshots/query/3e66409293a0a5db/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_1899": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7010": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_1968": { + "type": "column", + "column": "Composer", + "fields": null + }, + "UnitPrice_5646": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "MediaTypeId_0966": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_3239": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_5867": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_0606": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3e7726e99e3de1f4/expected.json b/test-snapshots/query/3e7726e99e3de1f4/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/3e7726e99e3de1f4/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e7726e99e3de1f4/request.json b/test-snapshots/query/3e7726e99e3de1f4/request.json new file mode 100644 index 0000000..f909571 --- /dev/null +++ b/test-snapshots/query/3e7726e99e3de1f4/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3e88ccc6a4391eb5/expected.json b/test-snapshots/query/3e88ccc6a4391eb5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3e88ccc6a4391eb5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e88ccc6a4391eb5/request.json b/test-snapshots/query/3e88ccc6a4391eb5/request.json new file mode 100644 index 0000000..da341ee --- /dev/null +++ b/test-snapshots/query/3e88ccc6a4391eb5/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1111 6 Ave SW" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1965-03-03" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3e8b643142d46669/expected.json b/test-snapshots/query/3e8b643142d46669/expected.json new file mode 100644 index 0000000..b127f9d --- /dev/null +++ b/test-snapshots/query/3e8b643142d46669/expected.json @@ -0,0 +1,78 @@ +[ + { + "rows": [ + { + "Address_1425": "590 Columbia Boulevard West", + "BirthDate_6447": "1970-05-29", + "Email_5101": "robert@chinookcorp.com", + "Fax_7062": "+1 (403) 456-8485", + "FirstName_9510": "Robert", + "HireDate_8793": "2004-01-02", + "PostalCode_7208": "T1K 5N8" + }, + { + "Address_1425": "923 7 ST NW", + "BirthDate_6447": "1968-01-09", + "Email_5101": "laura@chinookcorp.com", + "Fax_7062": "+1 (403) 467-8772", + "FirstName_9510": "Laura", + "HireDate_8793": "2004-03-04", + "PostalCode_7208": "T1H 1Y8" + }, + { + "Address_1425": "1111 6 Ave SW", + "BirthDate_6447": "1973-08-29", + "Email_5101": "jane@chinookcorp.com", + "Fax_7062": "+1 (403) 262-6712", + "FirstName_9510": "Jane", + "HireDate_8793": "2002-04-01", + "PostalCode_7208": "T2P 5M5" + }, + { + "Address_1425": "683 10 Street SW", + "BirthDate_6447": "1947-09-19", + "Email_5101": "margaret@chinookcorp.com", + "Fax_7062": "+1 (403) 263-4289", + "FirstName_9510": "Margaret", + "HireDate_8793": "2003-05-03", + "PostalCode_7208": "T2P 5G3" + }, + { + "Address_1425": "7727B 41 Ave", + "BirthDate_6447": "1965-03-03", + "Email_5101": "steve@chinookcorp.com", + "Fax_7062": "1 (780) 836-9543", + "FirstName_9510": "Steve", + "HireDate_8793": "2003-10-17", + "PostalCode_7208": "T3B 1Y7" + }, + { + "Address_1425": "5827 Bowness Road NW", + "BirthDate_6447": "1973-07-01", + "Email_5101": "michael@chinookcorp.com", + "Fax_7062": "+1 (403) 246-9899", + "FirstName_9510": "Michael", + "HireDate_8793": "2003-10-17", + "PostalCode_7208": "T3B 0C5" + }, + { + "Address_1425": "825 8 Ave SW", + "BirthDate_6447": "1958-12-08", + "Email_5101": "nancy@chinookcorp.com", + "Fax_7062": "+1 (403) 262-3322", + "FirstName_9510": "Nancy", + "HireDate_8793": "2002-05-01", + "PostalCode_7208": "T2P 2T3" + }, + { + "Address_1425": "11120 Jasper Ave NW", + "BirthDate_6447": "1962-02-18", + "Email_5101": "andrew@chinookcorp.com", + "Fax_7062": "+1 (780) 428-3457", + "FirstName_9510": "Andrew", + "HireDate_8793": "2002-08-14", + "PostalCode_7208": "T5K 2N1" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e8b643142d46669/request.json b/test-snapshots/query/3e8b643142d46669/request.json new file mode 100644 index 0000000..9524c6a --- /dev/null +++ b/test-snapshots/query/3e8b643142d46669/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_1425": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_6447": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "FirstName_9510": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "PostalCode_7208": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Email_5101": { + "type": "column", + "column": "Email", + "fields": null + }, + "HireDate_8793": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Fax_7062": { + "type": "column", + "column": "Fax", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3e8f64d04b5248ec/expected.json b/test-snapshots/query/3e8f64d04b5248ec/expected.json new file mode 100644 index 0000000..11ab577 --- /dev/null +++ b/test-snapshots/query/3e8f64d04b5248ec/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_0363": 1, + "Name_9187": "AC/DC" + }, + { + "ArtistId_0363": 2, + "Name_9187": "Accept" + }, + { + "ArtistId_0363": 3, + "Name_9187": "Aerosmith" + }, + { + "ArtistId_0363": 4, + "Name_9187": "Alanis Morissette" + }, + { + "ArtistId_0363": 5, + "Name_9187": "Alice In Chains" + }, + { + "ArtistId_0363": 6, + "Name_9187": "Antônio Carlos Jobim" + }, + { + "ArtistId_0363": 7, + "Name_9187": "Apocalyptica" + }, + { + "ArtistId_0363": 8, + "Name_9187": "Audioslave" + }, + { + "ArtistId_0363": 9, + "Name_9187": "BackBeat" + }, + { + "ArtistId_0363": 10, + "Name_9187": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e8f64d04b5248ec/request.json b/test-snapshots/query/3e8f64d04b5248ec/request.json new file mode 100644 index 0000000..9a43c2c --- /dev/null +++ b/test-snapshots/query/3e8f64d04b5248ec/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_0363": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_9187": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3e9fdeaa666fd937/expected.json b/test-snapshots/query/3e9fdeaa666fd937/expected.json new file mode 100644 index 0000000..1ad6bb5 --- /dev/null +++ b/test-snapshots/query/3e9fdeaa666fd937/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3e9fdeaa666fd937/request.json b/test-snapshots/query/3e9fdeaa666fd937/request.json new file mode 100644 index 0000000..3d31dbf --- /dev/null +++ b/test-snapshots/query/3e9fdeaa666fd937/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3ea13224e288de29/expected.json b/test-snapshots/query/3ea13224e288de29/expected.json new file mode 100644 index 0000000..9fad374 --- /dev/null +++ b/test-snapshots/query/3ea13224e288de29/expected.json @@ -0,0 +1,12 @@ +[ + { + "aggregates": { + "GenreId_avg_1214": 13, + "GenreId_count_4985": 25, + "GenreId_min_0810": 1, + "GenreId_sum_5424": 325, + "Name_max_0787": "World", + "Name_min_0354": "Alternative" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/3ea13224e288de29/request.json b/test-snapshots/query/3ea13224e288de29/request.json new file mode 100644 index 0000000..2d44c8b --- /dev/null +++ b/test-snapshots/query/3ea13224e288de29/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "aggregates": { + "GenreId_avg_1214": { + "type": "single_column", + "column": "GenreId", + "function": "avg" + }, + "GenreId_count_4985": { + "type": "single_column", + "column": "GenreId", + "function": "count" + }, + "Name_max_0787": { + "type": "single_column", + "column": "Name", + "function": "max" + }, + "GenreId_min_0810": { + "type": "single_column", + "column": "GenreId", + "function": "min" + }, + "GenreId_sum_5424": { + "type": "single_column", + "column": "GenreId", + "function": "sum" + }, + "Name_min_0354": { + "type": "single_column", + "column": "Name", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3eb57da51fa623d/expected.json b/test-snapshots/query/3eb57da51fa623d/expected.json new file mode 100644 index 0000000..bbf8586 --- /dev/null +++ b/test-snapshots/query/3eb57da51fa623d/expected.json @@ -0,0 +1,62 @@ +[ + { + "rows": [ + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Andrew", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Jane", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Laura", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Margaret", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Michael", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Nancy", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Robert", + "State_1709": "AB" + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + }, + "FirstName_8684": "Steve", + "State_1709": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3eb57da51fa623d/request.json b/test-snapshots/query/3eb57da51fa623d/request.json new file mode 100644 index 0000000..30593bd --- /dev/null +++ b/test-snapshots/query/3eb57da51fa623d/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "FirstName_8684": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "State_1709": { + "type": "column", + "column": "State", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3edf2ff4a21cba1f/expected.json b/test-snapshots/query/3edf2ff4a21cba1f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3edf2ff4a21cba1f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3edf2ff4a21cba1f/request.json b/test-snapshots/query/3edf2ff4a21cba1f/request.json new file mode 100644 index 0000000..1e8e644 --- /dev/null +++ b/test-snapshots/query/3edf2ff4a21cba1f/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3ee35d21d7948a3b/expected.json b/test-snapshots/query/3ee35d21d7948a3b/expected.json new file mode 100644 index 0000000..f2a8cde --- /dev/null +++ b/test-snapshots/query/3ee35d21d7948a3b/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address_4311": "Berger Straße 10", + "City_4313": "Frankfurt", + "Company_7964": null, + "Country_8131": "Germany", + "CustomerId_0211": 37, + "Email_7512": "fzimmermann@yahoo.de", + "Fax_5979": null, + "FirstName_3784": "Fynn", + "LastName_3473": "Zimmermann", + "Phone_5421": "+49 069 40598889", + "PostalCode_0770": "60316", + "State_9915": null, + "SupportRepId_3116": 3 + }, + { + "Address_4311": "Ordynacka 10", + "City_4313": "Warsaw", + "Company_7964": null, + "Country_8131": "Poland", + "CustomerId_0211": 49, + "Email_7512": "stanisław.wójcik@wp.pl", + "Fax_5979": null, + "FirstName_3784": "Stanisław", + "LastName_3473": "Wójcik", + "Phone_5421": "+48 22 828 37 39", + "PostalCode_0770": "00-358", + "State_9915": null, + "SupportRepId_3116": 4 + }, + { + "Address_4311": "Klanova 9/506", + "City_4313": "Prague", + "Company_7964": "JetBrains s.r.o.", + "Country_8131": "Czech Republic", + "CustomerId_0211": 5, + "Email_7512": "frantisekw@jetbrains.com", + "Fax_5979": "+420 2 4172 5555", + "FirstName_3784": "František", + "LastName_3473": "Wichterlová", + "Phone_5421": "+420 2 4172 5555", + "PostalCode_0770": "14700", + "State_9915": null, + "SupportRepId_3116": 4 + }, + { + "Address_4311": "Lijnbaansgracht 120bg", + "City_4313": "Amsterdam", + "Company_7964": null, + "Country_8131": "Netherlands", + "CustomerId_0211": 48, + "Email_7512": "johavanderberg@yahoo.nl", + "Fax_5979": null, + "FirstName_3784": "Johannes", + "LastName_3473": "Van der Berg", + "Phone_5421": "+31 020 6223130", + "PostalCode_0770": "1016", + "State_9915": "VV", + "SupportRepId_3116": 5 + }, + { + "Address_4311": "1498 rue Bélanger", + "City_4313": "Montréal", + "Company_7964": null, + "Country_8131": "Canada", + "CustomerId_0211": 3, + "Email_7512": "ftremblay@gmail.com", + "Fax_5979": null, + "FirstName_3784": "François", + "LastName_3473": "Tremblay", + "Phone_5421": "+1 (514) 721-4711", + "PostalCode_0770": "H2G 1A7", + "State_9915": "QC", + "SupportRepId_3116": 3 + }, + { + "Address_4311": "421 Bourke Street", + "City_4313": "Sidney", + "Company_7964": null, + "Country_8131": "Australia", + "CustomerId_0211": 55, + "Email_7512": "mark.taylor@yahoo.au", + "Fax_5979": null, + "FirstName_3784": "Mark", + "LastName_3473": "Taylor", + "Phone_5421": "+61 (02) 9332 3633", + "PostalCode_0770": "2010", + "State_9915": "NSW", + "SupportRepId_3116": 4 + }, + { + "Address_4311": "5112 48 Street", + "City_4313": "Yellowknife", + "Company_7964": null, + "Country_8131": "Canada", + "CustomerId_0211": 33, + "Email_7512": "ellie.sullivan@shaw.ca", + "Fax_5979": null, + "FirstName_3784": "Ellie", + "LastName_3473": "Sullivan", + "Phone_5421": "+1 (867) 920-2233", + "PostalCode_0770": "X1A 1N6", + "State_9915": "NT", + "SupportRepId_3116": 3 + }, + { + "Address_4311": "319 N. Frances Street", + "City_4313": "Madison", + "Company_7964": null, + "Country_8131": "USA", + "CustomerId_0211": 25, + "Email_7512": "vstevens@yahoo.com", + "Fax_5979": null, + "FirstName_3784": "Victor", + "LastName_3473": "Stevens", + "Phone_5421": "+1 (608) 257-0597", + "PostalCode_0770": "53703", + "State_9915": "WI", + "SupportRepId_3116": 5 + }, + { + "Address_4311": "3,Raj Bhavan Road", + "City_4313": "Bangalore", + "Company_7964": null, + "Country_8131": "India", + "CustomerId_0211": 59, + "Email_7512": "puja_srivastava@yahoo.in", + "Fax_5979": null, + "FirstName_3784": "Puja", + "LastName_3473": "Srivastava", + "Phone_5421": "+91 080 22289999", + "PostalCode_0770": "560001", + "State_9915": null, + "SupportRepId_3116": 3 + }, + { + "Address_4311": "1 Microsoft Way", + "City_4313": "Redmond", + "Company_7964": "Microsoft Corporation", + "Country_8131": "USA", + "CustomerId_0211": 17, + "Email_7512": "jacksmith@microsoft.com", + "Fax_5979": "+1 (425) 882-8081", + "FirstName_3784": "Jack", + "LastName_3473": "Smith", + "Phone_5421": "+1 (425) 882-8080", + "PostalCode_0770": "98052-8300", + "State_9915": "WA", + "SupportRepId_3116": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3ee35d21d7948a3b/request.json b/test-snapshots/query/3ee35d21d7948a3b/request.json new file mode 100644 index 0000000..b8bff6f --- /dev/null +++ b/test-snapshots/query/3ee35d21d7948a3b/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_4311": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_4313": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_7964": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_8131": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_0211": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_7512": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_5979": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_3784": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_3473": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_5421": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_0770": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_9915": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId_3116": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3f10151697b9bbe0/expected.json b/test-snapshots/query/3f10151697b9bbe0/expected.json new file mode 100644 index 0000000..fb3c490 --- /dev/null +++ b/test-snapshots/query/3f10151697b9bbe0/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_8205": 1, + "InvoiceLineId_4635": 1, + "Quantity_8599": 1, + "TrackId_1138": 2, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 1, + "InvoiceLineId_4635": 2, + "Quantity_8599": 1, + "TrackId_1138": 4, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 10, + "InvoiceLineId_4635": 45, + "Quantity_8599": 1, + "TrackId_1138": 248, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 10, + "InvoiceLineId_4635": 46, + "Quantity_8599": 1, + "TrackId_1138": 252, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 10, + "InvoiceLineId_4635": 47, + "Quantity_8599": 1, + "TrackId_1138": 256, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 10, + "InvoiceLineId_4635": 48, + "Quantity_8599": 1, + "TrackId_1138": 260, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 10, + "InvoiceLineId_4635": 49, + "Quantity_8599": 1, + "TrackId_1138": 264, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 10, + "InvoiceLineId_4635": 50, + "Quantity_8599": 1, + "TrackId_1138": 268, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 100, + "InvoiceLineId_4635": 535, + "Quantity_8599": 1, + "TrackId_1138": 3254, + "UnitPrice_8943": 0.99 + }, + { + "InvoiceId_8205": 100, + "InvoiceLineId_4635": 536, + "Quantity_8599": 1, + "TrackId_1138": 3256, + "UnitPrice_8943": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3f10151697b9bbe0/request.json b/test-snapshots/query/3f10151697b9bbe0/request.json new file mode 100644 index 0000000..4df911b --- /dev/null +++ b/test-snapshots/query/3f10151697b9bbe0/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_8205": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_4635": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_8599": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_1138": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_8943": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3f35afc6a61892cc/expected.json b/test-snapshots/query/3f35afc6a61892cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3f35afc6a61892cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3f35afc6a61892cc/request.json b/test-snapshots/query/3f35afc6a61892cc/request.json new file mode 100644 index 0000000..f25ee95 --- /dev/null +++ b/test-snapshots/query/3f35afc6a61892cc/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3f719c7121676d4f/expected.json b/test-snapshots/query/3f719c7121676d4f/expected.json new file mode 100644 index 0000000..6877a1e --- /dev/null +++ b/test-snapshots/query/3f719c7121676d4f/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3f719c7121676d4f/request.json b/test-snapshots/query/3f719c7121676d4f/request.json new file mode 100644 index 0000000..4e495ef --- /dev/null +++ b/test-snapshots/query/3f719c7121676d4f/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3f720e92038ed2f9/expected.json b/test-snapshots/query/3f720e92038ed2f9/expected.json new file mode 100644 index 0000000..49c9cfe --- /dev/null +++ b/test-snapshots/query/3f720e92038ed2f9/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 307, + "InvoiceLineId": 1670, + "Quantity": 1, + "TrackId": 3200, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3f720e92038ed2f9/request.json b/test-snapshots/query/3f720e92038ed2f9/request.json new file mode 100644 index 0000000..244fa6f --- /dev/null +++ b/test-snapshots/query/3f720e92038ed2f9/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3f7bed3f8d398942/expected.json b/test-snapshots/query/3f7bed3f8d398942/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3f7bed3f8d398942/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3f7bed3f8d398942/request.json b/test-snapshots/query/3f7bed3f8d398942/request.json new file mode 100644 index 0000000..46043e4 --- /dev/null +++ b/test-snapshots/query/3f7bed3f8d398942/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3f8738d04ccb74db/expected.json b/test-snapshots/query/3f8738d04ccb74db/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/3f8738d04ccb74db/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3f8738d04ccb74db/request.json b/test-snapshots/query/3f8738d04ccb74db/request.json new file mode 100644 index 0000000..ffa2a50 --- /dev/null +++ b/test-snapshots/query/3f8738d04ccb74db/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3fa0eba5f56b7d2a/expected.json b/test-snapshots/query/3fa0eba5f56b7d2a/expected.json new file mode 100644 index 0000000..3146566 --- /dev/null +++ b/test-snapshots/query/3fa0eba5f56b7d2a/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3fa0eba5f56b7d2a/request.json b/test-snapshots/query/3fa0eba5f56b7d2a/request.json new file mode 100644 index 0000000..584a5c1 --- /dev/null +++ b/test-snapshots/query/3fa0eba5f56b7d2a/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3fb0ff5a25ff5548/expected.json b/test-snapshots/query/3fb0ff5a25ff5548/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3fb0ff5a25ff5548/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3fb0ff5a25ff5548/request.json b/test-snapshots/query/3fb0ff5a25ff5548/request.json new file mode 100644 index 0000000..7eb640a --- /dev/null +++ b/test-snapshots/query/3fb0ff5a25ff5548/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/3fc34c8a72fdad61/expected.json b/test-snapshots/query/3fc34c8a72fdad61/expected.json new file mode 100644 index 0000000..49808fa --- /dev/null +++ b/test-snapshots/query/3fc34c8a72fdad61/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "AlbumId_0573": 1, + "MediaTypeId_9682": 1, + "Name_2703": "For Those About To Rock (We Salute You)", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 2, + "MediaTypeId_9682": 2, + "Name_2703": "Balls to the Wall", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 3, + "MediaTypeId_9682": 2, + "Name_2703": "Fast As a Shark", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 3, + "MediaTypeId_9682": 2, + "Name_2703": "Restless and Wild", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 3, + "MediaTypeId_9682": 2, + "Name_2703": "Princess of the Dawn", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 1, + "MediaTypeId_9682": 1, + "Name_2703": "Put The Finger On You", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 1, + "MediaTypeId_9682": 1, + "Name_2703": "Let's Get It Up", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 1, + "MediaTypeId_9682": 1, + "Name_2703": "Inject The Venom", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 1, + "MediaTypeId_9682": 1, + "Name_2703": "Snowballed", + "UnitPrice_5160": 0.99 + }, + { + "AlbumId_0573": 1, + "MediaTypeId_9682": 1, + "Name_2703": "Evil Walks", + "UnitPrice_5160": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3fc34c8a72fdad61/request.json b/test-snapshots/query/3fc34c8a72fdad61/request.json new file mode 100644 index 0000000..dffc6ef --- /dev/null +++ b/test-snapshots/query/3fc34c8a72fdad61/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_0573": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Name_2703": { + "type": "column", + "column": "Name", + "fields": null + }, + "UnitPrice_5160": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "MediaTypeId_9682": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3fd16bc49e7bc01/expected.json b/test-snapshots/query/3fd16bc49e7bc01/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3fd16bc49e7bc01/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3fd16bc49e7bc01/request.json b/test-snapshots/query/3fd16bc49e7bc01/request.json new file mode 100644 index 0000000..3d09379 --- /dev/null +++ b/test-snapshots/query/3fd16bc49e7bc01/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/3fd2640975a2e7f4/expected.json b/test-snapshots/query/3fd2640975a2e7f4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/3fd2640975a2e7f4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/3fd2640975a2e7f4/request.json b/test-snapshots/query/3fd2640975a2e7f4/request.json new file mode 100644 index 0000000..40da87a --- /dev/null +++ b/test-snapshots/query/3fd2640975a2e7f4/request.json @@ -0,0 +1,157 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Staff" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/402ea83ec9daeba9/expected.json b/test-snapshots/query/402ea83ec9daeba9/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/402ea83ec9daeba9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/402ea83ec9daeba9/request.json b/test-snapshots/query/402ea83ec9daeba9/request.json new file mode 100644 index 0000000..e321d43 --- /dev/null +++ b/test-snapshots/query/402ea83ec9daeba9/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/404b73ca4208a4a5/expected.json b/test-snapshots/query/404b73ca4208a4a5/expected.json new file mode 100644 index 0000000..97141e7 --- /dev/null +++ b/test-snapshots/query/404b73ca4208a4a5/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_4778": 5, + "Name_3778": "AAC audio file" + }, + { + "MediaTypeId_4778": 4, + "Name_3778": "Purchased AAC audio file" + }, + { + "MediaTypeId_4778": 3, + "Name_3778": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_4778": 2, + "Name_3778": "Protected AAC audio file" + }, + { + "MediaTypeId_4778": 1, + "Name_3778": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/404b73ca4208a4a5/request.json b/test-snapshots/query/404b73ca4208a4a5/request.json new file mode 100644 index 0000000..2115ed2 --- /dev/null +++ b/test-snapshots/query/404b73ca4208a4a5/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_4778": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_3778": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4064148e8fc08052/expected.json b/test-snapshots/query/4064148e8fc08052/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4064148e8fc08052/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4064148e8fc08052/request.json b/test-snapshots/query/4064148e8fc08052/request.json new file mode 100644 index 0000000..092e2af --- /dev/null +++ b/test-snapshots/query/4064148e8fc08052/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/40740a9b58749acf/expected.json b/test-snapshots/query/40740a9b58749acf/expected.json new file mode 100644 index 0000000..d1814f7 --- /dev/null +++ b/test-snapshots/query/40740a9b58749acf/expected.json @@ -0,0 +1,306 @@ +[ + { + "rows": [ + { + "City_1939": "Amsterdam", + "Country_2955": "Netherlands", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Van der Berg", + "Phone_1499": "+31 020 6223130", + "PostalCode_2373": "1016", + "SupportRepId_4294": 5 + }, + { + "City_1939": "Bangalore", + "Country_2955": "India", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Srivastava", + "Phone_1499": "+91 080 22289999", + "PostalCode_2373": "560001", + "SupportRepId_4294": 3 + }, + { + "City_1939": "Berlin", + "Country_2955": "Germany", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Schröder", + "Phone_1499": "+49 030 2141444", + "PostalCode_2373": "10779", + "SupportRepId_4294": 3 + }, + { + "City_1939": "Berlin", + "Country_2955": "Germany", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Schneider", + "Phone_1499": "+49 030 26550280", + "PostalCode_2373": "10789", + "SupportRepId_4294": 5 + }, + { + "City_1939": "Bordeaux", + "Country_2955": "France", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Girard", + "Phone_1499": "+33 05 56 96 96 96", + "PostalCode_2373": "33000", + "SupportRepId_4294": 3 + }, + { + "City_1939": "Boston", + "Country_2955": "USA", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Gordon", + "Phone_1499": "+1 (617) 522-1333", + "PostalCode_2373": "2113", + "SupportRepId_4294": 4 + }, + { + "City_1939": "Brasília", + "Country_2955": "Brazil", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": "+55 (61) 3363-7855", + "LastName_7250": "Ramos", + "Phone_1499": "+55 (61) 3363-5547", + "PostalCode_2373": "71020-677", + "SupportRepId_4294": 4 + }, + { + "City_1939": "Brussels", + "Country_2955": "Belgium", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Peeters", + "Phone_1499": "+32 02 219 03 03", + "PostalCode_2373": "1000", + "SupportRepId_4294": 4 + }, + { + "City_1939": "Budapest", + "Country_2955": "Hungary", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Kovács", + "Phone_1499": null, + "PostalCode_2373": "H-1073", + "SupportRepId_4294": 3 + }, + { + "City_1939": "Buenos Aires", + "Country_2955": "Argentina", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_4612": null, + "LastName_7250": "Gutiérrez", + "Phone_1499": "+54 (0)11 4311 4333", + "PostalCode_2373": "1106", + "SupportRepId_4294": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/40740a9b58749acf/request.json b/test-snapshots/query/40740a9b58749acf/request.json new file mode 100644 index 0000000..583dc15 --- /dev/null +++ b/test-snapshots/query/40740a9b58749acf/request.json @@ -0,0 +1,139 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "PostalCode_2373": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "City_1939": { + "type": "column", + "column": "City", + "fields": null + }, + "SupportRepId_4294": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Country_2955": { + "type": "column", + "column": "Country", + "fields": null + }, + "Phone_1499": { + "type": "column", + "column": "Phone", + "fields": null + }, + "LastName_7250": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Fax_4612": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/40799d9a46d30aa5/expected.json b/test-snapshots/query/40799d9a46d30aa5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/40799d9a46d30aa5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/40799d9a46d30aa5/request.json b/test-snapshots/query/40799d9a46d30aa5/request.json new file mode 100644 index 0000000..50b33f7 --- /dev/null +++ b/test-snapshots/query/40799d9a46d30aa5/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/40a2181d48276075/expected.json b/test-snapshots/query/40a2181d48276075/expected.json new file mode 100644 index 0000000..04e83c0 --- /dev/null +++ b/test-snapshots/query/40a2181d48276075/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "Address_4147": "Via Degli Scipioni, 43", + "City_5040": "Rome", + "Company_7200": null, + "Country_8400": "Italy", + "Email_5659": "lucas.mancini@yahoo.it", + "Fax_0231": null, + "FirstName_5731": "Lucas", + "LastName_0860": "Mancini", + "State_8838": "RM" + }, + { + "Address_4147": "Ullevålsveien 14", + "City_5040": "Oslo", + "Company_7200": null, + "Country_8400": "Norway", + "Email_5659": "bjorn.hansen@yahoo.no", + "Fax_0231": null, + "FirstName_5731": "Bjørn", + "LastName_0860": "Hansen", + "State_8838": null + }, + { + "Address_4147": "Theodor-Heuss-Straße 34", + "City_5040": "Stuttgart", + "Company_7200": null, + "Country_8400": "Germany", + "Email_5659": "leonekohler@surfeu.de", + "Fax_0231": null, + "FirstName_5731": "Leonie", + "LastName_0860": "Köhler", + "State_8838": null + }, + { + "Address_4147": "Tauentzienstraße 8", + "City_5040": "Berlin", + "Company_7200": null, + "Country_8400": "Germany", + "Email_5659": "hannah.schneider@yahoo.de", + "Fax_0231": null, + "FirstName_5731": "Hannah", + "LastName_0860": "Schneider", + "State_8838": null + }, + { + "Address_4147": "Sønder Boulevard 51", + "City_5040": "Copenhagen", + "Company_7200": null, + "Country_8400": "Denmark", + "Email_5659": "kara.nielsen@jubii.dk", + "Fax_0231": null, + "FirstName_5731": "Kara", + "LastName_0860": "Nielsen", + "State_8838": null + }, + { + "Address_4147": "Rua Dr. Falcão Filho, 155", + "City_5040": "São Paulo", + "Company_7200": "Woodstock Discos", + "Country_8400": "Brazil", + "Email_5659": "eduardo@woodstock.com.br", + "Fax_0231": "+55 (11) 3033-4564", + "FirstName_5731": "Eduardo", + "LastName_0860": "Martins", + "State_8838": "SP" + }, + { + "Address_4147": "Rua dos Campeões Europeus de Viena, 4350", + "City_5040": "Porto", + "Company_7200": null, + "Country_8400": "Portugal", + "Email_5659": "masampaio@sapo.pt", + "Fax_0231": null, + "FirstName_5731": "Madalena", + "LastName_0860": "Sampaio", + "State_8838": null + }, + { + "Address_4147": "Rua da Assunção 53", + "City_5040": "Lisbon", + "Company_7200": null, + "Country_8400": "Portugal", + "Email_5659": "jfernandes@yahoo.pt", + "Fax_0231": null, + "FirstName_5731": "João", + "LastName_0860": "Fernandes", + "State_8838": null + }, + { + "Address_4147": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_5040": "Vienne", + "Company_7200": null, + "Country_8400": "Austria", + "Email_5659": "astrid.gruber@apple.at", + "Fax_0231": null, + "FirstName_5731": "Astrid", + "LastName_0860": "Gruber", + "State_8838": null + }, + { + "Address_4147": "Rilská 3174/6", + "City_5040": "Prague", + "Company_7200": null, + "Country_8400": "Czech Republic", + "Email_5659": "hholy@gmail.com", + "Fax_0231": null, + "FirstName_5731": "Helena", + "LastName_0860": "Holý", + "State_8838": null + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/40a2181d48276075/request.json b/test-snapshots/query/40a2181d48276075/request.json new file mode 100644 index 0000000..8662b58 --- /dev/null +++ b/test-snapshots/query/40a2181d48276075/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_4147": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_5040": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_7200": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_8400": { + "type": "column", + "column": "Country", + "fields": null + }, + "State_8838": { + "type": "column", + "column": "State", + "fields": null + }, + "Email_5659": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_0231": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_5731": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_0860": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/414ee3dd9e103256/expected.json b/test-snapshots/query/414ee3dd9e103256/expected.json new file mode 100644 index 0000000..485222c --- /dev/null +++ b/test-snapshots/query/414ee3dd9e103256/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/414ee3dd9e103256/request.json b/test-snapshots/query/414ee3dd9e103256/request.json new file mode 100644 index 0000000..6f27e21 --- /dev/null +++ b/test-snapshots/query/414ee3dd9e103256/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 2T3" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4174d092e82a4d45/expected.json b/test-snapshots/query/4174d092e82a4d45/expected.json new file mode 100644 index 0000000..e493679 --- /dev/null +++ b/test-snapshots/query/4174d092e82a4d45/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 10, + "Name": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4174d092e82a4d45/request.json b/test-snapshots/query/4174d092e82a4d45/request.json new file mode 100644 index 0000000..51e198a --- /dev/null +++ b/test-snapshots/query/4174d092e82a4d45/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/419001a803b0c53a/expected.json b/test-snapshots/query/419001a803b0c53a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/419001a803b0c53a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/419001a803b0c53a/request.json b/test-snapshots/query/419001a803b0c53a/request.json new file mode 100644 index 0000000..82b977d --- /dev/null +++ b/test-snapshots/query/419001a803b0c53a/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/41a88b6dc8064a03/expected.json b/test-snapshots/query/41a88b6dc8064a03/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/41a88b6dc8064a03/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/41a88b6dc8064a03/request.json b/test-snapshots/query/41a88b6dc8064a03/request.json new file mode 100644 index 0000000..ebfb452 --- /dev/null +++ b/test-snapshots/query/41a88b6dc8064a03/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/41e7061ecb1e04ff/expected.json b/test-snapshots/query/41e7061ecb1e04ff/expected.json new file mode 100644 index 0000000..70e52fd --- /dev/null +++ b/test-snapshots/query/41e7061ecb1e04ff/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "Address_5647": "7727B 41 Ave", + "BirthDate_7419": "1965-03-03", + "City_6469": "Calgary", + "Country_4359": "Canada", + "Email_2489": "steve@chinookcorp.com", + "EmployeeId_7877": 5, + "Fax_5754": "1 (780) 836-9543", + "FirstName_0511": "Steve", + "HireDate_5125": "2003-10-17", + "LastName_0933": "Johnson", + "Phone_5593": "1 (780) 836-9987", + "PostalCode_6603": "T3B 1Y7", + "ReportsTo_0446": 2, + "State_8994": "AB", + "Title_6846": "Sales Support Agent" + }, + { + "Address_5647": "590 Columbia Boulevard West", + "BirthDate_7419": "1970-05-29", + "City_6469": "Lethbridge", + "Country_4359": "Canada", + "Email_2489": "robert@chinookcorp.com", + "EmployeeId_7877": 7, + "Fax_5754": "+1 (403) 456-8485", + "FirstName_0511": "Robert", + "HireDate_5125": "2004-01-02", + "LastName_0933": "King", + "Phone_5593": "+1 (403) 456-9986", + "PostalCode_6603": "T1K 5N8", + "ReportsTo_0446": 6, + "State_8994": "AB", + "Title_6846": "IT Staff" + }, + { + "Address_5647": "825 8 Ave SW", + "BirthDate_7419": "1958-12-08", + "City_6469": "Calgary", + "Country_4359": "Canada", + "Email_2489": "nancy@chinookcorp.com", + "EmployeeId_7877": 2, + "Fax_5754": "+1 (403) 262-3322", + "FirstName_0511": "Nancy", + "HireDate_5125": "2002-05-01", + "LastName_0933": "Edwards", + "Phone_5593": "+1 (403) 262-3443", + "PostalCode_6603": "T2P 2T3", + "ReportsTo_0446": 1, + "State_8994": "AB", + "Title_6846": "Sales Manager" + }, + { + "Address_5647": "5827 Bowness Road NW", + "BirthDate_7419": "1973-07-01", + "City_6469": "Calgary", + "Country_4359": "Canada", + "Email_2489": "michael@chinookcorp.com", + "EmployeeId_7877": 6, + "Fax_5754": "+1 (403) 246-9899", + "FirstName_0511": "Michael", + "HireDate_5125": "2003-10-17", + "LastName_0933": "Mitchell", + "Phone_5593": "+1 (403) 246-9887", + "PostalCode_6603": "T3B 0C5", + "ReportsTo_0446": 1, + "State_8994": "AB", + "Title_6846": "IT Manager" + }, + { + "Address_5647": "683 10 Street SW", + "BirthDate_7419": "1947-09-19", + "City_6469": "Calgary", + "Country_4359": "Canada", + "Email_2489": "margaret@chinookcorp.com", + "EmployeeId_7877": 4, + "Fax_5754": "+1 (403) 263-4289", + "FirstName_0511": "Margaret", + "HireDate_5125": "2003-05-03", + "LastName_0933": "Park", + "Phone_5593": "+1 (403) 263-4423", + "PostalCode_6603": "T2P 5G3", + "ReportsTo_0446": 2, + "State_8994": "AB", + "Title_6846": "Sales Support Agent" + }, + { + "Address_5647": "923 7 ST NW", + "BirthDate_7419": "1968-01-09", + "City_6469": "Lethbridge", + "Country_4359": "Canada", + "Email_2489": "laura@chinookcorp.com", + "EmployeeId_7877": 8, + "Fax_5754": "+1 (403) 467-8772", + "FirstName_0511": "Laura", + "HireDate_5125": "2004-03-04", + "LastName_0933": "Callahan", + "Phone_5593": "+1 (403) 467-3351", + "PostalCode_6603": "T1H 1Y8", + "ReportsTo_0446": 6, + "State_8994": "AB", + "Title_6846": "IT Staff" + }, + { + "Address_5647": "1111 6 Ave SW", + "BirthDate_7419": "1973-08-29", + "City_6469": "Calgary", + "Country_4359": "Canada", + "Email_2489": "jane@chinookcorp.com", + "EmployeeId_7877": 3, + "Fax_5754": "+1 (403) 262-6712", + "FirstName_0511": "Jane", + "HireDate_5125": "2002-04-01", + "LastName_0933": "Peacock", + "Phone_5593": "+1 (403) 262-3443", + "PostalCode_6603": "T2P 5M5", + "ReportsTo_0446": 2, + "State_8994": "AB", + "Title_6846": "Sales Support Agent" + }, + { + "Address_5647": "11120 Jasper Ave NW", + "BirthDate_7419": "1962-02-18", + "City_6469": "Edmonton", + "Country_4359": "Canada", + "Email_2489": "andrew@chinookcorp.com", + "EmployeeId_7877": 1, + "Fax_5754": "+1 (780) 428-3457", + "FirstName_0511": "Andrew", + "HireDate_5125": "2002-08-14", + "LastName_0933": "Adams", + "Phone_5593": "+1 (780) 428-9482", + "PostalCode_6603": "T5K 2N1", + "ReportsTo_0446": null, + "State_8994": "AB", + "Title_6846": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/41e7061ecb1e04ff/request.json b/test-snapshots/query/41e7061ecb1e04ff/request.json new file mode 100644 index 0000000..22d1418 --- /dev/null +++ b/test-snapshots/query/41e7061ecb1e04ff/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_5647": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_7419": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_6469": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_4359": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_2489": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_7877": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_5754": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_0511": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_5125": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_0933": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_5593": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_6603": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_0446": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_8994": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_6846": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BirthDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4200b01e40c3118a/expected.json b/test-snapshots/query/4200b01e40c3118a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4200b01e40c3118a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4200b01e40c3118a/request.json b/test-snapshots/query/4200b01e40c3118a/request.json new file mode 100644 index 0000000..9a3be00 --- /dev/null +++ b/test-snapshots/query/4200b01e40c3118a/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "32801" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "marc.dubois@hotmail.com" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/420d41ee21e37858/expected.json b/test-snapshots/query/420d41ee21e37858/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/420d41ee21e37858/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/420d41ee21e37858/request.json b/test-snapshots/query/420d41ee21e37858/request.json new file mode 100644 index 0000000..55ee722 --- /dev/null +++ b/test-snapshots/query/420d41ee21e37858/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7636561 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Put The Finger On You" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/420eaf762dd38c80/expected.json b/test-snapshots/query/420eaf762dd38c80/expected.json new file mode 100644 index 0000000..1b03223 --- /dev/null +++ b/test-snapshots/query/420eaf762dd38c80/expected.json @@ -0,0 +1,54 @@ +[ + { + "rows": [ + { + "Phone_2068": "1 (780) 836-9987", + "PostalCode_8991": "T3B 1Y7", + "ReportsTo_3278": 2, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (780) 428-9482", + "PostalCode_8991": "T5K 2N1", + "ReportsTo_3278": null, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (403) 467-3351", + "PostalCode_8991": "T1H 1Y8", + "ReportsTo_3278": 6, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (403) 456-9986", + "PostalCode_8991": "T1K 5N8", + "ReportsTo_3278": 6, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (403) 263-4423", + "PostalCode_8991": "T2P 5G3", + "ReportsTo_3278": 2, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (403) 262-3443", + "PostalCode_8991": "T2P 5M5", + "ReportsTo_3278": 2, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (403) 262-3443", + "PostalCode_8991": "T2P 2T3", + "ReportsTo_3278": 1, + "State_8132": "AB" + }, + { + "Phone_2068": "+1 (403) 246-9887", + "PostalCode_8991": "T3B 0C5", + "ReportsTo_3278": 1, + "State_8132": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/420eaf762dd38c80/request.json b/test-snapshots/query/420eaf762dd38c80/request.json new file mode 100644 index 0000000..8dc1dad --- /dev/null +++ b/test-snapshots/query/420eaf762dd38c80/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "State_8132": { + "type": "column", + "column": "State", + "fields": null + }, + "Phone_2068": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_8991": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_3278": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4268a014cd4bbc8c/expected.json b/test-snapshots/query/4268a014cd4bbc8c/expected.json new file mode 100644 index 0000000..a842f7e --- /dev/null +++ b/test-snapshots/query/4268a014cd4bbc8c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_3151": 1 + }, + { + "ArtistId_3151": 2 + }, + { + "ArtistId_3151": 3 + }, + { + "ArtistId_3151": 4 + }, + { + "ArtistId_3151": 5 + }, + { + "ArtistId_3151": 6 + }, + { + "ArtistId_3151": 7 + }, + { + "ArtistId_3151": 8 + }, + { + "ArtistId_3151": 9 + }, + { + "ArtistId_3151": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4268a014cd4bbc8c/request.json b/test-snapshots/query/4268a014cd4bbc8c/request.json new file mode 100644 index 0000000..4b8254d --- /dev/null +++ b/test-snapshots/query/4268a014cd4bbc8c/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_3151": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/429b802990ea30e8/expected.json b/test-snapshots/query/429b802990ea30e8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/429b802990ea30e8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/429b802990ea30e8/request.json b/test-snapshots/query/429b802990ea30e8/request.json new file mode 100644 index 0000000..f4fce22 --- /dev/null +++ b/test-snapshots/query/429b802990ea30e8/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Montréal" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/42aa0d19384e130a/expected.json b/test-snapshots/query/42aa0d19384e130a/expected.json new file mode 100644 index 0000000..d5f9bcb --- /dev/null +++ b/test-snapshots/query/42aa0d19384e130a/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Milliseconds_8925": 206005, + "Name_4796": "Koyaanisqatsi" + }, + { + "Milliseconds_8925": 221331, + "Name_4796": "Quintet for Horn, Violin, 2 Violas, and Cello in E Flat Major, K. 407/386c: III. Allegro" + }, + { + "Milliseconds_8925": 66639, + "Name_4796": "L'orfeo, Act 3, Sinfonia (Orchestra)" + }, + { + "Milliseconds_8925": 139200, + "Name_4796": "String Quartet No. 12 in C Minor, D. 703 \"Quartettsatz\": II. Andante - Allegro assai" + }, + { + "Milliseconds_8925": 286741, + "Name_4796": "Pini Di Roma (Pinien Von Rom) I Pini Della Via Appia" + }, + { + "Milliseconds_8925": 493573, + "Name_4796": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro" + }, + { + "Milliseconds_8925": 261849, + "Name_4796": "Erlkonig, D.328" + }, + { + "Milliseconds_8925": 51780, + "Name_4796": "Étude 1, In C Major - Preludio (Presto) - Liszt" + }, + { + "Milliseconds_8925": 265541, + "Name_4796": "24 Caprices, Op. 1, No. 24, for Solo Violin, in A Minor" + }, + { + "Milliseconds_8925": 286998, + "Name_4796": "Symphony No. 2, Op. 16 - \"The Four Temperaments\": II. Allegro Comodo e Flemmatico" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42aa0d19384e130a/request.json b/test-snapshots/query/42aa0d19384e130a/request.json new file mode 100644 index 0000000..3425543 --- /dev/null +++ b/test-snapshots/query/42aa0d19384e130a/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_4796": { + "type": "column", + "column": "Name", + "fields": null + }, + "Milliseconds_8925": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/42affb2a831a793f/expected.json b/test-snapshots/query/42affb2a831a793f/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/42affb2a831a793f/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42affb2a831a793f/request.json b/test-snapshots/query/42affb2a831a793f/request.json new file mode 100644 index 0000000..e35737a --- /dev/null +++ b/test-snapshots/query/42affb2a831a793f/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/42b271056751a805/expected.json b/test-snapshots/query/42b271056751a805/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/42b271056751a805/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42b271056751a805/request.json b/test-snapshots/query/42b271056751a805/request.json new file mode 100644 index 0000000..bca27c3 --- /dev/null +++ b/test-snapshots/query/42b271056751a805/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/42b3ebd94714d32/expected.json b/test-snapshots/query/42b3ebd94714d32/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/42b3ebd94714d32/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42b3ebd94714d32/request.json b/test-snapshots/query/42b3ebd94714d32/request.json new file mode 100644 index 0000000..56c9bee --- /dev/null +++ b/test-snapshots/query/42b3ebd94714d32/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 263-4289" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/42b9462c21476bb1/expected.json b/test-snapshots/query/42b9462c21476bb1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/42b9462c21476bb1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42b9462c21476bb1/request.json b/test-snapshots/query/42b9462c21476bb1/request.json new file mode 100644 index 0000000..9769209 --- /dev/null +++ b/test-snapshots/query/42b9462c21476bb1/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/42baf11b564ef596/expected.json b/test-snapshots/query/42baf11b564ef596/expected.json new file mode 100644 index 0000000..e497a6c --- /dev/null +++ b/test-snapshots/query/42baf11b564ef596/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "TrackId_3137": 1, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 10, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1000, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1003, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1004, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1006, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1008, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1012, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1012, + "UnitPrice_9572": 0.99 + }, + { + "TrackId_3137": 1013, + "UnitPrice_9572": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42baf11b564ef596/request.json b/test-snapshots/query/42baf11b564ef596/request.json new file mode 100644 index 0000000..6ec5cb7 --- /dev/null +++ b/test-snapshots/query/42baf11b564ef596/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "TrackId_3137": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_9572": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/42c63b78aabf97e3/expected.json b/test-snapshots/query/42c63b78aabf97e3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/42c63b78aabf97e3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42c63b78aabf97e3/request.json b/test-snapshots/query/42c63b78aabf97e3/request.json new file mode 100644 index 0000000..fd1ab0a --- /dev/null +++ b/test-snapshots/query/42c63b78aabf97e3/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 260 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/42d2106403f824e7/expected.json b/test-snapshots/query/42d2106403f824e7/expected.json new file mode 100644 index 0000000..91e3558 --- /dev/null +++ b/test-snapshots/query/42d2106403f824e7/expected.json @@ -0,0 +1,81 @@ +[ + { + "rows": [ + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "Calle Lira, 198", + "City": "Santiago", + "Company": null, + "Country": "Chile", + "CustomerId": 57, + "Email": "luisrojas@yahoo.cl", + "Fax": null, + "FirstName": "Luis", + "LastName": "Rojas", + "Phone": "+56 (0)2 635 4444", + "PostalCode": null, + "State": null, + "SupportRepId": 5 + }, + { + "Address": "Rua da Assunção 53", + "City": "Lisbon", + "Company": null, + "Country": "Portugal", + "CustomerId": 34, + "Email": "jfernandes@yahoo.pt", + "Fax": null, + "FirstName": "João", + "LastName": "Fernandes", + "Phone": "+351 (213) 466-111", + "PostalCode": null, + "State": null, + "SupportRepId": 4 + }, + { + "Address": "Rua dos Campeões Europeus de Viena, 4350", + "City": "Porto", + "Company": null, + "Country": "Portugal", + "CustomerId": 35, + "Email": "masampaio@sapo.pt", + "Fax": null, + "FirstName": "Madalena", + "LastName": "Sampaio", + "Phone": "+351 (225) 022-448", + "PostalCode": null, + "State": null, + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42d2106403f824e7/request.json b/test-snapshots/query/42d2106403f824e7/request.json new file mode 100644 index 0000000..f6ef883 --- /dev/null +++ b/test-snapshots/query/42d2106403f824e7/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Apple Inc." + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "110017" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/42e126208b9c80b1/expected.json b/test-snapshots/query/42e126208b9c80b1/expected.json new file mode 100644 index 0000000..7337a87 --- /dev/null +++ b/test-snapshots/query/42e126208b9c80b1/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/42e126208b9c80b1/request.json b/test-snapshots/query/42e126208b9c80b1/request.json new file mode 100644 index 0000000..fa2f171 --- /dev/null +++ b/test-snapshots/query/42e126208b9c80b1/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "683 10 Street SW" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4332337a5edea311/expected.json b/test-snapshots/query/4332337a5edea311/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4332337a5edea311/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4332337a5edea311/request.json b/test-snapshots/query/4332337a5edea311/request.json new file mode 100644 index 0000000..9b46693 --- /dev/null +++ b/test-snapshots/query/4332337a5edea311/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 46 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4336dbe4da3f8304/expected.json b/test-snapshots/query/4336dbe4da3f8304/expected.json new file mode 100644 index 0000000..72b1da8 --- /dev/null +++ b/test-snapshots/query/4336dbe4da3f8304/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6162": "On-The-Go 1" + }, + { + "Name_6162": "Heavy Metal Classic" + }, + { + "Name_6162": "Grunge" + }, + { + "Name_6162": "Classical 101 - The Basics" + }, + { + "Name_6162": "Classical 101 - Next Steps" + }, + { + "Name_6162": "Classical 101 - Deep Cuts" + }, + { + "Name_6162": "Classical" + }, + { + "Name_6162": "Brazilian Music" + }, + { + "Name_6162": "TV Shows" + }, + { + "Name_6162": "Music Videos" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4336dbe4da3f8304/request.json b/test-snapshots/query/4336dbe4da3f8304/request.json new file mode 100644 index 0000000..b5d72cc --- /dev/null +++ b/test-snapshots/query/4336dbe4da3f8304/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_6162": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/43a2efa9a07ea5d2/expected.json b/test-snapshots/query/43a2efa9a07ea5d2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/43a2efa9a07ea5d2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/43a2efa9a07ea5d2/request.json b/test-snapshots/query/43a2efa9a07ea5d2/request.json new file mode 100644 index 0000000..395b9a0 --- /dev/null +++ b/test-snapshots/query/43a2efa9a07ea5d2/request.json @@ -0,0 +1,178 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 0C5" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/440a7973a2e4b994/expected.json b/test-snapshots/query/440a7973a2e4b994/expected.json new file mode 100644 index 0000000..3d5fcd0 --- /dev/null +++ b/test-snapshots/query/440a7973a2e4b994/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "City_7165": "Calgary", + "Email_9020": "jane@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (403) 262-6712", + "FirstName_3418": "Jane", + "HireDate_2201": "2002-04-01", + "LastName_3117": "Peacock", + "PostalCode_8285": "T2P 5M5", + "ReportsTo_4517": 2, + "State_8176": "AB", + "Title_1352": "Sales Support Agent" + }, + { + "City_7165": "Calgary", + "Email_9020": "margaret@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (403) 263-4289", + "FirstName_3418": "Margaret", + "HireDate_2201": "2003-05-03", + "LastName_3117": "Park", + "PostalCode_8285": "T2P 5G3", + "ReportsTo_4517": 2, + "State_8176": "AB", + "Title_1352": "Sales Support Agent" + }, + { + "City_7165": "Calgary", + "Email_9020": "michael@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (403) 246-9899", + "FirstName_3418": "Michael", + "HireDate_2201": "2003-10-17", + "LastName_3117": "Mitchell", + "PostalCode_8285": "T3B 0C5", + "ReportsTo_4517": 1, + "State_8176": "AB", + "Title_1352": "IT Manager" + }, + { + "City_7165": "Calgary", + "Email_9020": "nancy@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (403) 262-3322", + "FirstName_3418": "Nancy", + "HireDate_2201": "2002-05-01", + "LastName_3117": "Edwards", + "PostalCode_8285": "T2P 2T3", + "ReportsTo_4517": 1, + "State_8176": "AB", + "Title_1352": "Sales Manager" + }, + { + "City_7165": "Calgary", + "Email_9020": "steve@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "1 (780) 836-9543", + "FirstName_3418": "Steve", + "HireDate_2201": "2003-10-17", + "LastName_3117": "Johnson", + "PostalCode_8285": "T3B 1Y7", + "ReportsTo_4517": 2, + "State_8176": "AB", + "Title_1352": "Sales Support Agent" + }, + { + "City_7165": "Edmonton", + "Email_9020": "andrew@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (780) 428-3457", + "FirstName_3418": "Andrew", + "HireDate_2201": "2002-08-14", + "LastName_3117": "Adams", + "PostalCode_8285": "T5K 2N1", + "ReportsTo_4517": null, + "State_8176": "AB", + "Title_1352": "General Manager" + }, + { + "City_7165": "Lethbridge", + "Email_9020": "laura@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (403) 467-8772", + "FirstName_3418": "Laura", + "HireDate_2201": "2004-03-04", + "LastName_3117": "Callahan", + "PostalCode_8285": "T1H 1Y8", + "ReportsTo_4517": 6, + "State_8176": "AB", + "Title_1352": "IT Staff" + }, + { + "City_7165": "Lethbridge", + "Email_9020": "robert@chinookcorp.com", + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5780": "+1 (403) 456-8485", + "FirstName_3418": "Robert", + "HireDate_2201": "2004-01-02", + "LastName_3117": "King", + "PostalCode_8285": "T1K 5N8", + "ReportsTo_4517": 6, + "State_8176": "AB", + "Title_1352": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/440a7973a2e4b994/request.json b/test-snapshots/query/440a7973a2e4b994/request.json new file mode 100644 index 0000000..8e46a9c --- /dev/null +++ b/test-snapshots/query/440a7973a2e4b994/request.json @@ -0,0 +1,154 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_8285": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Title_1352": { + "type": "column", + "column": "Title", + "fields": null + }, + "City_7165": { + "type": "column", + "column": "City", + "fields": null + }, + "State_8176": { + "type": "column", + "column": "State", + "fields": null + }, + "Email_9020": { + "type": "column", + "column": "Email", + "fields": null + }, + "ReportsTo_4517": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Fax_5780": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_3418": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_2201": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_3117": { + "type": "column", + "column": "LastName", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4424628493f34c39/expected.json b/test-snapshots/query/4424628493f34c39/expected.json new file mode 100644 index 0000000..41cc188 --- /dev/null +++ b/test-snapshots/query/4424628493f34c39/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "GenreId_0880": 21, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 5088838 + }, + { + "GenreId_0880": 19, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 5286953 + }, + { + "GenreId_0880": 20, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2863571 + }, + { + "GenreId_0880": 20, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2956998 + }, + { + "GenreId_0880": 19, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2825166 + }, + { + "GenreId_0880": 20, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2924716 + }, + { + "GenreId_0880": 20, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2920045 + }, + { + "GenreId_0880": 21, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2780416 + }, + { + "GenreId_0880": 20, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2927802 + }, + { + "GenreId_0880": 18, + "MediaTypeId_4429": 3, + "Milliseconds_1109": 2626376 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4424628493f34c39/request.json b/test-snapshots/query/4424628493f34c39/request.json new file mode 100644 index 0000000..56b62e7 --- /dev/null +++ b/test-snapshots/query/4424628493f34c39/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "GenreId_0880": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4429": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_1109": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/44a33baf51ae54ce/expected.json b/test-snapshots/query/44a33baf51ae54ce/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/44a33baf51ae54ce/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/44a33baf51ae54ce/request.json b/test-snapshots/query/44a33baf51ae54ce/request.json new file mode 100644 index 0000000..cbe49e4 --- /dev/null +++ b/test-snapshots/query/44a33baf51ae54ce/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/44a69e8129362574/expected.json b/test-snapshots/query/44a69e8129362574/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/44a69e8129362574/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/44a69e8129362574/request.json b/test-snapshots/query/44a69e8129362574/request.json new file mode 100644 index 0000000..a4ef2bc --- /dev/null +++ b/test-snapshots/query/44a69e8129362574/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/44acbaacd39096e7/expected.json b/test-snapshots/query/44acbaacd39096e7/expected.json new file mode 100644 index 0000000..59903d8 --- /dev/null +++ b/test-snapshots/query/44acbaacd39096e7/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + }, + { + "UnitPrice_8612": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/44acbaacd39096e7/request.json b/test-snapshots/query/44acbaacd39096e7/request.json new file mode 100644 index 0000000..55a0651 --- /dev/null +++ b/test-snapshots/query/44acbaacd39096e7/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "UnitPrice_8612": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/44e2c35b4e5dce8b/expected.json b/test-snapshots/query/44e2c35b4e5dce8b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/44e2c35b4e5dce8b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/44e2c35b4e5dce8b/request.json b/test-snapshots/query/44e2c35b4e5dce8b/request.json new file mode 100644 index 0000000..587c7eb --- /dev/null +++ b/test-snapshots/query/44e2c35b4e5dce8b/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/44fedad2e603f02d/expected.json b/test-snapshots/query/44fedad2e603f02d/expected.json new file mode 100644 index 0000000..043ed97 --- /dev/null +++ b/test-snapshots/query/44fedad2e603f02d/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/44fedad2e603f02d/request.json b/test-snapshots/query/44fedad2e603f02d/request.json new file mode 100644 index 0000000..3193e70 --- /dev/null +++ b/test-snapshots/query/44fedad2e603f02d/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-07-20" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/450a252b27836714/expected.json b/test-snapshots/query/450a252b27836714/expected.json new file mode 100644 index 0000000..fbcbcef --- /dev/null +++ b/test-snapshots/query/450a252b27836714/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/450a252b27836714/request.json b/test-snapshots/query/450a252b27836714/request.json new file mode 100644 index 0000000..227d8b0 --- /dev/null +++ b/test-snapshots/query/450a252b27836714/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4514ca65c654bb21/expected.json b/test-snapshots/query/4514ca65c654bb21/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/4514ca65c654bb21/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4514ca65c654bb21/request.json b/test-snapshots/query/4514ca65c654bb21/request.json new file mode 100644 index 0000000..9ee94ae --- /dev/null +++ b/test-snapshots/query/4514ca65c654bb21/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/455244094ec2c4fa/expected.json b/test-snapshots/query/455244094ec2c4fa/expected.json new file mode 100644 index 0000000..ee3b7e3 --- /dev/null +++ b/test-snapshots/query/455244094ec2c4fa/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/455244094ec2c4fa/request.json b/test-snapshots/query/455244094ec2c4fa/request.json new file mode 100644 index 0000000..45f4a26 --- /dev/null +++ b/test-snapshots/query/455244094ec2c4fa/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/455f53a81a2d5d6/expected.json b/test-snapshots/query/455f53a81a2d5d6/expected.json new file mode 100644 index 0000000..ab4e679 --- /dev/null +++ b/test-snapshots/query/455f53a81a2d5d6/expected.json @@ -0,0 +1,54 @@ +[ + { + "rows": [ + { + "BirthDate_3502": "1968-01-09", + "EmployeeId_8625": 8, + "ReportsTo_3283": 6, + "Title_3801": "IT Staff" + }, + { + "BirthDate_3502": "1958-12-08", + "EmployeeId_8625": 2, + "ReportsTo_3283": 1, + "Title_3801": "Sales Manager" + }, + { + "BirthDate_3502": "1965-03-03", + "EmployeeId_8625": 5, + "ReportsTo_3283": 2, + "Title_3801": "Sales Support Agent" + }, + { + "BirthDate_3502": "1947-09-19", + "EmployeeId_8625": 4, + "ReportsTo_3283": 2, + "Title_3801": "Sales Support Agent" + }, + { + "BirthDate_3502": "1970-05-29", + "EmployeeId_8625": 7, + "ReportsTo_3283": 6, + "Title_3801": "IT Staff" + }, + { + "BirthDate_3502": "1973-07-01", + "EmployeeId_8625": 6, + "ReportsTo_3283": 1, + "Title_3801": "IT Manager" + }, + { + "BirthDate_3502": "1962-02-18", + "EmployeeId_8625": 1, + "ReportsTo_3283": null, + "Title_3801": "General Manager" + }, + { + "BirthDate_3502": "1973-08-29", + "EmployeeId_8625": 3, + "ReportsTo_3283": 2, + "Title_3801": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/455f53a81a2d5d6/request.json b/test-snapshots/query/455f53a81a2d5d6/request.json new file mode 100644 index 0000000..651b0f9 --- /dev/null +++ b/test-snapshots/query/455f53a81a2d5d6/request.json @@ -0,0 +1,58 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Title_3801": { + "type": "column", + "column": "Title", + "fields": null + }, + "BirthDate_3502": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "ReportsTo_3283": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "EmployeeId_8625": { + "type": "column", + "column": "EmployeeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/456fe5694f0fcc7c/expected.json b/test-snapshots/query/456fe5694f0fcc7c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/456fe5694f0fcc7c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/456fe5694f0fcc7c/request.json b/test-snapshots/query/456fe5694f0fcc7c/request.json new file mode 100644 index 0000000..c962f0b --- /dev/null +++ b/test-snapshots/query/456fe5694f0fcc7c/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/45764811921c0245/expected.json b/test-snapshots/query/45764811921c0245/expected.json new file mode 100644 index 0000000..3d9ffa6 --- /dev/null +++ b/test-snapshots/query/45764811921c0245/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "BillingAddress_count_3059": 412, + "BillingCity_max_1259": "Yellowknife", + "CustomerId_count_1798": 412, + "Total_sum_3283": 2328.6 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/45764811921c0245/request.json b/test-snapshots/query/45764811921c0245/request.json new file mode 100644 index 0000000..18107db --- /dev/null +++ b/test-snapshots/query/45764811921c0245/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Invoice", + "query": { + "aggregates": { + "CustomerId_count_1798": { + "type": "single_column", + "column": "CustomerId", + "function": "count" + }, + "BillingAddress_count_3059": { + "type": "single_column", + "column": "BillingAddress", + "function": "count" + }, + "BillingCity_max_1259": { + "type": "single_column", + "column": "BillingCity", + "function": "max" + }, + "Total_sum_3283": { + "type": "single_column", + "column": "Total", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/45b908a3461c53fa/expected.json b/test-snapshots/query/45b908a3461c53fa/expected.json new file mode 100644 index 0000000..6945296 --- /dev/null +++ b/test-snapshots/query/45b908a3461c53fa/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 141, + "ArtistId": 100, + "Title": "Greatest Hits" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/45b908a3461c53fa/request.json b/test-snapshots/query/45b908a3461c53fa/request.json new file mode 100644 index 0000000..6e28a6c --- /dev/null +++ b/test-snapshots/query/45b908a3461c53fa/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/45b92d6d270acc03/expected.json b/test-snapshots/query/45b92d6d270acc03/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/45b92d6d270acc03/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/45b92d6d270acc03/request.json b/test-snapshots/query/45b92d6d270acc03/request.json new file mode 100644 index 0000000..61fdbd5 --- /dev/null +++ b/test-snapshots/query/45b92d6d270acc03/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/45f19b155108027d/expected.json b/test-snapshots/query/45f19b155108027d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/45f19b155108027d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/45f19b155108027d/request.json b/test-snapshots/query/45f19b155108027d/request.json new file mode 100644 index 0000000..b13c0c4 --- /dev/null +++ b/test-snapshots/query/45f19b155108027d/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-10-22" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/45f7a981aace23d3/expected.json b/test-snapshots/query/45f7a981aace23d3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/45f7a981aace23d3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/45f7a981aace23d3/request.json b/test-snapshots/query/45f7a981aace23d3/request.json new file mode 100644 index 0000000..f03e459 --- /dev/null +++ b/test-snapshots/query/45f7a981aace23d3/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/460001246c14e6f6/expected.json b/test-snapshots/query/460001246c14e6f6/expected.json new file mode 100644 index 0000000..776fa63 --- /dev/null +++ b/test-snapshots/query/460001246c14e6f6/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 2, + "Bytes": 5510424, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 342562, + "Name": "Balls to the Wall", + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/460001246c14e6f6/request.json b/test-snapshots/query/460001246c14e6f6/request.json new file mode 100644 index 0000000..8c26d23 --- /dev/null +++ b/test-snapshots/query/460001246c14e6f6/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/463539928b50093b/expected.json b/test-snapshots/query/463539928b50093b/expected.json new file mode 100644 index 0000000..5ec3b35 --- /dev/null +++ b/test-snapshots/query/463539928b50093b/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "BirthDate_1797": "1947-09-19", + "City_2100": "Calgary", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T2P 5G3", + "ReportsTo_4248": 2, + "State_5818": "AB", + "Title_7195": "Sales Support Agent" + }, + { + "BirthDate_1797": "1958-12-08", + "City_2100": "Calgary", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T2P 2T3", + "ReportsTo_4248": 1, + "State_5818": "AB", + "Title_7195": "Sales Manager" + }, + { + "BirthDate_1797": "1962-02-18", + "City_2100": "Edmonton", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T5K 2N1", + "ReportsTo_4248": null, + "State_5818": "AB", + "Title_7195": "General Manager" + }, + { + "BirthDate_1797": "1965-03-03", + "City_2100": "Calgary", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T3B 1Y7", + "ReportsTo_4248": 2, + "State_5818": "AB", + "Title_7195": "Sales Support Agent" + }, + { + "BirthDate_1797": "1968-01-09", + "City_2100": "Lethbridge", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T1H 1Y8", + "ReportsTo_4248": 6, + "State_5818": "AB", + "Title_7195": "IT Staff" + }, + { + "BirthDate_1797": "1970-05-29", + "City_2100": "Lethbridge", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T1K 5N8", + "ReportsTo_4248": 6, + "State_5818": "AB", + "Title_7195": "IT Staff" + }, + { + "BirthDate_1797": "1973-07-01", + "City_2100": "Calgary", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T3B 0C5", + "ReportsTo_4248": 1, + "State_5818": "AB", + "Title_7195": "IT Manager" + }, + { + "BirthDate_1797": "1973-08-29", + "City_2100": "Calgary", + "FK_EmployeeReportsTo": { + "rows": [] + }, + "PostalCode_1980": "T2P 5M5", + "ReportsTo_4248": 2, + "State_5818": "AB", + "Title_7195": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/463539928b50093b/request.json b/test-snapshots/query/463539928b50093b/request.json new file mode 100644 index 0000000..26c8bc8 --- /dev/null +++ b/test-snapshots/query/463539928b50093b/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_1980": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "BirthDate_1797": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_2100": { + "type": "column", + "column": "City", + "fields": null + }, + "State_5818": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_7195": { + "type": "column", + "column": "Title", + "fields": null + }, + "ReportsTo_4248": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4638fe06a5d6d327/expected.json b/test-snapshots/query/4638fe06a5d6d327/expected.json new file mode 100644 index 0000000..b0df796 --- /dev/null +++ b/test-snapshots/query/4638fe06a5d6d327/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_5956": "AC/DC" + }, + { + "Name_5956": "Accept" + }, + { + "Name_5956": "Aerosmith" + }, + { + "Name_5956": "Alanis Morissette" + }, + { + "Name_5956": "Alice In Chains" + }, + { + "Name_5956": "Antônio Carlos Jobim" + }, + { + "Name_5956": "Apocalyptica" + }, + { + "Name_5956": "Audioslave" + }, + { + "Name_5956": "BackBeat" + }, + { + "Name_5956": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4638fe06a5d6d327/request.json b/test-snapshots/query/4638fe06a5d6d327/request.json new file mode 100644 index 0000000..d0d96d3 --- /dev/null +++ b/test-snapshots/query/4638fe06a5d6d327/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_5956": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/463ea436dd50b63/expected.json b/test-snapshots/query/463ea436dd50b63/expected.json new file mode 100644 index 0000000..93ed554 --- /dev/null +++ b/test-snapshots/query/463ea436dd50b63/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2009-02-03", + "InvoiceId_1388": 10, + "Total_3217": 5.94 + }, + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2009-09-24", + "InvoiceId_1388": 62, + "Total_3217": 0.99 + }, + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2011-03-18", + "InvoiceId_1388": 183, + "Total_3217": 1.98 + }, + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2011-04-28", + "InvoiceId_1388": 194, + "Total_3217": 21.86 + }, + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2011-12-27", + "InvoiceId_1388": 249, + "Total_3217": 8.91 + }, + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2013-08-02", + "InvoiceId_1388": 378, + "Total_3217": 1.98 + }, + { + "BillingState_6005": "Dublin", + "CustomerId_0328": 46, + "InvoiceDate_4125": "2013-11-04", + "InvoiceId_1388": 401, + "Total_3217": 3.96 + }, + { + "BillingState_6005": null, + "CustomerId_0328": 34, + "InvoiceDate_4125": "2009-05-05", + "InvoiceId_1388": 28, + "Total_3217": 1.98 + }, + { + "BillingState_6005": null, + "CustomerId_0328": 34, + "InvoiceDate_4125": "2009-08-07", + "InvoiceId_1388": 51, + "Total_3217": 3.96 + }, + { + "BillingState_6005": null, + "CustomerId_0328": 34, + "InvoiceDate_4125": "2009-11-09", + "InvoiceId_1388": 73, + "Total_3217": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/463ea436dd50b63/request.json b/test-snapshots/query/463ea436dd50b63/request.json new file mode 100644 index 0000000..eb453cd --- /dev/null +++ b/test-snapshots/query/463ea436dd50b63/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceDate_4125": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_1388": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_3217": { + "type": "column", + "column": "Total", + "fields": null + }, + "CustomerId_0328": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "BillingState_6005": { + "type": "column", + "column": "BillingState", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/467e7a98920d91ff/expected.json b/test-snapshots/query/467e7a98920d91ff/expected.json new file mode 100644 index 0000000..9b32bb2 --- /dev/null +++ b/test-snapshots/query/467e7a98920d91ff/expected.json @@ -0,0 +1,110 @@ +[ + { + "rows": [ + { + "BirthDate_2538": "1947-09-19", + "City_2399": "Calgary", + "Country_4293": "Canada", + "Email_3755": "margaret@chinookcorp.com", + "Fax_4283": "+1 (403) 263-4289", + "FirstName_0095": "Margaret", + "HireDate_3932": "2003-05-03", + "LastName_8499": "Park", + "PostalCode_9360": "T2P 5G3", + "ReportsTo_4613": 2, + "Title_7236": "Sales Support Agent" + }, + { + "BirthDate_2538": "1958-12-08", + "City_2399": "Calgary", + "Country_4293": "Canada", + "Email_3755": "nancy@chinookcorp.com", + "Fax_4283": "+1 (403) 262-3322", + "FirstName_0095": "Nancy", + "HireDate_3932": "2002-05-01", + "LastName_8499": "Edwards", + "PostalCode_9360": "T2P 2T3", + "ReportsTo_4613": 1, + "Title_7236": "Sales Manager" + }, + { + "BirthDate_2538": "1962-02-18", + "City_2399": "Edmonton", + "Country_4293": "Canada", + "Email_3755": "andrew@chinookcorp.com", + "Fax_4283": "+1 (780) 428-3457", + "FirstName_0095": "Andrew", + "HireDate_3932": "2002-08-14", + "LastName_8499": "Adams", + "PostalCode_9360": "T5K 2N1", + "ReportsTo_4613": null, + "Title_7236": "General Manager" + }, + { + "BirthDate_2538": "1965-03-03", + "City_2399": "Calgary", + "Country_4293": "Canada", + "Email_3755": "steve@chinookcorp.com", + "Fax_4283": "1 (780) 836-9543", + "FirstName_0095": "Steve", + "HireDate_3932": "2003-10-17", + "LastName_8499": "Johnson", + "PostalCode_9360": "T3B 1Y7", + "ReportsTo_4613": 2, + "Title_7236": "Sales Support Agent" + }, + { + "BirthDate_2538": "1968-01-09", + "City_2399": "Lethbridge", + "Country_4293": "Canada", + "Email_3755": "laura@chinookcorp.com", + "Fax_4283": "+1 (403) 467-8772", + "FirstName_0095": "Laura", + "HireDate_3932": "2004-03-04", + "LastName_8499": "Callahan", + "PostalCode_9360": "T1H 1Y8", + "ReportsTo_4613": 6, + "Title_7236": "IT Staff" + }, + { + "BirthDate_2538": "1970-05-29", + "City_2399": "Lethbridge", + "Country_4293": "Canada", + "Email_3755": "robert@chinookcorp.com", + "Fax_4283": "+1 (403) 456-8485", + "FirstName_0095": "Robert", + "HireDate_3932": "2004-01-02", + "LastName_8499": "King", + "PostalCode_9360": "T1K 5N8", + "ReportsTo_4613": 6, + "Title_7236": "IT Staff" + }, + { + "BirthDate_2538": "1973-07-01", + "City_2399": "Calgary", + "Country_4293": "Canada", + "Email_3755": "michael@chinookcorp.com", + "Fax_4283": "+1 (403) 246-9899", + "FirstName_0095": "Michael", + "HireDate_3932": "2003-10-17", + "LastName_8499": "Mitchell", + "PostalCode_9360": "T3B 0C5", + "ReportsTo_4613": 1, + "Title_7236": "IT Manager" + }, + { + "BirthDate_2538": "1973-08-29", + "City_2399": "Calgary", + "Country_4293": "Canada", + "Email_3755": "jane@chinookcorp.com", + "Fax_4283": "+1 (403) 262-6712", + "FirstName_0095": "Jane", + "HireDate_3932": "2002-04-01", + "LastName_8499": "Peacock", + "PostalCode_9360": "T2P 5M5", + "ReportsTo_4613": 2, + "Title_7236": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/467e7a98920d91ff/request.json b/test-snapshots/query/467e7a98920d91ff/request.json new file mode 100644 index 0000000..80d082c --- /dev/null +++ b/test-snapshots/query/467e7a98920d91ff/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Title_7236": { + "type": "column", + "column": "Title", + "fields": null + }, + "BirthDate_2538": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_2399": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_4293": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_3755": { + "type": "column", + "column": "Email", + "fields": null + }, + "PostalCode_9360": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Fax_4283": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_0095": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_3932": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_8499": { + "type": "column", + "column": "LastName", + "fields": null + }, + "ReportsTo_4613": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/468c6377ce4e21b8/expected.json b/test-snapshots/query/468c6377ce4e21b8/expected.json new file mode 100644 index 0000000..a0ce596 --- /dev/null +++ b/test-snapshots/query/468c6377ce4e21b8/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 100, + "Name": "Lenny Kravitz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/468c6377ce4e21b8/request.json b/test-snapshots/query/468c6377ce4e21b8/request.json new file mode 100644 index 0000000..b09a7b6 --- /dev/null +++ b/test-snapshots/query/468c6377ce4e21b8/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/46bdbb269bd4f8ef/expected.json b/test-snapshots/query/46bdbb269bd4f8ef/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/46bdbb269bd4f8ef/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/46bdbb269bd4f8ef/request.json b/test-snapshots/query/46bdbb269bd4f8ef/request.json new file mode 100644 index 0000000..64690c3 --- /dev/null +++ b/test-snapshots/query/46bdbb269bd4f8ef/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "C.O.D." + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/46c8b6aa088b012f/expected.json b/test-snapshots/query/46c8b6aa088b012f/expected.json new file mode 100644 index 0000000..83d2956 --- /dev/null +++ b/test-snapshots/query/46c8b6aa088b012f/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_1959": 43, + "Name_5228": "A Cor Do Som" + }, + { + "ArtistId_1959": 230, + "Name_5228": "Aaron Copland & London Symphony Orchestra" + }, + { + "ArtistId_1959": 202, + "Name_5228": "Aaron Goldberg" + }, + { + "ArtistId_1959": 1, + "Name_5228": "AC/DC" + }, + { + "ArtistId_1959": 214, + "Name_5228": "Academy of St. Martin in the Fields & Sir Neville Marriner" + }, + { + "ArtistId_1959": 215, + "Name_5228": "Academy of St. Martin in the Fields Chamber Ensemble & Sir Neville Marriner" + }, + { + "ArtistId_1959": 222, + "Name_5228": "Academy of St. Martin in the Fields, John Birch, Sir Neville Marriner & Sylvia McNair" + }, + { + "ArtistId_1959": 257, + "Name_5228": "Academy of St. Martin in the Fields, Sir Neville Marriner & Thurston Dart" + }, + { + "ArtistId_1959": 239, + "Name_5228": "Academy of St. Martin in the Fields, Sir Neville Marriner & William Bennett" + }, + { + "ArtistId_1959": 2, + "Name_5228": "Accept" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/46c8b6aa088b012f/request.json b/test-snapshots/query/46c8b6aa088b012f/request.json new file mode 100644 index 0000000..569fd2e --- /dev/null +++ b/test-snapshots/query/46c8b6aa088b012f/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_1959": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_5228": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/46cbcf2ebe300a0c/expected.json b/test-snapshots/query/46cbcf2ebe300a0c/expected.json new file mode 100644 index 0000000..faf2097 --- /dev/null +++ b/test-snapshots/query/46cbcf2ebe300a0c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_7653": "AC/DC" + }, + { + "Name_7653": "Accept" + }, + { + "Name_7653": "Aerosmith" + }, + { + "Name_7653": "Alanis Morissette" + }, + { + "Name_7653": "Alice In Chains" + }, + { + "Name_7653": "Antônio Carlos Jobim" + }, + { + "Name_7653": "Apocalyptica" + }, + { + "Name_7653": "Audioslave" + }, + { + "Name_7653": "BackBeat" + }, + { + "Name_7653": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/46cbcf2ebe300a0c/request.json b/test-snapshots/query/46cbcf2ebe300a0c/request.json new file mode 100644 index 0000000..fcdb1b3 --- /dev/null +++ b/test-snapshots/query/46cbcf2ebe300a0c/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_7653": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/46df533863411443/expected.json b/test-snapshots/query/46df533863411443/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/46df533863411443/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/46df533863411443/request.json b/test-snapshots/query/46df533863411443/request.json new file mode 100644 index 0000000..46a6db4 --- /dev/null +++ b/test-snapshots/query/46df533863411443/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/46f9313ed14ab87c/expected.json b/test-snapshots/query/46f9313ed14ab87c/expected.json new file mode 100644 index 0000000..e7bbc29 --- /dev/null +++ b/test-snapshots/query/46f9313ed14ab87c/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "Name_count_7056": 18, + "Name_max_9252": "TV Shows", + "PlaylistId_median_2745": 9.5, + "PlaylistId_min_3967": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/46f9313ed14ab87c/request.json b/test-snapshots/query/46f9313ed14ab87c/request.json new file mode 100644 index 0000000..2105454 --- /dev/null +++ b/test-snapshots/query/46f9313ed14ab87c/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Playlist", + "query": { + "aggregates": { + "PlaylistId_min_3967": { + "type": "single_column", + "column": "PlaylistId", + "function": "min" + }, + "Name_count_7056": { + "type": "single_column", + "column": "Name", + "function": "count" + }, + "PlaylistId_median_2745": { + "type": "single_column", + "column": "PlaylistId", + "function": "median" + }, + "Name_max_9252": { + "type": "single_column", + "column": "Name", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/46fabf9958811f6a/expected.json b/test-snapshots/query/46fabf9958811f6a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/46fabf9958811f6a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/46fabf9958811f6a/request.json b/test-snapshots/query/46fabf9958811f6a/request.json new file mode 100644 index 0000000..74a9198 --- /dev/null +++ b/test-snapshots/query/46fabf9958811f6a/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/473a9746690b1243/expected.json b/test-snapshots/query/473a9746690b1243/expected.json new file mode 100644 index 0000000..0a8fc39 --- /dev/null +++ b/test-snapshots/query/473a9746690b1243/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/473a9746690b1243/request.json b/test-snapshots/query/473a9746690b1243/request.json new file mode 100644 index 0000000..24c5530 --- /dev/null +++ b/test-snapshots/query/473a9746690b1243/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4761d8ff2ec7c171/expected.json b/test-snapshots/query/4761d8ff2ec7c171/expected.json new file mode 100644 index 0000000..da7558b --- /dev/null +++ b/test-snapshots/query/4761d8ff2ec7c171/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 176, + "Bytes": 10867860, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 328228, + "Name": "Your Blue Room", + "TrackId": 2127, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 10939131, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 330266, + "Name": "United Colours", + "TrackId": 2125, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 11064884, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 340767, + "Name": "Miss Sarajevo", + "TrackId": 2131, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 12727928, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 383764, + "Name": "Always Forever Now", + "TrackId": 2128, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 3884133, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 120816, + "Name": "A Different Kind Of Blue", + "TrackId": 2129, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 5851053, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 180166, + "Name": "Elvis Ate America", + "TrackId": 2135, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 6179777, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 186723, + "Name": "Theme From Let's Go Native", + "TrackId": 2138, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 6572813, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 205087, + "Name": "Ito Okashi", + "TrackId": 2132, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 6638076, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 203911, + "Name": "Theme From The Swan", + "TrackId": 2137, + "UnitPrice": 0.99 + }, + { + "AlbumId": 176, + "Bytes": 6920451, + "Composer": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId": 10, + "MediaTypeId": 1, + "Milliseconds": 214909, + "Name": "Corpse (These Chains Are Way Too Long)", + "TrackId": 2134, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4761d8ff2ec7c171/request.json b/test-snapshots/query/4761d8ff2ec7c171/request.json new file mode 100644 index 0000000..094253a --- /dev/null +++ b/test-snapshots/query/4761d8ff2ec7c171/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/476e989835eb07b0/expected.json b/test-snapshots/query/476e989835eb07b0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/476e989835eb07b0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/476e989835eb07b0/request.json b/test-snapshots/query/476e989835eb07b0/request.json new file mode 100644 index 0000000..d364142 --- /dev/null +++ b/test-snapshots/query/476e989835eb07b0/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/477e5d7eeb530f69/expected.json b/test-snapshots/query/477e5d7eeb530f69/expected.json new file mode 100644 index 0000000..017fe06 --- /dev/null +++ b/test-snapshots/query/477e5d7eeb530f69/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 8 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/477e5d7eeb530f69/request.json b/test-snapshots/query/477e5d7eeb530f69/request.json new file mode 100644 index 0000000..a651e87 --- /dev/null +++ b/test-snapshots/query/477e5d7eeb530f69/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Employee", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/47c9be07c9eee785/expected.json b/test-snapshots/query/47c9be07c9eee785/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/47c9be07c9eee785/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/47c9be07c9eee785/request.json b/test-snapshots/query/47c9be07c9eee785/request.json new file mode 100644 index 0000000..918ca0f --- /dev/null +++ b/test-snapshots/query/47c9be07c9eee785/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "11, Place Bellecour" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Gray" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/47ce3c6f499b0e1/expected.json b/test-snapshots/query/47ce3c6f499b0e1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/47ce3c6f499b0e1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/47ce3c6f499b0e1/request.json b/test-snapshots/query/47ce3c6f499b0e1/request.json new file mode 100644 index 0000000..4d4d496 --- /dev/null +++ b/test-snapshots/query/47ce3c6f499b0e1/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 343719 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/47fb3296a21c19cc/expected.json b/test-snapshots/query/47fb3296a21c19cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/47fb3296a21c19cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/47fb3296a21c19cc/request.json b/test-snapshots/query/47fb3296a21c19cc/request.json new file mode 100644 index 0000000..0293aa7 --- /dev/null +++ b/test-snapshots/query/47fb3296a21c19cc/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marisa Monte" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/47fc32682c278474/expected.json b/test-snapshots/query/47fc32682c278474/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/47fc32682c278474/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/47fc32682c278474/request.json b/test-snapshots/query/47fc32682c278474/request.json new file mode 100644 index 0000000..14e20dc --- /dev/null +++ b/test-snapshots/query/47fc32682c278474/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/480adf20c4264465/expected.json b/test-snapshots/query/480adf20c4264465/expected.json new file mode 100644 index 0000000..dd552d6 --- /dev/null +++ b/test-snapshots/query/480adf20c4264465/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6053": "Philip Glass Ensemble" + }, + { + "Name_6053": "Nash Ensemble" + }, + { + "Name_6053": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "Name_6053": "Emerson String Quartet" + }, + { + "Name_6053": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "Name_6053": "Gerald Moore" + }, + { + "Name_6053": "Michele Campanella" + }, + { + "Name_6053": "Itzhak Perlman" + }, + { + "Name_6053": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "Name_6053": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/480adf20c4264465/request.json b/test-snapshots/query/480adf20c4264465/request.json new file mode 100644 index 0000000..ba3d231 --- /dev/null +++ b/test-snapshots/query/480adf20c4264465/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_6053": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/48166ac23c86a341/expected.json b/test-snapshots/query/48166ac23c86a341/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/48166ac23c86a341/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/48166ac23c86a341/request.json b/test-snapshots/query/48166ac23c86a341/request.json new file mode 100644 index 0000000..ae5e33c --- /dev/null +++ b/test-snapshots/query/48166ac23c86a341/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/481b89d9a82a40ef/expected.json b/test-snapshots/query/481b89d9a82a40ef/expected.json new file mode 100644 index 0000000..959522f --- /dev/null +++ b/test-snapshots/query/481b89d9a82a40ef/expected.json @@ -0,0 +1,78 @@ +[ + { + "rows": [ + { + "City_0498": "Calgary", + "Email_0410": "steve@chinookcorp.com", + "EmployeeId_4288": 5, + "FirstName_7297": "Steve", + "Phone_2119": "1 (780) 836-9987", + "ReportsTo_2937": 2, + "Title_3614": "Sales Support Agent" + }, + { + "City_0498": "Lethbridge", + "Email_0410": "robert@chinookcorp.com", + "EmployeeId_4288": 7, + "FirstName_7297": "Robert", + "Phone_2119": "+1 (403) 456-9986", + "ReportsTo_2937": 6, + "Title_3614": "IT Staff" + }, + { + "City_0498": "Calgary", + "Email_0410": "nancy@chinookcorp.com", + "EmployeeId_4288": 2, + "FirstName_7297": "Nancy", + "Phone_2119": "+1 (403) 262-3443", + "ReportsTo_2937": 1, + "Title_3614": "Sales Manager" + }, + { + "City_0498": "Calgary", + "Email_0410": "michael@chinookcorp.com", + "EmployeeId_4288": 6, + "FirstName_7297": "Michael", + "Phone_2119": "+1 (403) 246-9887", + "ReportsTo_2937": 1, + "Title_3614": "IT Manager" + }, + { + "City_0498": "Calgary", + "Email_0410": "margaret@chinookcorp.com", + "EmployeeId_4288": 4, + "FirstName_7297": "Margaret", + "Phone_2119": "+1 (403) 263-4423", + "ReportsTo_2937": 2, + "Title_3614": "Sales Support Agent" + }, + { + "City_0498": "Lethbridge", + "Email_0410": "laura@chinookcorp.com", + "EmployeeId_4288": 8, + "FirstName_7297": "Laura", + "Phone_2119": "+1 (403) 467-3351", + "ReportsTo_2937": 6, + "Title_3614": "IT Staff" + }, + { + "City_0498": "Calgary", + "Email_0410": "jane@chinookcorp.com", + "EmployeeId_4288": 3, + "FirstName_7297": "Jane", + "Phone_2119": "+1 (403) 262-3443", + "ReportsTo_2937": 2, + "Title_3614": "Sales Support Agent" + }, + { + "City_0498": "Edmonton", + "Email_0410": "andrew@chinookcorp.com", + "EmployeeId_4288": 1, + "FirstName_7297": "Andrew", + "Phone_2119": "+1 (780) 428-9482", + "ReportsTo_2937": null, + "Title_3614": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/481b89d9a82a40ef/request.json b/test-snapshots/query/481b89d9a82a40ef/request.json new file mode 100644 index 0000000..1d8fd82 --- /dev/null +++ b/test-snapshots/query/481b89d9a82a40ef/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Phone_2119": { + "type": "column", + "column": "Phone", + "fields": null + }, + "ReportsTo_2937": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "City_0498": { + "type": "column", + "column": "City", + "fields": null + }, + "FirstName_7297": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Email_0410": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_4288": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Title_3614": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/481fcfa92f53997d/expected.json b/test-snapshots/query/481fcfa92f53997d/expected.json new file mode 100644 index 0000000..aa3f7ad --- /dev/null +++ b/test-snapshots/query/481fcfa92f53997d/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_0742": 18, + "TrackId_4549": 597 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 1 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 2 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 3 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 4 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 5 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 152 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 160 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 1278 + }, + { + "PlaylistId_0742": 17, + "TrackId_4549": 1283 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/481fcfa92f53997d/request.json b/test-snapshots/query/481fcfa92f53997d/request.json new file mode 100644 index 0000000..84b1a61 --- /dev/null +++ b/test-snapshots/query/481fcfa92f53997d/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_0742": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_4549": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/483c09282ef11cf3/expected.json b/test-snapshots/query/483c09282ef11cf3/expected.json new file mode 100644 index 0000000..12d43ef --- /dev/null +++ b/test-snapshots/query/483c09282ef11cf3/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1004 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/483c09282ef11cf3/request.json b/test-snapshots/query/483c09282ef11cf3/request.json new file mode 100644 index 0000000..0e744f4 --- /dev/null +++ b/test-snapshots/query/483c09282ef11cf3/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1004 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/486691b8d0075b4/expected.json b/test-snapshots/query/486691b8d0075b4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/486691b8d0075b4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/486691b8d0075b4/request.json b/test-snapshots/query/486691b8d0075b4/request.json new file mode 100644 index 0000000..7a6b080 --- /dev/null +++ b/test-snapshots/query/486691b8d0075b4/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "General Manager" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/48c26bfa584861fa/expected.json b/test-snapshots/query/48c26bfa584861fa/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/48c26bfa584861fa/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/48c26bfa584861fa/request.json b/test-snapshots/query/48c26bfa584861fa/request.json new file mode 100644 index 0000000..aaf24fe --- /dev/null +++ b/test-snapshots/query/48c26bfa584861fa/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 268 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/48e435c21ccd6a60/expected.json b/test-snapshots/query/48e435c21ccd6a60/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/48e435c21ccd6a60/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/48e435c21ccd6a60/request.json b/test-snapshots/query/48e435c21ccd6a60/request.json new file mode 100644 index 0000000..5d2fc56 --- /dev/null +++ b/test-snapshots/query/48e435c21ccd6a60/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4901561e64a96776/expected.json b/test-snapshots/query/4901561e64a96776/expected.json new file mode 100644 index 0000000..e881554 --- /dev/null +++ b/test-snapshots/query/4901561e64a96776/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 6877994, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 209684, + "Name": "Miracle", + "TrackId": 1001, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4901561e64a96776/request.json b/test-snapshots/query/4901561e64a96776/request.json new file mode 100644 index 0000000..e0f61ad --- /dev/null +++ b/test-snapshots/query/4901561e64a96776/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4922606f1a7706d2/expected.json b/test-snapshots/query/4922606f1a7706d2/expected.json new file mode 100644 index 0000000..c852662 --- /dev/null +++ b/test-snapshots/query/4922606f1a7706d2/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 102, + "Name": "Marillion" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4922606f1a7706d2/request.json b/test-snapshots/query/4922606f1a7706d2/request.json new file mode 100644 index 0000000..c7d1fb6 --- /dev/null +++ b/test-snapshots/query/4922606f1a7706d2/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/49258599703f3637/expected.json b/test-snapshots/query/49258599703f3637/expected.json new file mode 100644 index 0000000..392e8e5 --- /dev/null +++ b/test-snapshots/query/49258599703f3637/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceLineId_4196": 579, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 1, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 1154, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 1728, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 2, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 580, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 3, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 1155, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 4, + "Quantity_8835": 1 + }, + { + "InvoiceLineId_4196": 1729, + "Quantity_8835": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/49258599703f3637/request.json b/test-snapshots/query/49258599703f3637/request.json new file mode 100644 index 0000000..9ed20f4 --- /dev/null +++ b/test-snapshots/query/49258599703f3637/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_8835": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "InvoiceLineId_4196": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/493c441c47099a4a/expected.json b/test-snapshots/query/493c441c47099a4a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/493c441c47099a4a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/493c441c47099a4a/request.json b/test-snapshots/query/493c441c47099a4a/request.json new file mode 100644 index 0000000..64c1f4b --- /dev/null +++ b/test-snapshots/query/493c441c47099a4a/request.json @@ -0,0 +1,125 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-08-14" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/494caae5f10e56e7/expected.json b/test-snapshots/query/494caae5f10e56e7/expected.json new file mode 100644 index 0000000..3a0dca5 --- /dev/null +++ b/test-snapshots/query/494caae5f10e56e7/expected.json @@ -0,0 +1,206 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 11170334, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 343719, + "TrackId_0738": 1, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 6599424, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 203102, + "TrackId_0738": 9, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 6599424, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 203102, + "TrackId_0738": 9, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 6706347, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 205688, + "TrackId_0738": 13, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 6713451, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 205662, + "TrackId_0738": 6, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 6852860, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 210834, + "TrackId_0738": 8, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 6852860, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 210834, + "TrackId_0738": 8, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 8596840, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 263288, + "TrackId_0738": 12, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 8611245, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 263497, + "TrackId_0738": 10, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_1855": 1, + "Bytes_3059": 8817038, + "Composer_7494": "Angus Young, Malcolm Young, Brian Johnson", + "MediaTypeId_7750": 1, + "Milliseconds_0148": 270863, + "TrackId_0738": 14, + "UnitPrice_7991": 0.99 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/494caae5f10e56e7/request.json b/test-snapshots/query/494caae5f10e56e7/request.json new file mode 100644 index 0000000..2f6b7d0 --- /dev/null +++ b/test-snapshots/query/494caae5f10e56e7/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_1855": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_3059": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_7494": { + "type": "column", + "column": "Composer", + "fields": null + }, + "TrackId_0738": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "MediaTypeId_7750": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_0148": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "UnitPrice_7991": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4a0c2f494eb16be3/expected.json b/test-snapshots/query/4a0c2f494eb16be3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4a0c2f494eb16be3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a0c2f494eb16be3/request.json b/test-snapshots/query/4a0c2f494eb16be3/request.json new file mode 100644 index 0000000..7bd7f31 --- /dev/null +++ b/test-snapshots/query/4a0c2f494eb16be3/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4a1b7700d2d16411/expected.json b/test-snapshots/query/4a1b7700d2d16411/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4a1b7700d2d16411/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a1b7700d2d16411/request.json b/test-snapshots/query/4a1b7700d2d16411/request.json new file mode 100644 index 0000000..2f107a4 --- /dev/null +++ b/test-snapshots/query/4a1b7700d2d16411/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Staff" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4a2baddc40d31f91/expected.json b/test-snapshots/query/4a2baddc40d31f91/expected.json new file mode 100644 index 0000000..eec9c74 --- /dev/null +++ b/test-snapshots/query/4a2baddc40d31f91/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 0.99 + }, + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 1.98 + }, + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 1.98 + }, + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 13.86 + }, + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 3.96 + }, + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 8.91 + }, + { + "BillingAddress_4348": "Lijnbaansgracht 120bg", + "BillingState_2475": "VV", + "CustomerId_5182": 48, + "Total_3531": 8.94 + }, + { + "BillingAddress_4348": "3,Raj Bhavan Road", + "BillingState_2475": null, + "CustomerId_5182": 59, + "Total_3531": 1.98 + }, + { + "BillingAddress_4348": "3,Raj Bhavan Road", + "BillingState_2475": null, + "CustomerId_5182": 59, + "Total_3531": 1.99 + }, + { + "BillingAddress_4348": "3,Raj Bhavan Road", + "BillingState_2475": null, + "CustomerId_5182": 59, + "Total_3531": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a2baddc40d31f91/request.json b/test-snapshots/query/4a2baddc40d31f91/request.json new file mode 100644 index 0000000..444dceb --- /dev/null +++ b/test-snapshots/query/4a2baddc40d31f91/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_4348": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "CustomerId_5182": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Total_3531": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingState_2475": { + "type": "column", + "column": "BillingState", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4a76f83b592810d4/expected.json b/test-snapshots/query/4a76f83b592810d4/expected.json new file mode 100644 index 0000000..b76a046 --- /dev/null +++ b/test-snapshots/query/4a76f83b592810d4/expected.json @@ -0,0 +1,16 @@ +[ + { + "aggregates": { + "InvoiceId_count": 2240, + "InvoiceId_distinct_count": 412, + "InvoiceLineId_count": 2240, + "InvoiceLineId_distinct_count": 2240, + "Quantity_count": 2240, + "Quantity_distinct_count": 1, + "TrackId_count": 2240, + "TrackId_distinct_count": 1984, + "UnitPrice_count": 2240, + "UnitPrice_distinct_count": 2 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a76f83b592810d4/request.json b/test-snapshots/query/4a76f83b592810d4/request.json new file mode 100644 index 0000000..5f32a88 --- /dev/null +++ b/test-snapshots/query/4a76f83b592810d4/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "InvoiceId_count": { + "type": "column_count", + "column": "InvoiceId", + "distinct": false + }, + "InvoiceId_distinct_count": { + "type": "column_count", + "column": "InvoiceId", + "distinct": true + }, + "InvoiceLineId_count": { + "type": "column_count", + "column": "InvoiceLineId", + "distinct": false + }, + "InvoiceLineId_distinct_count": { + "type": "column_count", + "column": "InvoiceLineId", + "distinct": true + }, + "Quantity_count": { + "type": "column_count", + "column": "Quantity", + "distinct": false + }, + "Quantity_distinct_count": { + "type": "column_count", + "column": "Quantity", + "distinct": true + }, + "TrackId_count": { + "type": "column_count", + "column": "TrackId", + "distinct": false + }, + "TrackId_distinct_count": { + "type": "column_count", + "column": "TrackId", + "distinct": true + }, + "UnitPrice_count": { + "type": "column_count", + "column": "UnitPrice", + "distinct": false + }, + "UnitPrice_distinct_count": { + "type": "column_count", + "column": "UnitPrice", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4a7e2377113def66/expected.json b/test-snapshots/query/4a7e2377113def66/expected.json new file mode 100644 index 0000000..e7a9692 --- /dev/null +++ b/test-snapshots/query/4a7e2377113def66/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a7e2377113def66/request.json b/test-snapshots/query/4a7e2377113def66/request.json new file mode 100644 index 0000000..ba4a6b3 --- /dev/null +++ b/test-snapshots/query/4a7e2377113def66/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4a8403056d4d924e/expected.json b/test-snapshots/query/4a8403056d4d924e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4a8403056d4d924e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a8403056d4d924e/request.json b/test-snapshots/query/4a8403056d4d924e/request.json new file mode 100644 index 0000000..b42129b --- /dev/null +++ b/test-snapshots/query/4a8403056d4d924e/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13.86 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4a884afdae46eee0/expected.json b/test-snapshots/query/4a884afdae46eee0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4a884afdae46eee0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a884afdae46eee0/request.json b/test-snapshots/query/4a884afdae46eee0/request.json new file mode 100644 index 0000000..08552b5 --- /dev/null +++ b/test-snapshots/query/4a884afdae46eee0/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4a907949af5014b6/expected.json b/test-snapshots/query/4a907949af5014b6/expected.json new file mode 100644 index 0000000..c9e5552 --- /dev/null +++ b/test-snapshots/query/4a907949af5014b6/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_4397": 155 + }, + { + "ArtistId_4397": 168 + }, + { + "ArtistId_4397": 212 + }, + { + "ArtistId_4397": 255 + }, + { + "ArtistId_4397": 181 + }, + { + "ArtistId_4397": 211 + }, + { + "ArtistId_4397": 154 + }, + { + "ArtistId_4397": 75 + }, + { + "ArtistId_4397": 73 + }, + { + "ArtistId_4397": 74 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4a907949af5014b6/request.json b/test-snapshots/query/4a907949af5014b6/request.json new file mode 100644 index 0000000..e7ccb36 --- /dev/null +++ b/test-snapshots/query/4a907949af5014b6/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_4397": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4aa7190dc4211c80/expected.json b/test-snapshots/query/4aa7190dc4211c80/expected.json new file mode 100644 index 0000000..42c6906 --- /dev/null +++ b/test-snapshots/query/4aa7190dc4211c80/expected.json @@ -0,0 +1,54 @@ +[ + { + "rows": [ + { + "Country_2846": "Canada", + "Fax_8053": "+1 (403) 467-8772", + "HireDate_0207": "2004-03-04", + "PostalCode_4754": "T1H 1Y8" + }, + { + "Country_2846": "Canada", + "Fax_8053": "+1 (403) 456-8485", + "HireDate_0207": "2004-01-02", + "PostalCode_4754": "T1K 5N8" + }, + { + "Country_2846": "Canada", + "Fax_8053": "+1 (403) 262-3322", + "HireDate_0207": "2002-05-01", + "PostalCode_4754": "T2P 2T3" + }, + { + "Country_2846": "Canada", + "Fax_8053": "+1 (403) 263-4289", + "HireDate_0207": "2003-05-03", + "PostalCode_4754": "T2P 5G3" + }, + { + "Country_2846": "Canada", + "Fax_8053": "+1 (403) 262-6712", + "HireDate_0207": "2002-04-01", + "PostalCode_4754": "T2P 5M5" + }, + { + "Country_2846": "Canada", + "Fax_8053": "+1 (403) 246-9899", + "HireDate_0207": "2003-10-17", + "PostalCode_4754": "T3B 0C5" + }, + { + "Country_2846": "Canada", + "Fax_8053": "1 (780) 836-9543", + "HireDate_0207": "2003-10-17", + "PostalCode_4754": "T3B 1Y7" + }, + { + "Country_2846": "Canada", + "Fax_8053": "+1 (780) 428-3457", + "HireDate_0207": "2002-08-14", + "PostalCode_4754": "T5K 2N1" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4aa7190dc4211c80/request.json b/test-snapshots/query/4aa7190dc4211c80/request.json new file mode 100644 index 0000000..a58d5dd --- /dev/null +++ b/test-snapshots/query/4aa7190dc4211c80/request.json @@ -0,0 +1,58 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_4754": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "HireDate_0207": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Fax_8053": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Country_2846": { + "type": "column", + "column": "Country", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4ab0a95d9bc5605c/expected.json b/test-snapshots/query/4ab0a95d9bc5605c/expected.json new file mode 100644 index 0000000..40b110e --- /dev/null +++ b/test-snapshots/query/4ab0a95d9bc5605c/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 10 + }, + { + "PlaylistId": 8, + "TrackId": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ab0a95d9bc5605c/request.json b/test-snapshots/query/4ab0a95d9bc5605c/request.json new file mode 100644 index 0000000..35897ec --- /dev/null +++ b/test-snapshots/query/4ab0a95d9bc5605c/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4ac9183e5306aa25/expected.json b/test-snapshots/query/4ac9183e5306aa25/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/4ac9183e5306aa25/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ac9183e5306aa25/request.json b/test-snapshots/query/4ac9183e5306aa25/request.json new file mode 100644 index 0000000..298a0c6 --- /dev/null +++ b/test-snapshots/query/4ac9183e5306aa25/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4ae86ace24de61ae/expected.json b/test-snapshots/query/4ae86ace24de61ae/expected.json new file mode 100644 index 0000000..ffe3bab --- /dev/null +++ b/test-snapshots/query/4ae86ace24de61ae/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ae86ace24de61ae/request.json b/test-snapshots/query/4ae86ace24de61ae/request.json new file mode 100644 index 0000000..92f7517 --- /dev/null +++ b/test-snapshots/query/4ae86ace24de61ae/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 343719 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b0e249f336ef71e/expected.json b/test-snapshots/query/4b0e249f336ef71e/expected.json new file mode 100644 index 0000000..b10f87c --- /dev/null +++ b/test-snapshots/query/4b0e249f336ef71e/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_3611": 108, + "InvoiceLineId_6161": 578, + "Quantity_0062": 1, + "TrackId_4831": 3500, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 319, + "InvoiceLineId_6161": 1727, + "Quantity_0062": 1, + "TrackId_4831": 3500, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 214, + "InvoiceLineId_6161": 1153, + "Quantity_0062": 1, + "TrackId_4831": 3499, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 108, + "InvoiceLineId_6161": 577, + "Quantity_0062": 1, + "TrackId_4831": 3496, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 319, + "InvoiceLineId_6161": 1726, + "Quantity_0062": 1, + "TrackId_4831": 3494, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 213, + "InvoiceLineId_6161": 1152, + "Quantity_0062": 1, + "TrackId_4831": 3493, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 107, + "InvoiceLineId_6161": 576, + "Quantity_0062": 1, + "TrackId_4831": 3492, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 107, + "InvoiceLineId_6161": 575, + "Quantity_0062": 1, + "TrackId_4831": 3490, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 213, + "InvoiceLineId_6161": 1151, + "Quantity_0062": 1, + "TrackId_4831": 3489, + "UnitPrice_7505": 0.99 + }, + { + "InvoiceId_3611": 107, + "InvoiceLineId_6161": 574, + "Quantity_0062": 1, + "TrackId_4831": 3488, + "UnitPrice_7505": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b0e249f336ef71e/request.json b/test-snapshots/query/4b0e249f336ef71e/request.json new file mode 100644 index 0000000..eb92cca --- /dev/null +++ b/test-snapshots/query/4b0e249f336ef71e/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_3611": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_6161": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_0062": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_4831": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_7505": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4b20ab224afd3ef6/expected.json b/test-snapshots/query/4b20ab224afd3ef6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4b20ab224afd3ef6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b20ab224afd3ef6/request.json b/test-snapshots/query/4b20ab224afd3ef6/request.json new file mode 100644 index 0000000..5a2c89d --- /dev/null +++ b/test-snapshots/query/4b20ab224afd3ef6/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (780) 428-3457" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1965-03-03" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b28c99342a6133/expected.json b/test-snapshots/query/4b28c99342a6133/expected.json new file mode 100644 index 0000000..df3bfc5 --- /dev/null +++ b/test-snapshots/query/4b28c99342a6133/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_9295": 1 + }, + { + "ArtistId_9295": 2 + }, + { + "ArtistId_9295": 3 + }, + { + "ArtistId_9295": 4 + }, + { + "ArtistId_9295": 5 + }, + { + "ArtistId_9295": 6 + }, + { + "ArtistId_9295": 7 + }, + { + "ArtistId_9295": 8 + }, + { + "ArtistId_9295": 9 + }, + { + "ArtistId_9295": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b28c99342a6133/request.json b/test-snapshots/query/4b28c99342a6133/request.json new file mode 100644 index 0000000..ca9d93e --- /dev/null +++ b/test-snapshots/query/4b28c99342a6133/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_9295": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4b29c1e554104004/expected.json b/test-snapshots/query/4b29c1e554104004/expected.json new file mode 100644 index 0000000..e81ba15 --- /dev/null +++ b/test-snapshots/query/4b29c1e554104004/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "ArtistId_count_7681": 275, + "ArtistId_max_4374": 275, + "ArtistId_min_6762": 1, + "ArtistId_sum_3613": 37950, + "Name_min_8777": "A Cor Do Som" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b29c1e554104004/request.json b/test-snapshots/query/4b29c1e554104004/request.json new file mode 100644 index 0000000..acd033e --- /dev/null +++ b/test-snapshots/query/4b29c1e554104004/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "aggregates": { + "ArtistId_sum_3613": { + "type": "single_column", + "column": "ArtistId", + "function": "sum" + }, + "Name_min_8777": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "ArtistId_count_7681": { + "type": "single_column", + "column": "ArtistId", + "function": "count" + }, + "ArtistId_max_4374": { + "type": "single_column", + "column": "ArtistId", + "function": "max" + }, + "ArtistId_min_6762": { + "type": "single_column", + "column": "ArtistId", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4b2f417abe91513f/expected.json b/test-snapshots/query/4b2f417abe91513f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4b2f417abe91513f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b2f417abe91513f/request.json b/test-snapshots/query/4b2f417abe91513f/request.json new file mode 100644 index 0000000..7683ef2 --- /dev/null +++ b/test-snapshots/query/4b2f417abe91513f/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "King" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b3feea6c7ac7694/expected.json b/test-snapshots/query/4b3feea6c7ac7694/expected.json new file mode 100644 index 0000000..0c458d9 --- /dev/null +++ b/test-snapshots/query/4b3feea6c7ac7694/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b3feea6c7ac7694/request.json b/test-snapshots/query/4b3feea6c7ac7694/request.json new file mode 100644 index 0000000..125c615 --- /dev/null +++ b/test-snapshots/query/4b3feea6c7ac7694/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b60fb9f1c242cb1/expected.json b/test-snapshots/query/4b60fb9f1c242cb1/expected.json new file mode 100644 index 0000000..da5727a --- /dev/null +++ b/test-snapshots/query/4b60fb9f1c242cb1/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 537, + "Quantity": 1, + "TrackId": 3258, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 538, + "Quantity": 1, + "TrackId": 3260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 107, + "InvoiceLineId": 573, + "Quantity": 1, + "TrackId": 3486, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 107, + "InvoiceLineId": 574, + "Quantity": 1, + "TrackId": 3488, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 107, + "InvoiceLineId": 575, + "Quantity": 1, + "TrackId": 3490, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 107, + "InvoiceLineId": 576, + "Quantity": 1, + "TrackId": 3492, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 114, + "InvoiceLineId": 611, + "Quantity": 1, + "TrackId": 215, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 114, + "InvoiceLineId": 612, + "Quantity": 1, + "TrackId": 217, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b60fb9f1c242cb1/request.json b/test-snapshots/query/4b60fb9f1c242cb1/request.json new file mode 100644 index 0000000..b1b67c7 --- /dev/null +++ b/test-snapshots/query/4b60fb9f1c242cb1/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b6c3fc665015c9f/expected.json b/test-snapshots/query/4b6c3fc665015c9f/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/4b6c3fc665015c9f/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b6c3fc665015c9f/request.json b/test-snapshots/query/4b6c3fc665015c9f/request.json new file mode 100644 index 0000000..cee2614 --- /dev/null +++ b/test-snapshots/query/4b6c3fc665015c9f/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4b6c51ad97b82e71/expected.json b/test-snapshots/query/4b6c51ad97b82e71/expected.json new file mode 100644 index 0000000..b1b14f6 --- /dev/null +++ b/test-snapshots/query/4b6c51ad97b82e71/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 121, + "Bytes": 1851753, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 102630, + "Name": "Midnight", + "TrackId": 1504, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 1944738, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 108435, + "Name": "Hill of the Skull", + "TrackId": 1501, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3300654, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 193560, + "Name": "Satch Boogie", + "TrackId": 1500, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3435777, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 202035, + "Name": "Always With Me, Always With You", + "TrackId": 1499, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3548553, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 209071, + "Name": "Circles", + "TrackId": 1502, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4036215, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 239721, + "Name": "Ice 9", + "TrackId": 1497, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4418504, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 263707, + "Name": "Surfing with the Alien", + "TrackId": 1496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4809279, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 288227, + "Name": "Lords of Karma", + "TrackId": 1503, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5232158, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 314768, + "Name": "Crushing Day", + "TrackId": 1498, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5595557, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 337570, + "Name": "Echo", + "TrackId": 1505, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b6c51ad97b82e71/request.json b/test-snapshots/query/4b6c51ad97b82e71/request.json new file mode 100644 index 0000000..a2f8e52 --- /dev/null +++ b/test-snapshots/query/4b6c51ad97b82e71/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b72545b15c46d5b/expected.json b/test-snapshots/query/4b72545b15c46d5b/expected.json new file mode 100644 index 0000000..671e85d --- /dev/null +++ b/test-snapshots/query/4b72545b15c46d5b/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_3271": 1, + "InvoiceLineId_0199": 2, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 1, + "InvoiceLineId_0199": 1, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 2, + "InvoiceLineId_0199": 6, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 2, + "InvoiceLineId_0199": 5, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 2, + "InvoiceLineId_0199": 4, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 2, + "InvoiceLineId_0199": 3, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 3, + "InvoiceLineId_0199": 12, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 3, + "InvoiceLineId_0199": 11, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 3, + "InvoiceLineId_0199": 10, + "UnitPrice_1662": 0.99 + }, + { + "InvoiceId_3271": 3, + "InvoiceLineId_0199": 9, + "UnitPrice_1662": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b72545b15c46d5b/request.json b/test-snapshots/query/4b72545b15c46d5b/request.json new file mode 100644 index 0000000..05dfcd0 --- /dev/null +++ b/test-snapshots/query/4b72545b15c46d5b/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_3271": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_0199": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "UnitPrice_1662": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4b7cbdfd8d9f8683/expected.json b/test-snapshots/query/4b7cbdfd8d9f8683/expected.json new file mode 100644 index 0000000..ed226db --- /dev/null +++ b/test-snapshots/query/4b7cbdfd8d9f8683/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + }, + { + "Name": "Music", + "PlaylistId": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b7cbdfd8d9f8683/request.json b/test-snapshots/query/4b7cbdfd8d9f8683/request.json new file mode 100644 index 0000000..972b05f --- /dev/null +++ b/test-snapshots/query/4b7cbdfd8d9f8683/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1007 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4b8e09b60fb6c811/expected.json b/test-snapshots/query/4b8e09b60fb6c811/expected.json new file mode 100644 index 0000000..da05f30 --- /dev/null +++ b/test-snapshots/query/4b8e09b60fb6c811/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Classical 101 - Deep Cuts", + "PlaylistId": 13 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4b8e09b60fb6c811/request.json b/test-snapshots/query/4b8e09b60fb6c811/request.json new file mode 100644 index 0000000..ace2bb6 --- /dev/null +++ b/test-snapshots/query/4b8e09b60fb6c811/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4bcb4bc2bc7dc892/expected.json b/test-snapshots/query/4bcb4bc2bc7dc892/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4bcb4bc2bc7dc892/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4bcb4bc2bc7dc892/request.json b/test-snapshots/query/4bcb4bc2bc7dc892/request.json new file mode 100644 index 0000000..39d8347 --- /dev/null +++ b/test-snapshots/query/4bcb4bc2bc7dc892/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1973-08-29" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4bcc1bbe0b3bf637/expected.json b/test-snapshots/query/4bcc1bbe0b3bf637/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4bcc1bbe0b3bf637/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4bcc1bbe0b3bf637/request.json b/test-snapshots/query/4bcc1bbe0b3bf637/request.json new file mode 100644 index 0000000..71d5024 --- /dev/null +++ b/test-snapshots/query/4bcc1bbe0b3bf637/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4bcd6d25b06a4c70/expected.json b/test-snapshots/query/4bcd6d25b06a4c70/expected.json new file mode 100644 index 0000000..00131fa --- /dev/null +++ b/test-snapshots/query/4bcd6d25b06a4c70/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_8815": 18 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + }, + { + "PlaylistId_8815": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4bcd6d25b06a4c70/request.json b/test-snapshots/query/4bcd6d25b06a4c70/request.json new file mode 100644 index 0000000..d9604eb --- /dev/null +++ b/test-snapshots/query/4bcd6d25b06a4c70/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8815": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4bf29d44ebbac0ab/expected.json b/test-snapshots/query/4bf29d44ebbac0ab/expected.json new file mode 100644 index 0000000..c149a54 --- /dev/null +++ b/test-snapshots/query/4bf29d44ebbac0ab/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4bf29d44ebbac0ab/request.json b/test-snapshots/query/4bf29d44ebbac0ab/request.json new file mode 100644 index 0000000..e31fc28 --- /dev/null +++ b/test-snapshots/query/4bf29d44ebbac0ab/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4c3c65e929cccb9a/expected.json b/test-snapshots/query/4c3c65e929cccb9a/expected.json new file mode 100644 index 0000000..69eb316 --- /dev/null +++ b/test-snapshots/query/4c3c65e929cccb9a/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4c3c65e929cccb9a/request.json b/test-snapshots/query/4c3c65e929cccb9a/request.json new file mode 100644 index 0000000..d4691b0 --- /dev/null +++ b/test-snapshots/query/4c3c65e929cccb9a/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4c514e4b5bfb0f14/expected.json b/test-snapshots/query/4c514e4b5bfb0f14/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/4c514e4b5bfb0f14/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4c514e4b5bfb0f14/request.json b/test-snapshots/query/4c514e4b5bfb0f14/request.json new file mode 100644 index 0000000..1acf77f --- /dev/null +++ b/test-snapshots/query/4c514e4b5bfb0f14/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4c5a6b6dda2ec6cc/expected.json b/test-snapshots/query/4c5a6b6dda2ec6cc/expected.json new file mode 100644 index 0000000..c3cc323 --- /dev/null +++ b/test-snapshots/query/4c5a6b6dda2ec6cc/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Composer_1158": "Aaron Goldberg", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Andrea Dulbecco", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Habib Koité", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Habib Koité", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Karsh Kale", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Karsh Kale/Vishal Vaid", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Luca Gusella", + "UnitPrice_7244": 0.99 + }, + { + "Composer_1158": "Luciana Souza", + "UnitPrice_7244": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4c5a6b6dda2ec6cc/request.json b/test-snapshots/query/4c5a6b6dda2ec6cc/request.json new file mode 100644 index 0000000..ec5f7b7 --- /dev/null +++ b/test-snapshots/query/4c5a6b6dda2ec6cc/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "UnitPrice_7244": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Composer_1158": { + "type": "column", + "column": "Composer", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4c7ec2226147c1ee/expected.json b/test-snapshots/query/4c7ec2226147c1ee/expected.json new file mode 100644 index 0000000..9971c76 --- /dev/null +++ b/test-snapshots/query/4c7ec2226147c1ee/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4c7ec2226147c1ee/request.json b/test-snapshots/query/4c7ec2226147c1ee/request.json new file mode 100644 index 0000000..ab9a4a3 --- /dev/null +++ b/test-snapshots/query/4c7ec2226147c1ee/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4c9fd744970541e5/expected.json b/test-snapshots/query/4c9fd744970541e5/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/4c9fd744970541e5/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4c9fd744970541e5/request.json b/test-snapshots/query/4c9fd744970541e5/request.json new file mode 100644 index 0000000..6be9c4c --- /dev/null +++ b/test-snapshots/query/4c9fd744970541e5/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Snowballed" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4cb728c63274f304/expected.json b/test-snapshots/query/4cb728c63274f304/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/4cb728c63274f304/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4cb728c63274f304/request.json b/test-snapshots/query/4cb728c63274f304/request.json new file mode 100644 index 0000000..0dd7c43 --- /dev/null +++ b/test-snapshots/query/4cb728c63274f304/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4cd9fb7615e941cc/expected.json b/test-snapshots/query/4cd9fb7615e941cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4cd9fb7615e941cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4cd9fb7615e941cc/request.json b/test-snapshots/query/4cd9fb7615e941cc/request.json new file mode 100644 index 0000000..902202b --- /dev/null +++ b/test-snapshots/query/4cd9fb7615e941cc/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4ce0cedeb4ec933/expected.json b/test-snapshots/query/4ce0cedeb4ec933/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4ce0cedeb4ec933/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ce0cedeb4ec933/request.json b/test-snapshots/query/4ce0cedeb4ec933/request.json new file mode 100644 index 0000000..a6ef469 --- /dev/null +++ b/test-snapshots/query/4ce0cedeb4ec933/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 263-4423" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "590 Columbia Boulevard West" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4cea477a7b83aeeb/expected.json b/test-snapshots/query/4cea477a7b83aeeb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4cea477a7b83aeeb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4cea477a7b83aeeb/request.json b/test-snapshots/query/4cea477a7b83aeeb/request.json new file mode 100644 index 0000000..3bb5caa --- /dev/null +++ b/test-snapshots/query/4cea477a7b83aeeb/request.json @@ -0,0 +1,91 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4d16dd77cb2f742/expected.json b/test-snapshots/query/4d16dd77cb2f742/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4d16dd77cb2f742/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4d16dd77cb2f742/request.json b/test-snapshots/query/4d16dd77cb2f742/request.json new file mode 100644 index 0000000..be69286 --- /dev/null +++ b/test-snapshots/query/4d16dd77cb2f742/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4d3d80b8ef638a8e/expected.json b/test-snapshots/query/4d3d80b8ef638a8e/expected.json new file mode 100644 index 0000000..3c48e4b --- /dev/null +++ b/test-snapshots/query/4d3d80b8ef638a8e/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4d3d80b8ef638a8e/request.json b/test-snapshots/query/4d3d80b8ef638a8e/request.json new file mode 100644 index 0000000..e4c766d --- /dev/null +++ b/test-snapshots/query/4d3d80b8ef638a8e/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 47 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4d903c5c01e09c94/expected.json b/test-snapshots/query/4d903c5c01e09c94/expected.json new file mode 100644 index 0000000..1e708eb --- /dev/null +++ b/test-snapshots/query/4d903c5c01e09c94/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 11, + "TrackId": 1088 + }, + { + "PlaylistId": 11, + "TrackId": 1093 + }, + { + "PlaylistId": 11, + "TrackId": 1099 + }, + { + "PlaylistId": 11, + "TrackId": 1105 + }, + { + "PlaylistId": 11, + "TrackId": 1514 + }, + { + "PlaylistId": 11, + "TrackId": 1518 + }, + { + "PlaylistId": 11, + "TrackId": 1519 + }, + { + "PlaylistId": 11, + "TrackId": 1916 + }, + { + "PlaylistId": 11, + "TrackId": 1921 + }, + { + "PlaylistId": 11, + "TrackId": 1928 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4d903c5c01e09c94/request.json b/test-snapshots/query/4d903c5c01e09c94/request.json new file mode 100644 index 0000000..c298d9d --- /dev/null +++ b/test-snapshots/query/4d903c5c01e09c94/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4da7abbdb0ca5b25/expected.json b/test-snapshots/query/4da7abbdb0ca5b25/expected.json new file mode 100644 index 0000000..b47235a --- /dev/null +++ b/test-snapshots/query/4da7abbdb0ca5b25/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4da7abbdb0ca5b25/request.json b/test-snapshots/query/4da7abbdb0ca5b25/request.json new file mode 100644 index 0000000..72d3d49 --- /dev/null +++ b/test-snapshots/query/4da7abbdb0ca5b25/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 268 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4db92ffb97a3d035/expected.json b/test-snapshots/query/4db92ffb97a3d035/expected.json new file mode 100644 index 0000000..b542865 --- /dev/null +++ b/test-snapshots/query/4db92ffb97a3d035/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + }, + { + "FK_AlbumArtistId": { + "rows": [] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4db92ffb97a3d035/request.json b/test-snapshots/query/4db92ffb97a3d035/request.json new file mode 100644 index 0000000..586f632 --- /dev/null +++ b/test-snapshots/query/4db92ffb97a3d035/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4dbe2b191b25a8ea/expected.json b/test-snapshots/query/4dbe2b191b25a8ea/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4dbe2b191b25a8ea/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4dbe2b191b25a8ea/request.json b/test-snapshots/query/4dbe2b191b25a8ea/request.json new file mode 100644 index 0000000..a7d69cb --- /dev/null +++ b/test-snapshots/query/4dbe2b191b25a8ea/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4e0c06447df7f6a1/expected.json b/test-snapshots/query/4e0c06447df7f6a1/expected.json new file mode 100644 index 0000000..a21539a --- /dev/null +++ b/test-snapshots/query/4e0c06447df7f6a1/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4e0c06447df7f6a1/request.json b/test-snapshots/query/4e0c06447df7f6a1/request.json new file mode 100644 index 0000000..6961a47 --- /dev/null +++ b/test-snapshots/query/4e0c06447df7f6a1/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4e21ac700259ea81/expected.json b/test-snapshots/query/4e21ac700259ea81/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4e21ac700259ea81/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4e21ac700259ea81/request.json b/test-snapshots/query/4e21ac700259ea81/request.json new file mode 100644 index 0000000..2b7e2a9 --- /dev/null +++ b/test-snapshots/query/4e21ac700259ea81/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4e25d0683c7987ed/expected.json b/test-snapshots/query/4e25d0683c7987ed/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4e25d0683c7987ed/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4e25d0683c7987ed/request.json b/test-snapshots/query/4e25d0683c7987ed/request.json new file mode 100644 index 0000000..49f581f --- /dev/null +++ b/test-snapshots/query/4e25d0683c7987ed/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Manager" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lethbridge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4e49234e939f284d/expected.json b/test-snapshots/query/4e49234e939f284d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4e49234e939f284d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4e49234e939f284d/request.json b/test-snapshots/query/4e49234e939f284d/request.json new file mode 100644 index 0000000..fd1e3c7 --- /dev/null +++ b/test-snapshots/query/4e49234e939f284d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Hip Hop/Rap" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4e5b0c6ecfd9c31b/expected.json b/test-snapshots/query/4e5b0c6ecfd9c31b/expected.json new file mode 100644 index 0000000..188c66f --- /dev/null +++ b/test-snapshots/query/4e5b0c6ecfd9c31b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + }, + { + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "Name": "Audiobooks", + "PlaylistId": 6 + }, + { + "Name": "Brazilian Music", + "PlaylistId": 11 + }, + { + "Name": "Classical 101 - Deep Cuts", + "PlaylistId": 13 + }, + { + "Name": "Classical 101 - Next Steps", + "PlaylistId": 14 + }, + { + "Name": "Classical 101 - The Basics", + "PlaylistId": 15 + }, + { + "Name": "Classical", + "PlaylistId": 12 + }, + { + "Name": "Grunge", + "PlaylistId": 16 + }, + { + "Name": "Heavy Metal Classic", + "PlaylistId": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4e5b0c6ecfd9c31b/request.json b/test-snapshots/query/4e5b0c6ecfd9c31b/request.json new file mode 100644 index 0000000..32d9859 --- /dev/null +++ b/test-snapshots/query/4e5b0c6ecfd9c31b/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4e808125ce530cbf/expected.json b/test-snapshots/query/4e808125ce530cbf/expected.json new file mode 100644 index 0000000..6d49cdd --- /dev/null +++ b/test-snapshots/query/4e808125ce530cbf/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4e808125ce530cbf/request.json b/test-snapshots/query/4e808125ce530cbf/request.json new file mode 100644 index 0000000..47c179f --- /dev/null +++ b/test-snapshots/query/4e808125ce530cbf/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4ea83eb40e6d0336/expected.json b/test-snapshots/query/4ea83eb40e6d0336/expected.json new file mode 100644 index 0000000..cdff0df --- /dev/null +++ b/test-snapshots/query/4ea83eb40e6d0336/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_6071": "3,Raj Bhavan Road", + "City_5675": "Bangalore", + "Company_6187": null, + "Country_6129": "India", + "CustomerId_4935": 59, + "Email_0592": "puja_srivastava@yahoo.in", + "Fax_1991": null, + "FirstName_9046": "Puja", + "LastName_4922": "Srivastava", + "PostalCode_0648": "560001" + }, + { + "Address_6071": "12,Community Centre", + "City_5675": "Delhi", + "Company_6187": null, + "Country_6129": "India", + "CustomerId_4935": 58, + "Email_0592": "manoj.pareek@rediff.com", + "Fax_1991": null, + "FirstName_9046": "Manoj", + "LastName_4922": "Pareek", + "PostalCode_0648": "110017" + }, + { + "Address_6071": "421 Bourke Street", + "City_5675": "Sidney", + "Company_6187": null, + "Country_6129": "Australia", + "CustomerId_4935": 55, + "Email_0592": "mark.taylor@yahoo.au", + "Fax_1991": null, + "FirstName_9046": "Mark", + "LastName_4922": "Taylor", + "PostalCode_0648": "2010" + }, + { + "Address_6071": "Calle Lira, 198", + "City_5675": "Santiago", + "Company_6187": null, + "Country_6129": "Chile", + "CustomerId_4935": 57, + "Email_0592": "luisrojas@yahoo.cl", + "Fax_1991": null, + "FirstName_9046": "Luis", + "LastName_4922": "Rojas", + "PostalCode_0648": null + }, + { + "Address_6071": "Qe 7 Bloco G", + "City_5675": "Brasília", + "Company_6187": null, + "Country_6129": "Brazil", + "CustomerId_4935": 13, + "Email_0592": "fernadaramos4@uol.com.br", + "Fax_1991": "+55 (61) 3363-7855", + "FirstName_9046": "Fernanda", + "LastName_4922": "Ramos", + "PostalCode_0648": "71020-677" + }, + { + "Address_6071": "Praça Pio X, 119", + "City_5675": "Rio de Janeiro", + "Company_6187": "Riotur", + "Country_6129": "Brazil", + "CustomerId_4935": 12, + "Email_0592": "roberto.almeida@riotur.gov.br", + "Fax_1991": "+55 (21) 2271-7070", + "FirstName_9046": "Roberto", + "LastName_4922": "Almeida", + "PostalCode_0648": "20040-020" + }, + { + "Address_6071": "Av. Brigadeiro Faria Lima, 2170", + "City_5675": "São José dos Campos", + "Company_6187": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_6129": "Brazil", + "CustomerId_4935": 1, + "Email_0592": "luisg@embraer.com.br", + "Fax_1991": "+55 (12) 3923-5566", + "FirstName_9046": "Luís", + "LastName_4922": "Gonçalves", + "PostalCode_0648": "12227-000" + }, + { + "Address_6071": "Av. Paulista, 2022", + "City_5675": "São Paulo", + "Company_6187": "Banco do Brasil S.A.", + "Country_6129": "Brazil", + "CustomerId_4935": 11, + "Email_0592": "alero@uol.com.br", + "Fax_1991": "+55 (11) 3055-8131", + "FirstName_9046": "Alexandre", + "LastName_4922": "Rocha", + "PostalCode_0648": "01310-200" + }, + { + "Address_6071": "Rua Dr. Falcão Filho, 155", + "City_5675": "São Paulo", + "Company_6187": "Woodstock Discos", + "Country_6129": "Brazil", + "CustomerId_4935": 10, + "Email_0592": "eduardo@woodstock.com.br", + "Fax_1991": "+55 (11) 3033-4564", + "FirstName_9046": "Eduardo", + "LastName_4922": "Martins", + "PostalCode_0648": "01007-010" + }, + { + "Address_6071": "307 Macacha Güemes", + "City_5675": "Buenos Aires", + "Company_6187": null, + "Country_6129": "Argentina", + "CustomerId_4935": 56, + "Email_0592": "diego.gutierrez@yahoo.ar", + "Fax_1991": null, + "FirstName_9046": "Diego", + "LastName_4922": "Gutiérrez", + "PostalCode_0648": "1106" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ea83eb40e6d0336/request.json b/test-snapshots/query/4ea83eb40e6d0336/request.json new file mode 100644 index 0000000..a921245 --- /dev/null +++ b/test-snapshots/query/4ea83eb40e6d0336/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_6071": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_5675": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_6187": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_6129": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_4935": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_0592": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_1991": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_9046": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_4922": { + "type": "column", + "column": "LastName", + "fields": null + }, + "PostalCode_0648": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4eb2e2184b38c79b/expected.json b/test-snapshots/query/4eb2e2184b38c79b/expected.json new file mode 100644 index 0000000..cfe3131 --- /dev/null +++ b/test-snapshots/query/4eb2e2184b38c79b/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4eb2e2184b38c79b/request.json b/test-snapshots/query/4eb2e2184b38c79b/request.json new file mode 100644 index 0000000..23d77ae --- /dev/null +++ b/test-snapshots/query/4eb2e2184b38c79b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4eb4317c0f037c41/expected.json b/test-snapshots/query/4eb4317c0f037c41/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/4eb4317c0f037c41/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4eb4317c0f037c41/request.json b/test-snapshots/query/4eb4317c0f037c41/request.json new file mode 100644 index 0000000..5e46fd3 --- /dev/null +++ b/test-snapshots/query/4eb4317c0f037c41/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (520) 622-4200" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4ef3f40c9842ded5/expected.json b/test-snapshots/query/4ef3f40c9842ded5/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/4ef3f40c9842ded5/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ef3f40c9842ded5/request.json b/test-snapshots/query/4ef3f40c9842ded5/request.json new file mode 100644 index 0000000..4fe2634 --- /dev/null +++ b/test-snapshots/query/4ef3f40c9842ded5/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1002 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/4ef44e3a0dbede72/expected.json b/test-snapshots/query/4ef44e3a0dbede72/expected.json new file mode 100644 index 0000000..3512dbd --- /dev/null +++ b/test-snapshots/query/4ef44e3a0dbede72/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4ef44e3a0dbede72/request.json b/test-snapshots/query/4ef44e3a0dbede72/request.json new file mode 100644 index 0000000..09102d5 --- /dev/null +++ b/test-snapshots/query/4ef44e3a0dbede72/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210834 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4f4becfe93bb6ef8/expected.json b/test-snapshots/query/4f4becfe93bb6ef8/expected.json new file mode 100644 index 0000000..2ebc189 --- /dev/null +++ b/test-snapshots/query/4f4becfe93bb6ef8/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_0886": 10 + }, + { + "PlaylistId_0886": 3 + }, + { + "PlaylistId_0886": 18 + }, + { + "PlaylistId_0886": 9 + }, + { + "PlaylistId_0886": 1 + }, + { + "PlaylistId_0886": 8 + }, + { + "PlaylistId_0886": 2 + }, + { + "PlaylistId_0886": 7 + }, + { + "PlaylistId_0886": 17 + }, + { + "PlaylistId_0886": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4f4becfe93bb6ef8/request.json b/test-snapshots/query/4f4becfe93bb6ef8/request.json new file mode 100644 index 0000000..a9b0153 --- /dev/null +++ b/test-snapshots/query/4f4becfe93bb6ef8/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "PlaylistId_0886": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4f535b6984cfddef/expected.json b/test-snapshots/query/4f535b6984cfddef/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/4f535b6984cfddef/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4f535b6984cfddef/request.json b/test-snapshots/query/4f535b6984cfddef/request.json new file mode 100644 index 0000000..02201fe --- /dev/null +++ b/test-snapshots/query/4f535b6984cfddef/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4f693f66d2873fd6/expected.json b/test-snapshots/query/4f693f66d2873fd6/expected.json new file mode 100644 index 0000000..5a843ac --- /dev/null +++ b/test-snapshots/query/4f693f66d2873fd6/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_6531": 1, + "ArtistId_5906": 1, + "Title_4542": "For Those About To Rock We Salute You" + }, + { + "AlbumId_6531": 2, + "ArtistId_5906": 2, + "Title_4542": "Balls to the Wall" + }, + { + "AlbumId_6531": 3, + "ArtistId_5906": 2, + "Title_4542": "Restless and Wild" + }, + { + "AlbumId_6531": 4, + "ArtistId_5906": 1, + "Title_4542": "Let There Be Rock" + }, + { + "AlbumId_6531": 5, + "ArtistId_5906": 3, + "Title_4542": "Big Ones" + }, + { + "AlbumId_6531": 6, + "ArtistId_5906": 4, + "Title_4542": "Jagged Little Pill" + }, + { + "AlbumId_6531": 7, + "ArtistId_5906": 5, + "Title_4542": "Facelift" + }, + { + "AlbumId_6531": 8, + "ArtistId_5906": 6, + "Title_4542": "Warner 25 Anos" + }, + { + "AlbumId_6531": 9, + "ArtistId_5906": 7, + "Title_4542": "Plays Metallica By Four Cellos" + }, + { + "AlbumId_6531": 10, + "ArtistId_5906": 8, + "Title_4542": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4f693f66d2873fd6/request.json b/test-snapshots/query/4f693f66d2873fd6/request.json new file mode 100644 index 0000000..7fb4182 --- /dev/null +++ b/test-snapshots/query/4f693f66d2873fd6/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_6531": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_5906": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_4542": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4f771650de860145/expected.json b/test-snapshots/query/4f771650de860145/expected.json new file mode 100644 index 0000000..d790804 --- /dev/null +++ b/test-snapshots/query/4f771650de860145/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_4362": "TV Shows" + }, + { + "Name_4362": "TV Shows" + }, + { + "Name_4362": "On-The-Go 1" + }, + { + "Name_4362": "Music Videos" + }, + { + "Name_4362": "Music" + }, + { + "Name_4362": "Music" + }, + { + "Name_4362": "Movies" + }, + { + "Name_4362": "Movies" + }, + { + "Name_4362": "Heavy Metal Classic" + }, + { + "Name_4362": "Grunge" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4f771650de860145/request.json b/test-snapshots/query/4f771650de860145/request.json new file mode 100644 index 0000000..57036d1 --- /dev/null +++ b/test-snapshots/query/4f771650de860145/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_4362": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4fc3855ced787eb3/expected.json b/test-snapshots/query/4fc3855ced787eb3/expected.json new file mode 100644 index 0000000..4b7bc14 --- /dev/null +++ b/test-snapshots/query/4fc3855ced787eb3/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_4771": "On-The-Go 1", + "PlaylistId_6374": 18 + }, + { + "Name_4771": "Heavy Metal Classic", + "PlaylistId_6374": 17 + }, + { + "Name_4771": "Grunge", + "PlaylistId_6374": 16 + }, + { + "Name_4771": "Classical 101 - The Basics", + "PlaylistId_6374": 15 + }, + { + "Name_4771": "Classical 101 - Next Steps", + "PlaylistId_6374": 14 + }, + { + "Name_4771": "Classical 101 - Deep Cuts", + "PlaylistId_6374": 13 + }, + { + "Name_4771": "Classical", + "PlaylistId_6374": 12 + }, + { + "Name_4771": "Brazilian Music", + "PlaylistId_6374": 11 + }, + { + "Name_4771": "TV Shows", + "PlaylistId_6374": 10 + }, + { + "Name_4771": "Music Videos", + "PlaylistId_6374": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4fc3855ced787eb3/request.json b/test-snapshots/query/4fc3855ced787eb3/request.json new file mode 100644 index 0000000..a59d7aa --- /dev/null +++ b/test-snapshots/query/4fc3855ced787eb3/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_4771": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_6374": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/4fe73ebbb6a30718/expected.json b/test-snapshots/query/4fe73ebbb6a30718/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/4fe73ebbb6a30718/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/4fe73ebbb6a30718/request.json b/test-snapshots/query/4fe73ebbb6a30718/request.json new file mode 100644 index 0000000..6c48dfe --- /dev/null +++ b/test-snapshots/query/4fe73ebbb6a30718/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tremblay" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 54 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/503d1abdbfdeaa7/expected.json b/test-snapshots/query/503d1abdbfdeaa7/expected.json new file mode 100644 index 0000000..b5eca56 --- /dev/null +++ b/test-snapshots/query/503d1abdbfdeaa7/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1002 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/503d1abdbfdeaa7/request.json b/test-snapshots/query/503d1abdbfdeaa7/request.json new file mode 100644 index 0000000..9b83399 --- /dev/null +++ b/test-snapshots/query/503d1abdbfdeaa7/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1002 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5048d38be6e4cc0e/expected.json b/test-snapshots/query/5048d38be6e4cc0e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5048d38be6e4cc0e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5048d38be6e4cc0e/request.json b/test-snapshots/query/5048d38be6e4cc0e/request.json new file mode 100644 index 0000000..bbb462d --- /dev/null +++ b/test-snapshots/query/5048d38be6e4cc0e/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/50590bd51a13c209/expected.json b/test-snapshots/query/50590bd51a13c209/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/50590bd51a13c209/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/50590bd51a13c209/request.json b/test-snapshots/query/50590bd51a13c209/request.json new file mode 100644 index 0000000..8219bac --- /dev/null +++ b/test-snapshots/query/50590bd51a13c209/request.json @@ -0,0 +1,188 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1968-01-09" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-03-04" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "laura@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/505eff1ee290c3e6/expected.json b/test-snapshots/query/505eff1ee290c3e6/expected.json new file mode 100644 index 0000000..b7c896a --- /dev/null +++ b/test-snapshots/query/505eff1ee290c3e6/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 8, + "TrackId": 7 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/505eff1ee290c3e6/request.json b/test-snapshots/query/505eff1ee290c3e6/request.json new file mode 100644 index 0000000..9301259 --- /dev/null +++ b/test-snapshots/query/505eff1ee290c3e6/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/50619ce2de12f388/expected.json b/test-snapshots/query/50619ce2de12f388/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/50619ce2de12f388/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/50619ce2de12f388/request.json b/test-snapshots/query/50619ce2de12f388/request.json new file mode 100644 index 0000000..6ef17e3 --- /dev/null +++ b/test-snapshots/query/50619ce2de12f388/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Staff" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edmonton" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/50881f2b73a642a9/expected.json b/test-snapshots/query/50881f2b73a642a9/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/50881f2b73a642a9/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/50881f2b73a642a9/request.json b/test-snapshots/query/50881f2b73a642a9/request.json new file mode 100644 index 0000000..7ed79c3 --- /dev/null +++ b/test-snapshots/query/50881f2b73a642a9/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/50c3811a5161b83e/expected.json b/test-snapshots/query/50c3811a5161b83e/expected.json new file mode 100644 index 0000000..88b5da4 --- /dev/null +++ b/test-snapshots/query/50c3811a5161b83e/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 547, + "Quantity": 1, + "TrackId": 3302, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 548, + "Quantity": 1, + "TrackId": 3308, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 549, + "Quantity": 1, + "TrackId": 3314, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 550, + "Quantity": 1, + "TrackId": 3320, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/50c3811a5161b83e/request.json b/test-snapshots/query/50c3811a5161b83e/request.json new file mode 100644 index 0000000..3fb62d3 --- /dev/null +++ b/test-snapshots/query/50c3811a5161b83e/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5178e2fc9ece38a9/expected.json b/test-snapshots/query/5178e2fc9ece38a9/expected.json new file mode 100644 index 0000000..6388317 --- /dev/null +++ b/test-snapshots/query/5178e2fc9ece38a9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Grunge", + "PlaylistId": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5178e2fc9ece38a9/request.json b/test-snapshots/query/5178e2fc9ece38a9/request.json new file mode 100644 index 0000000..af032ef --- /dev/null +++ b/test-snapshots/query/5178e2fc9ece38a9/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5183ccc1612a6f89/expected.json b/test-snapshots/query/5183ccc1612a6f89/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5183ccc1612a6f89/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5183ccc1612a6f89/request.json b/test-snapshots/query/5183ccc1612a6f89/request.json new file mode 100644 index 0000000..faf035f --- /dev/null +++ b/test-snapshots/query/5183ccc1612a6f89/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "robert@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 1Y7" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5188ae8ff605dde4/expected.json b/test-snapshots/query/5188ae8ff605dde4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5188ae8ff605dde4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5188ae8ff605dde4/request.json b/test-snapshots/query/5188ae8ff605dde4/request.json new file mode 100644 index 0000000..e30c747 --- /dev/null +++ b/test-snapshots/query/5188ae8ff605dde4/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/519a5ee1b966201e/expected.json b/test-snapshots/query/519a5ee1b966201e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/519a5ee1b966201e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/519a5ee1b966201e/request.json b/test-snapshots/query/519a5ee1b966201e/request.json new file mode 100644 index 0000000..f20ad22 --- /dev/null +++ b/test-snapshots/query/519a5ee1b966201e/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/51be93743e3ac602/expected.json b/test-snapshots/query/51be93743e3ac602/expected.json new file mode 100644 index 0000000..b47235a --- /dev/null +++ b/test-snapshots/query/51be93743e3ac602/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/51be93743e3ac602/request.json b/test-snapshots/query/51be93743e3ac602/request.json new file mode 100644 index 0000000..71cd9d6 --- /dev/null +++ b/test-snapshots/query/51be93743e3ac602/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/51c042fcc488b1b/expected.json b/test-snapshots/query/51c042fcc488b1b/expected.json new file mode 100644 index 0000000..92f6167 --- /dev/null +++ b/test-snapshots/query/51c042fcc488b1b/expected.json @@ -0,0 +1,34 @@ +[ + { + "rows": [ + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/51c042fcc488b1b/request.json b/test-snapshots/query/51c042fcc488b1b/request.json new file mode 100644 index 0000000..60b6862 --- /dev/null +++ b/test-snapshots/query/51c042fcc488b1b/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-10-22" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/51c63c05b86e47ef/expected.json b/test-snapshots/query/51c63c05b86e47ef/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/51c63c05b86e47ef/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/51c63c05b86e47ef/request.json b/test-snapshots/query/51c63c05b86e47ef/request.json new file mode 100644 index 0000000..c0bd322 --- /dev/null +++ b/test-snapshots/query/51c63c05b86e47ef/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1970-05-29" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Johnson" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 2T3" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/51c6b940ae15d6dd/expected.json b/test-snapshots/query/51c6b940ae15d6dd/expected.json new file mode 100644 index 0000000..570e13b --- /dev/null +++ b/test-snapshots/query/51c6b940ae15d6dd/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "Email_1117": "fzimmermann@yahoo.de", + "Fax_5651": null, + "LastName_0618": "Zimmermann", + "State_2338": null, + "SupportRepId_5690": 3 + }, + { + "Email_1117": "stanisław.wójcik@wp.pl", + "Fax_5651": null, + "LastName_0618": "Wójcik", + "State_2338": null, + "SupportRepId_5690": 4 + }, + { + "Email_1117": "frantisekw@jetbrains.com", + "Fax_5651": "+420 2 4172 5555", + "LastName_0618": "Wichterlová", + "State_2338": null, + "SupportRepId_5690": 4 + }, + { + "Email_1117": "johavanderberg@yahoo.nl", + "Fax_5651": null, + "LastName_0618": "Van der Berg", + "State_2338": "VV", + "SupportRepId_5690": 5 + }, + { + "Email_1117": "ftremblay@gmail.com", + "Fax_5651": null, + "LastName_0618": "Tremblay", + "State_2338": "QC", + "SupportRepId_5690": 3 + }, + { + "Email_1117": "mark.taylor@yahoo.au", + "Fax_5651": null, + "LastName_0618": "Taylor", + "State_2338": "NSW", + "SupportRepId_5690": 4 + }, + { + "Email_1117": "ellie.sullivan@shaw.ca", + "Fax_5651": null, + "LastName_0618": "Sullivan", + "State_2338": "NT", + "SupportRepId_5690": 3 + }, + { + "Email_1117": "vstevens@yahoo.com", + "Fax_5651": null, + "LastName_0618": "Stevens", + "State_2338": "WI", + "SupportRepId_5690": 5 + }, + { + "Email_1117": "puja_srivastava@yahoo.in", + "Fax_5651": null, + "LastName_0618": "Srivastava", + "State_2338": null, + "SupportRepId_5690": 3 + }, + { + "Email_1117": "jacksmith@microsoft.com", + "Fax_5651": "+1 (425) 882-8081", + "LastName_0618": "Smith", + "State_2338": "WA", + "SupportRepId_5690": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/51c6b940ae15d6dd/request.json b/test-snapshots/query/51c6b940ae15d6dd/request.json new file mode 100644 index 0000000..9e4333f --- /dev/null +++ b/test-snapshots/query/51c6b940ae15d6dd/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_5690": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Fax_5651": { + "type": "column", + "column": "Fax", + "fields": null + }, + "State_2338": { + "type": "column", + "column": "State", + "fields": null + }, + "Email_1117": { + "type": "column", + "column": "Email", + "fields": null + }, + "LastName_0618": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/51e8263d74e3f957/expected.json b/test-snapshots/query/51e8263d74e3f957/expected.json new file mode 100644 index 0000000..1ad6bb5 --- /dev/null +++ b/test-snapshots/query/51e8263d74e3f957/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/51e8263d74e3f957/request.json b/test-snapshots/query/51e8263d74e3f957/request.json new file mode 100644 index 0000000..0a8f084 --- /dev/null +++ b/test-snapshots/query/51e8263d74e3f957/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/51f9a55cb80cfc44/expected.json b/test-snapshots/query/51f9a55cb80cfc44/expected.json new file mode 100644 index 0000000..45ba842 --- /dev/null +++ b/test-snapshots/query/51f9a55cb80cfc44/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/51f9a55cb80cfc44/request.json b/test-snapshots/query/51f9a55cb80cfc44/request.json new file mode 100644 index 0000000..dbbbb9a --- /dev/null +++ b/test-snapshots/query/51f9a55cb80cfc44/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263288 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/520464e348f609ed/expected.json b/test-snapshots/query/520464e348f609ed/expected.json new file mode 100644 index 0000000..3b8d4e5 --- /dev/null +++ b/test-snapshots/query/520464e348f609ed/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 13, + "ArtistId": 10, + "Title": "The Best Of Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/520464e348f609ed/request.json b/test-snapshots/query/520464e348f609ed/request.json new file mode 100644 index 0000000..d946f87 --- /dev/null +++ b/test-snapshots/query/520464e348f609ed/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/520f33b897efed3d/expected.json b/test-snapshots/query/520f33b897efed3d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/520f33b897efed3d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/520f33b897efed3d/request.json b/test-snapshots/query/520f33b897efed3d/request.json new file mode 100644 index 0000000..bbd3f29 --- /dev/null +++ b/test-snapshots/query/520f33b897efed3d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/523b40e20acd06e2/expected.json b/test-snapshots/query/523b40e20acd06e2/expected.json new file mode 100644 index 0000000..a00eeb1 --- /dev/null +++ b/test-snapshots/query/523b40e20acd06e2/expected.json @@ -0,0 +1,48 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/523b40e20acd06e2/request.json b/test-snapshots/query/523b40e20acd06e2/request.json new file mode 100644 index 0000000..581e5f5 --- /dev/null +++ b/test-snapshots/query/523b40e20acd06e2/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/52494f2c46924bac/expected.json b/test-snapshots/query/52494f2c46924bac/expected.json new file mode 100644 index 0000000..e01cfcb --- /dev/null +++ b/test-snapshots/query/52494f2c46924bac/expected.json @@ -0,0 +1,136 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 1, + "Name_9886": "AC/DC" + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 8, + "Name_9886": "Audioslave" + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_4885": 90, + "Name_9886": "Iron Maiden" + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/52494f2c46924bac/request.json b/test-snapshots/query/52494f2c46924bac/request.json new file mode 100644 index 0000000..4636731 --- /dev/null +++ b/test-snapshots/query/52494f2c46924bac/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId_4885": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_9886": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/52a9e38d62b83d19/expected.json b/test-snapshots/query/52a9e38d62b83d19/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/52a9e38d62b83d19/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/52a9e38d62b83d19/request.json b/test-snapshots/query/52a9e38d62b83d19/request.json new file mode 100644 index 0000000..22c755c --- /dev/null +++ b/test-snapshots/query/52a9e38d62b83d19/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/530d79cb46813c1/expected.json b/test-snapshots/query/530d79cb46813c1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/530d79cb46813c1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/530d79cb46813c1/request.json b/test-snapshots/query/530d79cb46813c1/request.json new file mode 100644 index 0000000..1b3c468 --- /dev/null +++ b/test-snapshots/query/530d79cb46813c1/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5313eac3622986f9/expected.json b/test-snapshots/query/5313eac3622986f9/expected.json new file mode 100644 index 0000000..561f837 --- /dev/null +++ b/test-snapshots/query/5313eac3622986f9/expected.json @@ -0,0 +1,13 @@ +[ + { + "aggregates": { + "AlbumId_max_3402": 347, + "AlbumId_min_1008": 1, + "AlbumId_sum_7858": 60378, + "ArtistId_median_8087": 112, + "ArtistId_sum_9554": 42314, + "Title_count_5964": 347, + "Title_min_7748": "...And Justice For All" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/5313eac3622986f9/request.json b/test-snapshots/query/5313eac3622986f9/request.json new file mode 100644 index 0000000..d356eb6 --- /dev/null +++ b/test-snapshots/query/5313eac3622986f9/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "Title_count_5964": { + "type": "single_column", + "column": "Title", + "function": "count" + }, + "ArtistId_median_8087": { + "type": "single_column", + "column": "ArtistId", + "function": "median" + }, + "AlbumId_max_3402": { + "type": "single_column", + "column": "AlbumId", + "function": "max" + }, + "ArtistId_sum_9554": { + "type": "single_column", + "column": "ArtistId", + "function": "sum" + }, + "AlbumId_min_1008": { + "type": "single_column", + "column": "AlbumId", + "function": "min" + }, + "Title_min_7748": { + "type": "single_column", + "column": "Title", + "function": "min" + }, + "AlbumId_sum_7858": { + "type": "single_column", + "column": "AlbumId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5320d7d17537f7a9/expected.json b/test-snapshots/query/5320d7d17537f7a9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5320d7d17537f7a9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5320d7d17537f7a9/request.json b/test-snapshots/query/5320d7d17537f7a9/request.json new file mode 100644 index 0000000..7687fdb --- /dev/null +++ b/test-snapshots/query/5320d7d17537f7a9/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "phil.hughes@gmail.com" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "113 Lupus St" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/533228feec90ba15/expected.json b/test-snapshots/query/533228feec90ba15/expected.json new file mode 100644 index 0000000..7862f1b --- /dev/null +++ b/test-snapshots/query/533228feec90ba15/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_3356": 102, + "TrackId_4801": 3338, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 103, + "TrackId_4801": 3347, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 103, + "TrackId_4801": 3428, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 193, + "TrackId_4801": 2821, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 193, + "TrackId_4801": 2827, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 193, + "TrackId_4801": 2833, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 193, + "TrackId_4801": 2839, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 193, + "TrackId_4801": 2845, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 193, + "TrackId_4801": 2851, + "UnitPrice_3668": 1.99 + }, + { + "InvoiceId_3356": 194, + "TrackId_4801": 2860, + "UnitPrice_3668": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/533228feec90ba15/request.json b/test-snapshots/query/533228feec90ba15/request.json new file mode 100644 index 0000000..4304db0 --- /dev/null +++ b/test-snapshots/query/533228feec90ba15/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_3356": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "TrackId_4801": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_3668": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/534f3ad244db512a/expected.json b/test-snapshots/query/534f3ad244db512a/expected.json new file mode 100644 index 0000000..5ca11ed --- /dev/null +++ b/test-snapshots/query/534f3ad244db512a/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 124, + "Bytes": 3948371, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 118804, + "Name": "Cuando Eu For Pro Ceu", + "TrackId": 1541, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6031174, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 180924, + "Name": "Cafezinho", + "TrackId": 1544, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6056200, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 182308, + "Name": "No Futuro", + "TrackId": 1535, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6400532, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 190484, + "Name": "Choramingando", + "TrackId": 1533, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6774566, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 203415, + "Name": "Do Nosso Amor", + "TrackId": 1542, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7104588, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 208457, + "Name": "Borogodo", + "TrackId": 1543, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7248336, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 220891, + "Name": "Enquanto O Dia Não Vem", + "TrackId": 1545, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7257390, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 213263, + "Name": "Papelão", + "TrackId": 1540, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7764601, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 230582, + "Name": "Por Merecer", + "TrackId": 1534, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 8077282, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 241084, + "Name": "Voce Inteira", + "TrackId": 1536, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/534f3ad244db512a/request.json b/test-snapshots/query/534f3ad244db512a/request.json new file mode 100644 index 0000000..15afdb3 --- /dev/null +++ b/test-snapshots/query/534f3ad244db512a/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/535b20f14a2614e9/expected.json b/test-snapshots/query/535b20f14a2614e9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/535b20f14a2614e9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/535b20f14a2614e9/request.json b/test-snapshots/query/535b20f14a2614e9/request.json new file mode 100644 index 0000000..d77826f --- /dev/null +++ b/test-snapshots/query/535b20f14a2614e9/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8596840 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/538566e660138bfe/expected.json b/test-snapshots/query/538566e660138bfe/expected.json new file mode 100644 index 0000000..00b8c29 --- /dev/null +++ b/test-snapshots/query/538566e660138bfe/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 19, + "FirstName_3394": "Tim" + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 17, + "FirstName_3394": "Jack" + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 17, + "FirstName_3394": "Jack" + } + ] + }, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "CustomerId_2008": 17, + "FirstName_3394": "Jack" + } + ] + }, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/538566e660138bfe/request.json b/test-snapshots/query/538566e660138bfe/request.json new file mode 100644 index 0000000..3e9284e --- /dev/null +++ b/test-snapshots/query/538566e660138bfe/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "FirstName_3394": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "CustomerId_2008": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/538bac3dce511695/expected.json b/test-snapshots/query/538bac3dce511695/expected.json new file mode 100644 index 0000000..3abe3e6 --- /dev/null +++ b/test-snapshots/query/538bac3dce511695/expected.json @@ -0,0 +1,13 @@ +[ + { + "aggregates": { + "AlbumId_count_1958": 347, + "AlbumId_median_5681": 174, + "AlbumId_sum_2545": 60378, + "ArtistId_avg_0076": 121.942363112, + "ArtistId_count_0461": 347, + "Title_max_2958": "[1997] Black Light Syndrome", + "Title_min_1962": "...And Justice For All" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/538bac3dce511695/request.json b/test-snapshots/query/538bac3dce511695/request.json new file mode 100644 index 0000000..58d0a96 --- /dev/null +++ b/test-snapshots/query/538bac3dce511695/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "ArtistId_avg_0076": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + }, + "AlbumId_count_1958": { + "type": "single_column", + "column": "AlbumId", + "function": "count" + }, + "AlbumId_median_5681": { + "type": "single_column", + "column": "AlbumId", + "function": "median" + }, + "ArtistId_count_0461": { + "type": "single_column", + "column": "ArtistId", + "function": "count" + }, + "Title_max_2958": { + "type": "single_column", + "column": "Title", + "function": "max" + }, + "Title_min_1962": { + "type": "single_column", + "column": "Title", + "function": "min" + }, + "AlbumId_sum_2545": { + "type": "single_column", + "column": "AlbumId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/53ec40a6f36389bf/expected.json b/test-snapshots/query/53ec40a6f36389bf/expected.json new file mode 100644 index 0000000..c1689d8 --- /dev/null +++ b/test-snapshots/query/53ec40a6f36389bf/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/53ec40a6f36389bf/request.json b/test-snapshots/query/53ec40a6f36389bf/request.json new file mode 100644 index 0000000..1833b91 --- /dev/null +++ b/test-snapshots/query/53ec40a6f36389bf/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6599424 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/540535fd7ea57d4f/expected.json b/test-snapshots/query/540535fd7ea57d4f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/540535fd7ea57d4f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/540535fd7ea57d4f/request.json b/test-snapshots/query/540535fd7ea57d4f/request.json new file mode 100644 index 0000000..726d141 --- /dev/null +++ b/test-snapshots/query/540535fd7ea57d4f/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/540bc33182ed43ef/expected.json b/test-snapshots/query/540bc33182ed43ef/expected.json new file mode 100644 index 0000000..efe010d --- /dev/null +++ b/test-snapshots/query/540bc33182ed43ef/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/540bc33182ed43ef/request.json b/test-snapshots/query/540bc33182ed43ef/request.json new file mode 100644 index 0000000..f46e949 --- /dev/null +++ b/test-snapshots/query/540bc33182ed43ef/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Google Inc." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heather" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5440093960ad7842/expected.json b/test-snapshots/query/5440093960ad7842/expected.json new file mode 100644 index 0000000..cd07262 --- /dev/null +++ b/test-snapshots/query/5440093960ad7842/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_6015": 1, + "Name_3043": "AC/DC" + }, + { + "ArtistId_6015": 2, + "Name_3043": "Accept" + }, + { + "ArtistId_6015": 3, + "Name_3043": "Aerosmith" + }, + { + "ArtistId_6015": 4, + "Name_3043": "Alanis Morissette" + }, + { + "ArtistId_6015": 5, + "Name_3043": "Alice In Chains" + }, + { + "ArtistId_6015": 6, + "Name_3043": "Antônio Carlos Jobim" + }, + { + "ArtistId_6015": 7, + "Name_3043": "Apocalyptica" + }, + { + "ArtistId_6015": 8, + "Name_3043": "Audioslave" + }, + { + "ArtistId_6015": 9, + "Name_3043": "BackBeat" + }, + { + "ArtistId_6015": 10, + "Name_3043": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5440093960ad7842/request.json b/test-snapshots/query/5440093960ad7842/request.json new file mode 100644 index 0000000..db06d8d --- /dev/null +++ b/test-snapshots/query/5440093960ad7842/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_6015": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_3043": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/547dccfd1b6a6080/expected.json b/test-snapshots/query/547dccfd1b6a6080/expected.json new file mode 100644 index 0000000..35707a3 --- /dev/null +++ b/test-snapshots/query/547dccfd1b6a6080/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 105, + "Bytes": 3672064, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229459, + "Name": "Holy Smoke", + "TrackId": 1326, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 3960832, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 247510, + "Name": "Hooks In You", + "TrackId": 1332, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4018088, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 250853, + "Name": "Fates Warning", + "TrackId": 1329, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4071587, + "Composer": "Bruce Dickinson/David Murray", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 254197, + "Name": "Public Enema Number One", + "TrackId": 1328, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4089856, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 255582, + "Name": "Tailgunner", + "TrackId": 1325, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4141056, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 258768, + "Name": "The Assassin", + "TrackId": 1330, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4225024, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 263941, + "Name": "No Prayer For The Dying", + "TrackId": 1327, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4407296, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275408, + "Name": "Run Silent Run Deep", + "TrackId": 1331, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4548608, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 284238, + "Name": "Bring Your Daughter... ...To The Slaughter", + "TrackId": 1333, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 5322752, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 332617, + "Name": "Mother Russia", + "TrackId": 1334, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/547dccfd1b6a6080/request.json b/test-snapshots/query/547dccfd1b6a6080/request.json new file mode 100644 index 0000000..3f135a4 --- /dev/null +++ b/test-snapshots/query/547dccfd1b6a6080/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/54c8be3b17942828/expected.json b/test-snapshots/query/54c8be3b17942828/expected.json new file mode 100644 index 0000000..3885538 --- /dev/null +++ b/test-snapshots/query/54c8be3b17942828/expected.json @@ -0,0 +1,236 @@ +[ + { + "rows": [ + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2009-03-04" + }, + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2009-04-14" + }, + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2009-12-13" + }, + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2011-07-20" + }, + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2011-10-22" + }, + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2012-01-24" + }, + { + "BillingAddress_8972": "1 Infinite Loop", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceDate_9883": "2012-09-13" + }, + { + "BillingAddress_8972": "1 Microsoft Way", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceDate_9883": "2009-03-04" + }, + { + "BillingAddress_8972": "1 Microsoft Way", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceDate_9883": "2009-06-06" + }, + { + "BillingAddress_8972": "1 Microsoft Way", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceDate_9883": "2009-09-08" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/54c8be3b17942828/request.json b/test-snapshots/query/54c8be3b17942828/request.json new file mode 100644 index 0000000..1407267 --- /dev/null +++ b/test-snapshots/query/54c8be3b17942828/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_8972": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "InvoiceDate_9883": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/54da73b5c4d4b652/expected.json b/test-snapshots/query/54da73b5c4d4b652/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/54da73b5c4d4b652/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/54da73b5c4d4b652/request.json b/test-snapshots/query/54da73b5c4d4b652/request.json new file mode 100644 index 0000000..3fa3406 --- /dev/null +++ b/test-snapshots/query/54da73b5c4d4b652/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/54da809a08e692f5/expected.json b/test-snapshots/query/54da809a08e692f5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/54da809a08e692f5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/54da809a08e692f5/request.json b/test-snapshots/query/54da809a08e692f5/request.json new file mode 100644 index 0000000..ee7fac5 --- /dev/null +++ b/test-snapshots/query/54da809a08e692f5/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/54f118aba557efb3/expected.json b/test-snapshots/query/54f118aba557efb3/expected.json new file mode 100644 index 0000000..d277cdb --- /dev/null +++ b/test-snapshots/query/54f118aba557efb3/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "A Cor Do Som" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Academy of St. Martin in the Fields, Sir Neville Marriner & William Bennett" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Aerosmith & Sierra Leone's Refugee Allstars" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Avril Lavigne" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Azymuth" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Baby Consuelo" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Banda Black Rio" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Barão Vermelho" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Bebel Gilberto" + }, + { + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_1585": "Ben Harper" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/54f118aba557efb3/request.json b/test-snapshots/query/54f118aba557efb3/request.json new file mode 100644 index 0000000..ded41b5 --- /dev/null +++ b/test-snapshots/query/54f118aba557efb3/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_1585": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/54f3727752ded948/expected.json b/test-snapshots/query/54f3727752ded948/expected.json new file mode 100644 index 0000000..3acda97 --- /dev/null +++ b/test-snapshots/query/54f3727752ded948/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/54f3727752ded948/request.json b/test-snapshots/query/54f3727752ded948/request.json new file mode 100644 index 0000000..3f90c71 --- /dev/null +++ b/test-snapshots/query/54f3727752ded948/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock (We Salute You)" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/54fd66adb47f377a/expected.json b/test-snapshots/query/54fd66adb47f377a/expected.json new file mode 100644 index 0000000..0689884 --- /dev/null +++ b/test-snapshots/query/54fd66adb47f377a/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2010-03-11", + "InvoiceId_5428": 98, + "Total_8104": 3.98 + }, + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2010-06-13", + "InvoiceId_5428": 121, + "Total_8104": 3.96 + }, + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2010-09-15", + "InvoiceId_5428": 143, + "Total_8104": 5.94 + }, + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2011-05-06", + "InvoiceId_5428": 195, + "Total_8104": 0.99 + }, + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2012-10-27", + "InvoiceId_5428": 316, + "Total_8104": 1.98 + }, + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2012-12-07", + "InvoiceId_5428": 327, + "Total_8104": 13.86 + }, + { + "BillingCity_5690": "São José dos Campos", + "BillingCountry_1948": "Brazil", + "BillingState_6375": "SP", + "InvoiceDate_2754": "2013-08-07", + "InvoiceId_5428": 382, + "Total_8104": 8.91 + }, + { + "BillingCity_5690": "Stuttgart", + "BillingCountry_1948": "Germany", + "BillingState_6375": null, + "InvoiceDate_2754": "2009-01-01", + "InvoiceId_5428": 1, + "Total_8104": 1.98 + }, + { + "BillingCity_5690": "Stuttgart", + "BillingCountry_1948": "Germany", + "BillingState_6375": null, + "InvoiceDate_2754": "2009-02-11", + "InvoiceId_5428": 12, + "Total_8104": 13.86 + }, + { + "BillingCity_5690": "Stuttgart", + "BillingCountry_1948": "Germany", + "BillingState_6375": null, + "InvoiceDate_2754": "2009-10-12", + "InvoiceId_5428": 67, + "Total_8104": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/54fd66adb47f377a/request.json b/test-snapshots/query/54fd66adb47f377a/request.json new file mode 100644 index 0000000..0c07e4f --- /dev/null +++ b/test-snapshots/query/54fd66adb47f377a/request.json @@ -0,0 +1,52 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "Total_8104": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCity_5690": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_1948": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "InvoiceId_5428": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingState_6375": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "InvoiceDate_2754": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5500eaa6920ff210/expected.json b/test-snapshots/query/5500eaa6920ff210/expected.json new file mode 100644 index 0000000..53b0e29 --- /dev/null +++ b/test-snapshots/query/5500eaa6920ff210/expected.json @@ -0,0 +1,558 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7466": 1 + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 121, + "Bytes": 1851753, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 102630, + "Name": "Midnight", + "TrackId": 1504, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 1944738, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 108435, + "Name": "Hill of the Skull", + "TrackId": 1501, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3300654, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 193560, + "Name": "Satch Boogie", + "TrackId": 1500, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3435777, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 202035, + "Name": "Always With Me, Always With You", + "TrackId": 1499, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3548553, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 209071, + "Name": "Circles", + "TrackId": 1502, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4036215, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 239721, + "Name": "Ice 9", + "TrackId": 1497, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4418504, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 263707, + "Name": "Surfing with the Alien", + "TrackId": 1496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4809279, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 288227, + "Name": "Lords of Karma", + "TrackId": 1503, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5232158, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 314768, + "Name": "Crushing Day", + "TrackId": 1498, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5595557, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 337570, + "Name": "Echo", + "TrackId": 1505, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7466": 2 + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 226, + "Bytes": 490750393, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622250, + "Name": "Battlestar Galactica: The Story So Far", + "TrackId": 2819, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 1054423946, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 5286953, + "Name": "Occupation / Precipice", + "TrackId": 2820, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 462818231, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2620245, + "Name": "A Day In the Life", + "TrackId": 2833, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 466820021, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2618000, + "Name": "Exodus, Pt. 2", + "TrackId": 2822, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 475079441, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2621708, + "Name": "Exodus, Pt. 1", + "TrackId": 2821, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 483484911, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2626626, + "Name": "Collaborators", + "TrackId": 2823, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 486233524, + "Composer": null, + "GenreId": 20, + "MediaTypeId": 3, + "Milliseconds": 2622622, + "Name": "Crossroads, Pt. 1", + "TrackId": 2837, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 489715554, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2563938, + "Name": "A Measure of Salvation", + "TrackId": 2825, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 490375760, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2623875, + "Name": "The Passage", + "TrackId": 2828, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 492700163, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624207, + "Name": "Taking a Break from All Your Worries", + "TrackId": 2831, + "UnitPrice": 1.99 + } + ] + }, + "MediaTypeId_7466": 3 + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 260, + "Bytes": 8052374, + "Composer": null, + "GenreId": 23, + "MediaTypeId": 4, + "Milliseconds": 234013, + "Name": "War Pigs", + "TrackId": 3336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 283, + "Bytes": 10085867, + "Composer": "Franz Joseph Haydn", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 306687, + "Name": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId": 3414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 318, + "Bytes": 3819535, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 101293, + "Name": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId": 3452, + "UnitPrice": 0.99 + }, + { + "AlbumId": 324, + "Bytes": 10887931, + "Composer": "Ludwig van Beethoven", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 339567, + "Name": "Prometheus Overture, Op. 43", + "TrackId": 3479, + "UnitPrice": 0.99 + }, + { + "AlbumId": 325, + "Bytes": 9785346, + "Composer": "Béla Bartók", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 299350, + "Name": "Sonata for Solo Violin: IV: Presto", + "TrackId": 3480, + "UnitPrice": 0.99 + }, + { + "AlbumId": 340, + "Bytes": 2229617, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 51780, + "Name": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "TrackId": 3496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 342, + "Bytes": 16454937, + "Composer": "Pietro Antonio Locatelli", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 493573, + "Name": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId": 3498, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7466": 4 + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 262, + "Bytes": 4011615, + "Composer": "Luca Gusella", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 246503, + "Name": "Amanda", + "TrackId": 3349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 262, + "Bytes": 4821485, + "Composer": "Andrea Dulbecco", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 307385, + "Name": "Despertar", + "TrackId": 3350, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4615841, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 285837, + "Name": "Din Din Wo (Little Child)", + "TrackId": 3351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4855457, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 300605, + "Name": "I Ka Barra (Your Work)", + "TrackId": 3354, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 5327463, + "Composer": "Karsh Kale/Vishal Vaid", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 327122, + "Name": "Distance", + "TrackId": 3352, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 6034098, + "Composer": "Karsh Kale", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 366085, + "Name": "One Step Beyond", + "TrackId": 3358, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3240609, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 199923, + "Name": "Love Comes", + "TrackId": 3355, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3453849, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 212044, + "Name": "I Guess You're Right", + "TrackId": 3353, + "UnitPrice": 0.99 + }, + { + "AlbumId": 266, + "Bytes": 2775071, + "Composer": "Luciana Souza", + "GenreId": 7, + "MediaTypeId": 5, + "Milliseconds": 172710, + "Name": "Muita Bobeira", + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "AlbumId": 267, + "Bytes": 4292028, + "Composer": "Aaron Goldberg", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 266936, + "Name": "OAM's Blues", + "TrackId": 3357, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7466": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5500eaa6920ff210/request.json b/test-snapshots/query/5500eaa6920ff210/request.json new file mode 100644 index 0000000..390172a --- /dev/null +++ b/test-snapshots/query/5500eaa6920ff210/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_7466": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/550dd0210f7a37ad/expected.json b/test-snapshots/query/550dd0210f7a37ad/expected.json new file mode 100644 index 0000000..6279a7f --- /dev/null +++ b/test-snapshots/query/550dd0210f7a37ad/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_0876": 25, + "Name_8529": "Opera" + }, + { + "GenreId_0876": 24, + "Name_8529": "Classical" + }, + { + "GenreId_0876": 23, + "Name_8529": "Alternative" + }, + { + "GenreId_0876": 22, + "Name_8529": "Comedy" + }, + { + "GenreId_0876": 21, + "Name_8529": "Drama" + }, + { + "GenreId_0876": 20, + "Name_8529": "Sci Fi & Fantasy" + }, + { + "GenreId_0876": 19, + "Name_8529": "TV Shows" + }, + { + "GenreId_0876": 18, + "Name_8529": "Science Fiction" + }, + { + "GenreId_0876": 17, + "Name_8529": "Hip Hop/Rap" + }, + { + "GenreId_0876": 16, + "Name_8529": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/550dd0210f7a37ad/request.json b/test-snapshots/query/550dd0210f7a37ad/request.json new file mode 100644 index 0000000..dd1b834 --- /dev/null +++ b/test-snapshots/query/550dd0210f7a37ad/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_0876": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_8529": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5539cb573b3d181b/expected.json b/test-snapshots/query/5539cb573b3d181b/expected.json new file mode 100644 index 0000000..98d694c --- /dev/null +++ b/test-snapshots/query/5539cb573b3d181b/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5539cb573b3d181b/request.json b/test-snapshots/query/5539cb573b3d181b/request.json new file mode 100644 index 0000000..b43e137 --- /dev/null +++ b/test-snapshots/query/5539cb573b3d181b/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/554c4b8f314619fb/expected.json b/test-snapshots/query/554c4b8f314619fb/expected.json new file mode 100644 index 0000000..3513914 --- /dev/null +++ b/test-snapshots/query/554c4b8f314619fb/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_3419": 4 + }, + { + "MediaTypeId_3419": 3 + }, + { + "MediaTypeId_3419": 2 + }, + { + "MediaTypeId_3419": 1 + }, + { + "MediaTypeId_3419": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/554c4b8f314619fb/request.json b/test-snapshots/query/554c4b8f314619fb/request.json new file mode 100644 index 0000000..ad2bf83 --- /dev/null +++ b/test-snapshots/query/554c4b8f314619fb/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_3419": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/554d1ce66b1136c1/expected.json b/test-snapshots/query/554d1ce66b1136c1/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/554d1ce66b1136c1/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/554d1ce66b1136c1/request.json b/test-snapshots/query/554d1ce66b1136c1/request.json new file mode 100644 index 0000000..4388f84 --- /dev/null +++ b/test-snapshots/query/554d1ce66b1136c1/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/556625afde609fff/expected.json b/test-snapshots/query/556625afde609fff/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/556625afde609fff/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/556625afde609fff/request.json b/test-snapshots/query/556625afde609fff/request.json new file mode 100644 index 0000000..18ada37 --- /dev/null +++ b/test-snapshots/query/556625afde609fff/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/557074b5d4ff83a4/expected.json b/test-snapshots/query/557074b5d4ff83a4/expected.json new file mode 100644 index 0000000..f98321c --- /dev/null +++ b/test-snapshots/query/557074b5d4ff83a4/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 537, + "Quantity": 1, + "TrackId": 3258, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 538, + "Quantity": 1, + "TrackId": 3260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 539, + "Quantity": 1, + "TrackId": 3264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 540, + "Quantity": 1, + "TrackId": 3268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 541, + "Quantity": 1, + "TrackId": 3272, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 542, + "Quantity": 1, + "TrackId": 3276, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 543, + "Quantity": 1, + "TrackId": 3280, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/557074b5d4ff83a4/request.json b/test-snapshots/query/557074b5d4ff83a4/request.json new file mode 100644 index 0000000..d48691e --- /dev/null +++ b/test-snapshots/query/557074b5d4ff83a4/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5576271cd56922c8/expected.json b/test-snapshots/query/5576271cd56922c8/expected.json new file mode 100644 index 0000000..fc15c78 --- /dev/null +++ b/test-snapshots/query/5576271cd56922c8/expected.json @@ -0,0 +1,30 @@ +[ + { + "rows": [ + { + "ReportsTo_7356": null + }, + { + "ReportsTo_7356": 1 + }, + { + "ReportsTo_7356": 2 + }, + { + "ReportsTo_7356": 2 + }, + { + "ReportsTo_7356": 2 + }, + { + "ReportsTo_7356": 1 + }, + { + "ReportsTo_7356": 6 + }, + { + "ReportsTo_7356": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5576271cd56922c8/request.json b/test-snapshots/query/5576271cd56922c8/request.json new file mode 100644 index 0000000..383f0fe --- /dev/null +++ b/test-snapshots/query/5576271cd56922c8/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "ReportsTo_7356": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/55839a9712a8b172/expected.json b/test-snapshots/query/55839a9712a8b172/expected.json new file mode 100644 index 0000000..041b810 --- /dev/null +++ b/test-snapshots/query/55839a9712a8b172/expected.json @@ -0,0 +1,105 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/55839a9712a8b172/request.json b/test-snapshots/query/55839a9712a8b172/request.json new file mode 100644 index 0000000..aff2f1b --- /dev/null +++ b/test-snapshots/query/55839a9712a8b172/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/55927414333a8a7b/expected.json b/test-snapshots/query/55927414333a8a7b/expected.json new file mode 100644 index 0000000..a5d1f95 --- /dev/null +++ b/test-snapshots/query/55927414333a8a7b/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_1538": "90’s Music" + }, + { + "Name_1538": "Audiobooks" + }, + { + "Name_1538": "Audiobooks" + }, + { + "Name_1538": "Brazilian Music" + }, + { + "Name_1538": "Classical" + }, + { + "Name_1538": "Classical 101 - Deep Cuts" + }, + { + "Name_1538": "Classical 101 - Next Steps" + }, + { + "Name_1538": "Classical 101 - The Basics" + }, + { + "Name_1538": "Grunge" + }, + { + "Name_1538": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/55927414333a8a7b/request.json b/test-snapshots/query/55927414333a8a7b/request.json new file mode 100644 index 0000000..0b6035a --- /dev/null +++ b/test-snapshots/query/55927414333a8a7b/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_1538": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/55b7843f7962d69c/expected.json b/test-snapshots/query/55b7843f7962d69c/expected.json new file mode 100644 index 0000000..de56753 --- /dev/null +++ b/test-snapshots/query/55b7843f7962d69c/expected.json @@ -0,0 +1,40 @@ +[ + { + "rows": [ + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/55b7843f7962d69c/request.json b/test-snapshots/query/55b7843f7962d69c/request.json new file mode 100644 index 0000000..904d96e --- /dev/null +++ b/test-snapshots/query/55b7843f7962d69c/request.json @@ -0,0 +1,112 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/55bf50084be6bed7/expected.json b/test-snapshots/query/55bf50084be6bed7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/55bf50084be6bed7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/55bf50084be6bed7/request.json b/test-snapshots/query/55bf50084be6bed7/request.json new file mode 100644 index 0000000..d2529a9 --- /dev/null +++ b/test-snapshots/query/55bf50084be6bed7/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 58 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/55cf637ea981454/expected.json b/test-snapshots/query/55cf637ea981454/expected.json new file mode 100644 index 0000000..0fa8545 --- /dev/null +++ b/test-snapshots/query/55cf637ea981454/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1005 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/55cf637ea981454/request.json b/test-snapshots/query/55cf637ea981454/request.json new file mode 100644 index 0000000..4c5cc85 --- /dev/null +++ b/test-snapshots/query/55cf637ea981454/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1005 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/55ea426793f82a8b/expected.json b/test-snapshots/query/55ea426793f82a8b/expected.json new file mode 100644 index 0000000..c522dfe --- /dev/null +++ b/test-snapshots/query/55ea426793f82a8b/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/55ea426793f82a8b/request.json b/test-snapshots/query/55ea426793f82a8b/request.json new file mode 100644 index 0000000..46b54f3 --- /dev/null +++ b/test-snapshots/query/55ea426793f82a8b/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/561f0e7b7ace0974/expected.json b/test-snapshots/query/561f0e7b7ace0974/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/561f0e7b7ace0974/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/561f0e7b7ace0974/request.json b/test-snapshots/query/561f0e7b7ace0974/request.json new file mode 100644 index 0000000..6c80020 --- /dev/null +++ b/test-snapshots/query/561f0e7b7ace0974/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 268 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56300e0d6ff7cd4c/expected.json b/test-snapshots/query/56300e0d6ff7cd4c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56300e0d6ff7cd4c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56300e0d6ff7cd4c/request.json b/test-snapshots/query/56300e0d6ff7cd4c/request.json new file mode 100644 index 0000000..387f862 --- /dev/null +++ b/test-snapshots/query/56300e0d6ff7cd4c/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5631ee91ad1414f3/expected.json b/test-snapshots/query/5631ee91ad1414f3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5631ee91ad1414f3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5631ee91ad1414f3/request.json b/test-snapshots/query/5631ee91ad1414f3/request.json new file mode 100644 index 0000000..9d56f07 --- /dev/null +++ b/test-snapshots/query/5631ee91ad1414f3/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Soundtrack" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/56412e8df434feba/expected.json b/test-snapshots/query/56412e8df434feba/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56412e8df434feba/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56412e8df434feba/request.json b/test-snapshots/query/56412e8df434feba/request.json new file mode 100644 index 0000000..0e8f104 --- /dev/null +++ b/test-snapshots/query/56412e8df434feba/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lethbridge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "King" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56517d27b42459b7/expected.json b/test-snapshots/query/56517d27b42459b7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56517d27b42459b7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56517d27b42459b7/request.json b/test-snapshots/query/56517d27b42459b7/request.json new file mode 100644 index 0000000..bca91c7 --- /dev/null +++ b/test-snapshots/query/56517d27b42459b7/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "5827 Bowness Road NW" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56609cd0535f2c30/expected.json b/test-snapshots/query/56609cd0535f2c30/expected.json new file mode 100644 index 0000000..9a09c92 --- /dev/null +++ b/test-snapshots/query/56609cd0535f2c30/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_9133": 25, + "Name_6758": "Opera" + }, + { + "GenreId_9133": 24, + "Name_6758": "Classical" + }, + { + "GenreId_9133": 23, + "Name_6758": "Alternative" + }, + { + "GenreId_9133": 22, + "Name_6758": "Comedy" + }, + { + "GenreId_9133": 21, + "Name_6758": "Drama" + }, + { + "GenreId_9133": 20, + "Name_6758": "Sci Fi & Fantasy" + }, + { + "GenreId_9133": 19, + "Name_6758": "TV Shows" + }, + { + "GenreId_9133": 18, + "Name_6758": "Science Fiction" + }, + { + "GenreId_9133": 17, + "Name_6758": "Hip Hop/Rap" + }, + { + "GenreId_9133": 16, + "Name_6758": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56609cd0535f2c30/request.json b/test-snapshots/query/56609cd0535f2c30/request.json new file mode 100644 index 0000000..770206f --- /dev/null +++ b/test-snapshots/query/56609cd0535f2c30/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_9133": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_6758": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/566f7de9640a19d9/expected.json b/test-snapshots/query/566f7de9640a19d9/expected.json new file mode 100644 index 0000000..d9468cd --- /dev/null +++ b/test-snapshots/query/566f7de9640a19d9/expected.json @@ -0,0 +1,140 @@ +[ + { + "rows": [ + { + "ArtistId_5221": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "Name_6932": "AC/DC" + }, + { + "ArtistId_5221": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 13, + "ArtistId": 10, + "Title": "The Best Of Billy Cobham" + } + ] + }, + "Name_6932": "Billy Cobham" + }, + { + "ArtistId_5221": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 141, + "ArtistId": 100, + "Title": "Greatest Hits" + } + ] + }, + "Name_6932": "Lenny Kravitz" + }, + { + "ArtistId_5221": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 142, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId": 143, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + }, + "Name_6932": "Lulu Santos" + }, + { + "ArtistId_5221": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 144, + "ArtistId": 102, + "Title": "Misplaced Childhood" + } + ] + }, + "Name_6932": "Marillion" + }, + { + "ArtistId_5221": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 145, + "ArtistId": 103, + "Title": "Barulhinho Bom" + } + ] + }, + "Name_6932": "Marisa Monte" + }, + { + "ArtistId_5221": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 146, + "ArtistId": 104, + "Title": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + }, + "Name_6932": "Marvin Gaye" + }, + { + "ArtistId_5221": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 147, + "ArtistId": 105, + "Title": "The Best Of Men At Work" + } + ] + }, + "Name_6932": "Men At Work" + }, + { + "ArtistId_5221": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 160, + "ArtistId": 106, + "Title": "Ace Of Spades" + } + ] + }, + "Name_6932": "Motörhead" + }, + { + "ArtistId_5221": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_6932": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/566f7de9640a19d9/request.json b/test-snapshots/query/566f7de9640a19d9/request.json new file mode 100644 index 0000000..a4961ac --- /dev/null +++ b/test-snapshots/query/566f7de9640a19d9/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_5221": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_6932": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56899316108e977b/expected.json b/test-snapshots/query/56899316108e977b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56899316108e977b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56899316108e977b/request.json b/test-snapshots/query/56899316108e977b/request.json new file mode 100644 index 0000000..76c421f --- /dev/null +++ b/test-snapshots/query/56899316108e977b/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/568c408596f98a24/expected.json b/test-snapshots/query/568c408596f98a24/expected.json new file mode 100644 index 0000000..922bc11 --- /dev/null +++ b/test-snapshots/query/568c408596f98a24/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_2948": "[1997] Black Light Syndrome" + }, + { + "Title_2948": "Zooropa" + }, + { + "Title_2948": "Worlds" + }, + { + "Title_2948": "Weill: The Seven Deadly Sins" + }, + { + "Title_2948": "Warner 25 Anos" + }, + { + "Title_2948": "War" + }, + { + "Title_2948": "Walking Into Clarksdale" + }, + { + "Title_2948": "Wagner: Favourite Overtures" + }, + { + "Title_2948": "Vs." + }, + { + "Title_2948": "Vozes do MPB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/568c408596f98a24/request.json b/test-snapshots/query/568c408596f98a24/request.json new file mode 100644 index 0000000..5c6309a --- /dev/null +++ b/test-snapshots/query/568c408596f98a24/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_2948": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/568e3ad9aa24b1d/expected.json b/test-snapshots/query/568e3ad9aa24b1d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/568e3ad9aa24b1d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/568e3ad9aa24b1d/request.json b/test-snapshots/query/568e3ad9aa24b1d/request.json new file mode 100644 index 0000000..68003c9 --- /dev/null +++ b/test-snapshots/query/568e3ad9aa24b1d/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/568e8427cb987a54/expected.json b/test-snapshots/query/568e8427cb987a54/expected.json new file mode 100644 index 0000000..2099f20 --- /dev/null +++ b/test-snapshots/query/568e8427cb987a54/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 11170334, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 343719, + "Name_5540": "For Those About To Rock (We Salute You)", + "TrackId_8769": 1, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 11170334, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 343719, + "Name_5540": "For Those About To Rock (We Salute You)", + "TrackId_8769": 1, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 17, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 11170334, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 343719, + "Name_5540": "For Those About To Rock (We Salute You)", + "TrackId_8769": 1, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6566314, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 199836, + "Name_5540": "C.O.D.", + "TrackId_8769": 11, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6566314, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 199836, + "Name_5540": "C.O.D.", + "TrackId_8769": 11, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6599424, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 203102, + "Name_5540": "Snowballed", + "TrackId_8769": 9, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6599424, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 203102, + "Name_5540": "Snowballed", + "TrackId_8769": 9, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6706347, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 205688, + "Name_5540": "Night Of The Long Knives", + "TrackId_8769": 13, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6706347, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 205688, + "Name_5540": "Night Of The Long Knives", + "TrackId_8769": 13, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_3435": 1, + "Bytes_6417": 6713451, + "Composer_9892": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4272": 1, + "MediaTypeId_7319": 1, + "Milliseconds_6849": 205662, + "Name_5540": "Put The Finger On You", + "TrackId_8769": 6, + "UnitPrice_0168": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/568e8427cb987a54/request.json b/test-snapshots/query/568e8427cb987a54/request.json new file mode 100644 index 0000000..1fab869 --- /dev/null +++ b/test-snapshots/query/568e8427cb987a54/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_3435": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6417": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_9892": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_4272": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_7319": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_6849": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_5540": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_8769": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_0168": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/569e7ce582c06d9e/expected.json b/test-snapshots/query/569e7ce582c06d9e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/569e7ce582c06d9e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/569e7ce582c06d9e/request.json b/test-snapshots/query/569e7ce582c06d9e/request.json new file mode 100644 index 0000000..736911e --- /dev/null +++ b/test-snapshots/query/569e7ce582c06d9e/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Apple Inc." + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "hleacock@gmail.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "85719" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/56abec8d47013876/expected.json b/test-snapshots/query/56abec8d47013876/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56abec8d47013876/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56abec8d47013876/request.json b/test-snapshots/query/56abec8d47013876/request.json new file mode 100644 index 0000000..1cf0b5a --- /dev/null +++ b/test-snapshots/query/56abec8d47013876/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56d609808787fbc/expected.json b/test-snapshots/query/56d609808787fbc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56d609808787fbc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56d609808787fbc/request.json b/test-snapshots/query/56d609808787fbc/request.json new file mode 100644 index 0000000..b1348d6 --- /dev/null +++ b/test-snapshots/query/56d609808787fbc/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56de0e310b42f58/expected.json b/test-snapshots/query/56de0e310b42f58/expected.json new file mode 100644 index 0000000..5add894 --- /dev/null +++ b/test-snapshots/query/56de0e310b42f58/expected.json @@ -0,0 +1,8 @@ +[ + { + "aggregates": { + "MediaTypeId_min_6738": 1, + "Name_max_5472": "Purchased AAC audio file" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/56de0e310b42f58/request.json b/test-snapshots/query/56de0e310b42f58/request.json new file mode 100644 index 0000000..637e2c3 --- /dev/null +++ b/test-snapshots/query/56de0e310b42f58/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "Name_max_5472": { + "type": "single_column", + "column": "Name", + "function": "max" + }, + "MediaTypeId_min_6738": { + "type": "single_column", + "column": "MediaTypeId", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/56e5feee3c6e7f35/expected.json b/test-snapshots/query/56e5feee3c6e7f35/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/56e5feee3c6e7f35/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56e5feee3c6e7f35/request.json b/test-snapshots/query/56e5feee3c6e7f35/request.json new file mode 100644 index 0000000..614895d --- /dev/null +++ b/test-snapshots/query/56e5feee3c6e7f35/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/56e98f14a45369b4/expected.json b/test-snapshots/query/56e98f14a45369b4/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/56e98f14a45369b4/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/56e98f14a45369b4/request.json b/test-snapshots/query/56e98f14a45369b4/request.json new file mode 100644 index 0000000..ea9c10e --- /dev/null +++ b/test-snapshots/query/56e98f14a45369b4/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5707c834d2de5168/expected.json b/test-snapshots/query/5707c834d2de5168/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5707c834d2de5168/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5707c834d2de5168/request.json b/test-snapshots/query/5707c834d2de5168/request.json new file mode 100644 index 0000000..819d61b --- /dev/null +++ b/test-snapshots/query/5707c834d2de5168/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-03-04" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/570c0a4155608866/expected.json b/test-snapshots/query/570c0a4155608866/expected.json new file mode 100644 index 0000000..c8e66b3 --- /dev/null +++ b/test-snapshots/query/570c0a4155608866/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_4260": 18, + "TrackId_9250": 597 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 3290 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 2096 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 2095 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 2094 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 1984 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 1945 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 1942 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 1880 + }, + { + "PlaylistId_4260": 17, + "TrackId_9250": 1876 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/570c0a4155608866/request.json b/test-snapshots/query/570c0a4155608866/request.json new file mode 100644 index 0000000..90b27a6 --- /dev/null +++ b/test-snapshots/query/570c0a4155608866/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_4260": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_9250": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5739379a1cd0c072/expected.json b/test-snapshots/query/5739379a1cd0c072/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/5739379a1cd0c072/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5739379a1cd0c072/request.json b/test-snapshots/query/5739379a1cd0c072/request.json new file mode 100644 index 0000000..25752ba --- /dev/null +++ b/test-snapshots/query/5739379a1cd0c072/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/573ccadb46c2962d/expected.json b/test-snapshots/query/573ccadb46c2962d/expected.json new file mode 100644 index 0000000..e8ab346 --- /dev/null +++ b/test-snapshots/query/573ccadb46c2962d/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/573ccadb46c2962d/request.json b/test-snapshots/query/573ccadb46c2962d/request.json new file mode 100644 index 0000000..cc40c30 --- /dev/null +++ b/test-snapshots/query/573ccadb46c2962d/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Steve" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Johnson" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/57636490626d9213/expected.json b/test-snapshots/query/57636490626d9213/expected.json new file mode 100644 index 0000000..32ad556 --- /dev/null +++ b/test-snapshots/query/57636490626d9213/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "AlbumId_7818": 227, + "MediaTypeId_4671": 3, + "Name_9324": "Occupation / Precipice", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 229, + "MediaTypeId_4671": 3, + "Name_9324": "Through a Looking Glass", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Greetings from Earth, Pt. 1", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "The Man With Nine Lives", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Battlestar Galactica, Pt. 2", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Battlestar Galactica, Pt. 1", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Murder On the Rising Star", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Battlestar Galactica, Pt. 3", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Take the Celestra", + "UnitPrice_4564": 1.99 + }, + { + "AlbumId_7818": 253, + "MediaTypeId_4671": 3, + "Name_9324": "Fire In Space", + "UnitPrice_4564": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/57636490626d9213/request.json b/test-snapshots/query/57636490626d9213/request.json new file mode 100644 index 0000000..ed07be0 --- /dev/null +++ b/test-snapshots/query/57636490626d9213/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_7818": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "UnitPrice_4564": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Name_9324": { + "type": "column", + "column": "Name", + "fields": null + }, + "MediaTypeId_4671": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/57669a7f954964ac/expected.json b/test-snapshots/query/57669a7f954964ac/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/57669a7f954964ac/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/57669a7f954964ac/request.json b/test-snapshots/query/57669a7f954964ac/request.json new file mode 100644 index 0000000..429d1ea --- /dev/null +++ b/test-snapshots/query/57669a7f954964ac/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/577a79f174271b93/expected.json b/test-snapshots/query/577a79f174271b93/expected.json new file mode 100644 index 0000000..2ad7ff8 --- /dev/null +++ b/test-snapshots/query/577a79f174271b93/expected.json @@ -0,0 +1,14 @@ +[ + { + "aggregates": { + "Composer_min_3727": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "MediaTypeId_count_1767": 3503, + "MediaTypeId_min_8029": 1, + "Milliseconds_max_8548": 5286953, + "Milliseconds_median_9048": 255634, + "Milliseconds_sum_7643": 1378778040, + "UnitPrice_avg_7986": 1.050805024, + "UnitPrice_min_4100": 0.99 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/577a79f174271b93/request.json b/test-snapshots/query/577a79f174271b93/request.json new file mode 100644 index 0000000..ce44a2d --- /dev/null +++ b/test-snapshots/query/577a79f174271b93/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Track", + "query": { + "aggregates": { + "Composer_min_3727": { + "type": "single_column", + "column": "Composer", + "function": "min" + }, + "UnitPrice_avg_7986": { + "type": "single_column", + "column": "UnitPrice", + "function": "avg" + }, + "UnitPrice_min_4100": { + "type": "single_column", + "column": "UnitPrice", + "function": "min" + }, + "Milliseconds_median_9048": { + "type": "single_column", + "column": "Milliseconds", + "function": "median" + }, + "Milliseconds_max_8548": { + "type": "single_column", + "column": "Milliseconds", + "function": "max" + }, + "MediaTypeId_min_8029": { + "type": "single_column", + "column": "MediaTypeId", + "function": "min" + }, + "Milliseconds_sum_7643": { + "type": "single_column", + "column": "Milliseconds", + "function": "sum" + }, + "MediaTypeId_count_1767": { + "type": "single_column", + "column": "MediaTypeId", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5797517f4c42aa6f/expected.json b/test-snapshots/query/5797517f4c42aa6f/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/5797517f4c42aa6f/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5797517f4c42aa6f/request.json b/test-snapshots/query/5797517f4c42aa6f/request.json new file mode 100644 index 0000000..a6e3e6c --- /dev/null +++ b/test-snapshots/query/5797517f4c42aa6f/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-10-22" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/57e5f034fbdb7530/expected.json b/test-snapshots/query/57e5f034fbdb7530/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/57e5f034fbdb7530/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/57e5f034fbdb7530/request.json b/test-snapshots/query/57e5f034fbdb7530/request.json new file mode 100644 index 0000000..bc3a3cf --- /dev/null +++ b/test-snapshots/query/57e5f034fbdb7530/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/57f54c50614d19de/expected.json b/test-snapshots/query/57f54c50614d19de/expected.json new file mode 100644 index 0000000..39f7d52 --- /dev/null +++ b/test-snapshots/query/57f54c50614d19de/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "PlaylistId_median_6115": 5, + "TrackId_avg_6516": 1767.081698221, + "TrackId_count_5628": 8715, + "TrackId_median_1370": 1773, + "TrackId_min_2239": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/57f54c50614d19de/request.json b/test-snapshots/query/57f54c50614d19de/request.json new file mode 100644 index 0000000..8721996 --- /dev/null +++ b/test-snapshots/query/57f54c50614d19de/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "TrackId_min_2239": { + "type": "single_column", + "column": "TrackId", + "function": "min" + }, + "TrackId_avg_6516": { + "type": "single_column", + "column": "TrackId", + "function": "avg" + }, + "PlaylistId_median_6115": { + "type": "single_column", + "column": "PlaylistId", + "function": "median" + }, + "TrackId_median_1370": { + "type": "single_column", + "column": "TrackId", + "function": "median" + }, + "TrackId_count_5628": { + "type": "single_column", + "column": "TrackId", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/57f92259b1869663/expected.json b/test-snapshots/query/57f92259b1869663/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/57f92259b1869663/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/57f92259b1869663/request.json b/test-snapshots/query/57f92259b1869663/request.json new file mode 100644 index 0000000..0528b6d --- /dev/null +++ b/test-snapshots/query/57f92259b1869663/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "QC" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 54 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/588402d97afd0c1f/expected.json b/test-snapshots/query/588402d97afd0c1f/expected.json new file mode 100644 index 0000000..a7feb31 --- /dev/null +++ b/test-snapshots/query/588402d97afd0c1f/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 9 + }, + { + "PlaylistId": 8, + "TrackId": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/588402d97afd0c1f/request.json b/test-snapshots/query/588402d97afd0c1f/request.json new file mode 100644 index 0000000..ff18429 --- /dev/null +++ b/test-snapshots/query/588402d97afd0c1f/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 203102 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/58b87467732abced/expected.json b/test-snapshots/query/58b87467732abced/expected.json new file mode 100644 index 0000000..1d7f281 --- /dev/null +++ b/test-snapshots/query/58b87467732abced/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_9598": "7727B 41 Ave", + "BirthDate_9482": "1965-03-03", + "City_5103": "Calgary", + "Country_0646": "Canada", + "Email_2683": "steve@chinookcorp.com", + "Fax_3322": "1 (780) 836-9543", + "FirstName_5592": "Steve", + "HireDate_2940": "2003-10-17", + "Phone_5196": "1 (780) 836-9987", + "PostalCode_5853": "T3B 1Y7", + "ReportsTo_3663": 2, + "State_7755": "AB", + "Title_9861": "Sales Support Agent" + }, + { + "Address_9598": "590 Columbia Boulevard West", + "BirthDate_9482": "1970-05-29", + "City_5103": "Lethbridge", + "Country_0646": "Canada", + "Email_2683": "robert@chinookcorp.com", + "Fax_3322": "+1 (403) 456-8485", + "FirstName_5592": "Robert", + "HireDate_2940": "2004-01-02", + "Phone_5196": "+1 (403) 456-9986", + "PostalCode_5853": "T1K 5N8", + "ReportsTo_3663": 6, + "State_7755": "AB", + "Title_9861": "IT Staff" + }, + { + "Address_9598": "825 8 Ave SW", + "BirthDate_9482": "1958-12-08", + "City_5103": "Calgary", + "Country_0646": "Canada", + "Email_2683": "nancy@chinookcorp.com", + "Fax_3322": "+1 (403) 262-3322", + "FirstName_5592": "Nancy", + "HireDate_2940": "2002-05-01", + "Phone_5196": "+1 (403) 262-3443", + "PostalCode_5853": "T2P 2T3", + "ReportsTo_3663": 1, + "State_7755": "AB", + "Title_9861": "Sales Manager" + }, + { + "Address_9598": "5827 Bowness Road NW", + "BirthDate_9482": "1973-07-01", + "City_5103": "Calgary", + "Country_0646": "Canada", + "Email_2683": "michael@chinookcorp.com", + "Fax_3322": "+1 (403) 246-9899", + "FirstName_5592": "Michael", + "HireDate_2940": "2003-10-17", + "Phone_5196": "+1 (403) 246-9887", + "PostalCode_5853": "T3B 0C5", + "ReportsTo_3663": 1, + "State_7755": "AB", + "Title_9861": "IT Manager" + }, + { + "Address_9598": "683 10 Street SW", + "BirthDate_9482": "1947-09-19", + "City_5103": "Calgary", + "Country_0646": "Canada", + "Email_2683": "margaret@chinookcorp.com", + "Fax_3322": "+1 (403) 263-4289", + "FirstName_5592": "Margaret", + "HireDate_2940": "2003-05-03", + "Phone_5196": "+1 (403) 263-4423", + "PostalCode_5853": "T2P 5G3", + "ReportsTo_3663": 2, + "State_7755": "AB", + "Title_9861": "Sales Support Agent" + }, + { + "Address_9598": "923 7 ST NW", + "BirthDate_9482": "1968-01-09", + "City_5103": "Lethbridge", + "Country_0646": "Canada", + "Email_2683": "laura@chinookcorp.com", + "Fax_3322": "+1 (403) 467-8772", + "FirstName_5592": "Laura", + "HireDate_2940": "2004-03-04", + "Phone_5196": "+1 (403) 467-3351", + "PostalCode_5853": "T1H 1Y8", + "ReportsTo_3663": 6, + "State_7755": "AB", + "Title_9861": "IT Staff" + }, + { + "Address_9598": "1111 6 Ave SW", + "BirthDate_9482": "1973-08-29", + "City_5103": "Calgary", + "Country_0646": "Canada", + "Email_2683": "jane@chinookcorp.com", + "Fax_3322": "+1 (403) 262-6712", + "FirstName_5592": "Jane", + "HireDate_2940": "2002-04-01", + "Phone_5196": "+1 (403) 262-3443", + "PostalCode_5853": "T2P 5M5", + "ReportsTo_3663": 2, + "State_7755": "AB", + "Title_9861": "Sales Support Agent" + }, + { + "Address_9598": "11120 Jasper Ave NW", + "BirthDate_9482": "1962-02-18", + "City_5103": "Edmonton", + "Country_0646": "Canada", + "Email_2683": "andrew@chinookcorp.com", + "Fax_3322": "+1 (780) 428-3457", + "FirstName_5592": "Andrew", + "HireDate_2940": "2002-08-14", + "Phone_5196": "+1 (780) 428-9482", + "PostalCode_5853": "T5K 2N1", + "ReportsTo_3663": null, + "State_7755": "AB", + "Title_9861": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/58b87467732abced/request.json b/test-snapshots/query/58b87467732abced/request.json new file mode 100644 index 0000000..3a78228 --- /dev/null +++ b/test-snapshots/query/58b87467732abced/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_9598": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_9482": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_5103": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_0646": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_2683": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_7755": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_3322": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_5592": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_2940": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Title_9861": { + "type": "column", + "column": "Title", + "fields": null + }, + "Phone_5196": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_5853": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_3663": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/58ba235948ad9602/expected.json b/test-snapshots/query/58ba235948ad9602/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/58ba235948ad9602/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/58ba235948ad9602/request.json b/test-snapshots/query/58ba235948ad9602/request.json new file mode 100644 index 0000000..055e1d9 --- /dev/null +++ b/test-snapshots/query/58ba235948ad9602/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5916f75707bfd27c/expected.json b/test-snapshots/query/5916f75707bfd27c/expected.json new file mode 100644 index 0000000..cd55ec9 --- /dev/null +++ b/test-snapshots/query/5916f75707bfd27c/expected.json @@ -0,0 +1,176 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5916f75707bfd27c/request.json b/test-snapshots/query/5916f75707bfd27c/request.json new file mode 100644 index 0000000..92f3ee7 --- /dev/null +++ b/test-snapshots/query/5916f75707bfd27c/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5933a55637461dcf/expected.json b/test-snapshots/query/5933a55637461dcf/expected.json new file mode 100644 index 0000000..e8ab346 --- /dev/null +++ b/test-snapshots/query/5933a55637461dcf/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5933a55637461dcf/request.json b/test-snapshots/query/5933a55637461dcf/request.json new file mode 100644 index 0000000..43a021e --- /dev/null +++ b/test-snapshots/query/5933a55637461dcf/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1965-03-03" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5938ff488f3833ce/expected.json b/test-snapshots/query/5938ff488f3833ce/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5938ff488f3833ce/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5938ff488f3833ce/request.json b/test-snapshots/query/5938ff488f3833ce/request.json new file mode 100644 index 0000000..91aeab0 --- /dev/null +++ b/test-snapshots/query/5938ff488f3833ce/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "jane@chinookcorp.com" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Peacock" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/594392757ca44722/expected.json b/test-snapshots/query/594392757ca44722/expected.json new file mode 100644 index 0000000..073328e --- /dev/null +++ b/test-snapshots/query/594392757ca44722/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_5494": 1, + "TrackId_3790": 1 + }, + { + "PlaylistId_5494": 17, + "TrackId_3790": 1 + }, + { + "PlaylistId_5494": 8, + "TrackId_3790": 1 + }, + { + "PlaylistId_5494": 1, + "TrackId_3790": 2 + }, + { + "PlaylistId_5494": 17, + "TrackId_3790": 2 + }, + { + "PlaylistId_5494": 8, + "TrackId_3790": 2 + }, + { + "PlaylistId_5494": 1, + "TrackId_3790": 3 + }, + { + "PlaylistId_5494": 17, + "TrackId_3790": 3 + }, + { + "PlaylistId_5494": 5, + "TrackId_3790": 3 + }, + { + "PlaylistId_5494": 8, + "TrackId_3790": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/594392757ca44722/request.json b/test-snapshots/query/594392757ca44722/request.json new file mode 100644 index 0000000..3a17d37 --- /dev/null +++ b/test-snapshots/query/594392757ca44722/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_5494": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_3790": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/59578de95c50bf58/expected.json b/test-snapshots/query/59578de95c50bf58/expected.json new file mode 100644 index 0000000..24bb75a --- /dev/null +++ b/test-snapshots/query/59578de95c50bf58/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 16, + "TrackId": 2003 + }, + { + "PlaylistId": 16, + "TrackId": 2004 + }, + { + "PlaylistId": 16, + "TrackId": 2005 + }, + { + "PlaylistId": 16, + "TrackId": 2007 + }, + { + "PlaylistId": 16, + "TrackId": 2010 + }, + { + "PlaylistId": 16, + "TrackId": 2013 + }, + { + "PlaylistId": 16, + "TrackId": 2194 + }, + { + "PlaylistId": 16, + "TrackId": 2195 + }, + { + "PlaylistId": 16, + "TrackId": 2198 + }, + { + "PlaylistId": 16, + "TrackId": 2206 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/59578de95c50bf58/request.json b/test-snapshots/query/59578de95c50bf58/request.json new file mode 100644 index 0000000..1c0da8f --- /dev/null +++ b/test-snapshots/query/59578de95c50bf58/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/596cbe818d23373e/expected.json b/test-snapshots/query/596cbe818d23373e/expected.json new file mode 100644 index 0000000..19421a0 --- /dev/null +++ b/test-snapshots/query/596cbe818d23373e/expected.json @@ -0,0 +1,18 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/596cbe818d23373e/request.json b/test-snapshots/query/596cbe818d23373e/request.json new file mode 100644 index 0000000..11e4c81 --- /dev/null +++ b/test-snapshots/query/596cbe818d23373e/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/59aa9812d84442d/expected.json b/test-snapshots/query/59aa9812d84442d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/59aa9812d84442d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/59aa9812d84442d/request.json b/test-snapshots/query/59aa9812d84442d/request.json new file mode 100644 index 0000000..124fe6a --- /dev/null +++ b/test-snapshots/query/59aa9812d84442d/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5.94 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/59b052e1da689471/expected.json b/test-snapshots/query/59b052e1da689471/expected.json new file mode 100644 index 0000000..d9464d7 --- /dev/null +++ b/test-snapshots/query/59b052e1da689471/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_9109": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } + }, + { + "AlbumId_9109": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 8, + "Name": "Audioslave" + } + ] + } + }, + { + "AlbumId_9109": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + }, + { + "AlbumId_9109": 107, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/59b052e1da689471/request.json b/test-snapshots/query/59b052e1da689471/request.json new file mode 100644 index 0000000..4437f4d --- /dev/null +++ b/test-snapshots/query/59b052e1da689471/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_9109": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/59ed436b00a01f3c/expected.json b/test-snapshots/query/59ed436b00a01f3c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/59ed436b00a01f3c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/59ed436b00a01f3c/request.json b/test-snapshots/query/59ed436b00a01f3c/request.json new file mode 100644 index 0000000..80a90c2 --- /dev/null +++ b/test-snapshots/query/59ed436b00a01f3c/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/59f087b95414b2cf/expected.json b/test-snapshots/query/59f087b95414b2cf/expected.json new file mode 100644 index 0000000..3b8d4e5 --- /dev/null +++ b/test-snapshots/query/59f087b95414b2cf/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 13, + "ArtistId": 10, + "Title": "The Best Of Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/59f087b95414b2cf/request.json b/test-snapshots/query/59f087b95414b2cf/request.json new file mode 100644 index 0000000..02158c5 --- /dev/null +++ b/test-snapshots/query/59f087b95414b2cf/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5a0916d15fe27a2f/expected.json b/test-snapshots/query/5a0916d15fe27a2f/expected.json new file mode 100644 index 0000000..b02a597 --- /dev/null +++ b/test-snapshots/query/5a0916d15fe27a2f/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 25 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/5a0916d15fe27a2f/request.json b/test-snapshots/query/5a0916d15fe27a2f/request.json new file mode 100644 index 0000000..f41c6d0 --- /dev/null +++ b/test-snapshots/query/5a0916d15fe27a2f/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Genre", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5a0af2c7c18b969d/expected.json b/test-snapshots/query/5a0af2c7c18b969d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5a0af2c7c18b969d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5a0af2c7c18b969d/request.json b/test-snapshots/query/5a0af2c7c18b969d/request.json new file mode 100644 index 0000000..17a409a --- /dev/null +++ b/test-snapshots/query/5a0af2c7c18b969d/request.json @@ -0,0 +1,127 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5a1f7f657ecebbbd/expected.json b/test-snapshots/query/5a1f7f657ecebbbd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5a1f7f657ecebbbd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5a1f7f657ecebbbd/request.json b/test-snapshots/query/5a1f7f657ecebbbd/request.json new file mode 100644 index 0000000..2c4d9da --- /dev/null +++ b/test-snapshots/query/5a1f7f657ecebbbd/request.json @@ -0,0 +1,91 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "C.O.D." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5a50d5ab86cd94c3/expected.json b/test-snapshots/query/5a50d5ab86cd94c3/expected.json new file mode 100644 index 0000000..2838b9e --- /dev/null +++ b/test-snapshots/query/5a50d5ab86cd94c3/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9071997, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 271908, + "Name": "On The Mend", + "TrackId": 1005, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5a50d5ab86cd94c3/request.json b/test-snapshots/query/5a50d5ab86cd94c3/request.json new file mode 100644 index 0000000..983f6d9 --- /dev/null +++ b/test-snapshots/query/5a50d5ab86cd94c3/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1005 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5a73dc9fba39b778/expected.json b/test-snapshots/query/5a73dc9fba39b778/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/5a73dc9fba39b778/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5a73dc9fba39b778/request.json b/test-snapshots/query/5a73dc9fba39b778/request.json new file mode 100644 index 0000000..e0698e4 --- /dev/null +++ b/test-snapshots/query/5a73dc9fba39b778/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5afe21bdf0329457/expected.json b/test-snapshots/query/5afe21bdf0329457/expected.json new file mode 100644 index 0000000..427d288 --- /dev/null +++ b/test-snapshots/query/5afe21bdf0329457/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 146, + "ArtistId": 104, + "Title": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5afe21bdf0329457/request.json b/test-snapshots/query/5afe21bdf0329457/request.json new file mode 100644 index 0000000..86986cd --- /dev/null +++ b/test-snapshots/query/5afe21bdf0329457/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5b00564d446a104a/expected.json b/test-snapshots/query/5b00564d446a104a/expected.json new file mode 100644 index 0000000..623526b --- /dev/null +++ b/test-snapshots/query/5b00564d446a104a/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "PlaylistId_count_0741": 8715, + "PlaylistId_median_4197": 5, + "PlaylistId_min_5208": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b00564d446a104a/request.json b/test-snapshots/query/5b00564d446a104a/request.json new file mode 100644 index 0000000..37939d0 --- /dev/null +++ b/test-snapshots/query/5b00564d446a104a/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "PlaylistId_count_0741": { + "type": "single_column", + "column": "PlaylistId", + "function": "count" + }, + "PlaylistId_median_4197": { + "type": "single_column", + "column": "PlaylistId", + "function": "median" + }, + "PlaylistId_min_5208": { + "type": "single_column", + "column": "PlaylistId", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5b62d0a56a8a5591/expected.json b/test-snapshots/query/5b62d0a56a8a5591/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/5b62d0a56a8a5591/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b62d0a56a8a5591/request.json b/test-snapshots/query/5b62d0a56a8a5591/request.json new file mode 100644 index 0000000..76aa4c8 --- /dev/null +++ b/test-snapshots/query/5b62d0a56a8a5591/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 248 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5b767bca3898f14a/expected.json b/test-snapshots/query/5b767bca3898f14a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5b767bca3898f14a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b767bca3898f14a/request.json b/test-snapshots/query/5b767bca3898f14a/request.json new file mode 100644 index 0000000..5bae371 --- /dev/null +++ b/test-snapshots/query/5b767bca3898f14a/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5b77a18ea18b83d6/expected.json b/test-snapshots/query/5b77a18ea18b83d6/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/5b77a18ea18b83d6/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b77a18ea18b83d6/request.json b/test-snapshots/query/5b77a18ea18b83d6/request.json new file mode 100644 index 0000000..e3a4561 --- /dev/null +++ b/test-snapshots/query/5b77a18ea18b83d6/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AZ" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5b80079f5a85134/expected.json b/test-snapshots/query/5b80079f5a85134/expected.json new file mode 100644 index 0000000..cec6901 --- /dev/null +++ b/test-snapshots/query/5b80079f5a85134/expected.json @@ -0,0 +1,70 @@ +[ + { + "rows": [ + { + "City_1033": "Lethbridge", + "Email_0424": "laura@chinookcorp.com", + "FirstName_0651": "Laura", + "HireDate_8024": "2004-03-04", + "Phone_8546": "+1 (403) 467-3351", + "State_2399": "AB" + }, + { + "City_1033": "Lethbridge", + "Email_0424": "robert@chinookcorp.com", + "FirstName_0651": "Robert", + "HireDate_8024": "2004-01-02", + "Phone_8546": "+1 (403) 456-9986", + "State_2399": "AB" + }, + { + "City_1033": "Calgary", + "Email_0424": "jane@chinookcorp.com", + "FirstName_0651": "Jane", + "HireDate_8024": "2002-04-01", + "Phone_8546": "+1 (403) 262-3443", + "State_2399": "AB" + }, + { + "City_1033": "Calgary", + "Email_0424": "margaret@chinookcorp.com", + "FirstName_0651": "Margaret", + "HireDate_8024": "2003-05-03", + "Phone_8546": "+1 (403) 263-4423", + "State_2399": "AB" + }, + { + "City_1033": "Calgary", + "Email_0424": "steve@chinookcorp.com", + "FirstName_0651": "Steve", + "HireDate_8024": "2003-10-17", + "Phone_8546": "1 (780) 836-9987", + "State_2399": "AB" + }, + { + "City_1033": "Calgary", + "Email_0424": "michael@chinookcorp.com", + "FirstName_0651": "Michael", + "HireDate_8024": "2003-10-17", + "Phone_8546": "+1 (403) 246-9887", + "State_2399": "AB" + }, + { + "City_1033": "Calgary", + "Email_0424": "nancy@chinookcorp.com", + "FirstName_0651": "Nancy", + "HireDate_8024": "2002-05-01", + "Phone_8546": "+1 (403) 262-3443", + "State_2399": "AB" + }, + { + "City_1033": "Edmonton", + "Email_0424": "andrew@chinookcorp.com", + "FirstName_0651": "Andrew", + "HireDate_8024": "2002-08-14", + "Phone_8546": "+1 (780) 428-9482", + "State_2399": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b80079f5a85134/request.json b/test-snapshots/query/5b80079f5a85134/request.json new file mode 100644 index 0000000..4e7b678 --- /dev/null +++ b/test-snapshots/query/5b80079f5a85134/request.json @@ -0,0 +1,52 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "FirstName_0651": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Phone_8546": { + "type": "column", + "column": "Phone", + "fields": null + }, + "City_1033": { + "type": "column", + "column": "City", + "fields": null + }, + "HireDate_8024": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Email_0424": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_2399": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5b82c36312230b8d/expected.json b/test-snapshots/query/5b82c36312230b8d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5b82c36312230b8d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b82c36312230b8d/request.json b/test-snapshots/query/5b82c36312230b8d/request.json new file mode 100644 index 0000000..4663ab0 --- /dev/null +++ b/test-snapshots/query/5b82c36312230b8d/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Bossa Nova" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5b84dc885de3619/expected.json b/test-snapshots/query/5b84dc885de3619/expected.json new file mode 100644 index 0000000..103b723 --- /dev/null +++ b/test-snapshots/query/5b84dc885de3619/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_1118": 1, + "ArtistId_4421": 1, + "Title_9550": "For Those About To Rock We Salute You" + }, + { + "AlbumId_1118": 2, + "ArtistId_4421": 2, + "Title_9550": "Balls to the Wall" + }, + { + "AlbumId_1118": 3, + "ArtistId_4421": 2, + "Title_9550": "Restless and Wild" + }, + { + "AlbumId_1118": 4, + "ArtistId_4421": 1, + "Title_9550": "Let There Be Rock" + }, + { + "AlbumId_1118": 5, + "ArtistId_4421": 3, + "Title_9550": "Big Ones" + }, + { + "AlbumId_1118": 6, + "ArtistId_4421": 4, + "Title_9550": "Jagged Little Pill" + }, + { + "AlbumId_1118": 7, + "ArtistId_4421": 5, + "Title_9550": "Facelift" + }, + { + "AlbumId_1118": 8, + "ArtistId_4421": 6, + "Title_9550": "Warner 25 Anos" + }, + { + "AlbumId_1118": 9, + "ArtistId_4421": 7, + "Title_9550": "Plays Metallica By Four Cellos" + }, + { + "AlbumId_1118": 10, + "ArtistId_4421": 8, + "Title_9550": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5b84dc885de3619/request.json b/test-snapshots/query/5b84dc885de3619/request.json new file mode 100644 index 0000000..194204c --- /dev/null +++ b/test-snapshots/query/5b84dc885de3619/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_1118": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_4421": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_9550": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5bb13e25dba8fc86/expected.json b/test-snapshots/query/5bb13e25dba8fc86/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5bb13e25dba8fc86/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5bb13e25dba8fc86/request.json b/test-snapshots/query/5bb13e25dba8fc86/request.json new file mode 100644 index 0000000..d035c63 --- /dev/null +++ b/test-snapshots/query/5bb13e25dba8fc86/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5bb5e2e7a0ebf534/expected.json b/test-snapshots/query/5bb5e2e7a0ebf534/expected.json new file mode 100644 index 0000000..23d44d5 --- /dev/null +++ b/test-snapshots/query/5bb5e2e7a0ebf534/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_4951": 18, + "TrackId_5890": 597 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 1 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 2 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 3 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 4 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 5 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 152 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 160 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 1278 + }, + { + "PlaylistId_4951": 17, + "TrackId_5890": 1283 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5bb5e2e7a0ebf534/request.json b/test-snapshots/query/5bb5e2e7a0ebf534/request.json new file mode 100644 index 0000000..a26b4d7 --- /dev/null +++ b/test-snapshots/query/5bb5e2e7a0ebf534/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_4951": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_5890": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5bbaf147a2bc894a/expected.json b/test-snapshots/query/5bbaf147a2bc894a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5bbaf147a2bc894a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5bbaf147a2bc894a/request.json b/test-snapshots/query/5bbaf147a2bc894a/request.json new file mode 100644 index 0000000..0a196af --- /dev/null +++ b/test-snapshots/query/5bbaf147a2bc894a/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-09-08" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5bc3e451f2ca7a8a/expected.json b/test-snapshots/query/5bc3e451f2ca7a8a/expected.json new file mode 100644 index 0000000..ad306e5 --- /dev/null +++ b/test-snapshots/query/5bc3e451f2ca7a8a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_9560": 10 + }, + { + "PlaylistId_9560": 3 + }, + { + "PlaylistId_9560": 18 + }, + { + "PlaylistId_9560": 9 + }, + { + "PlaylistId_9560": 8 + }, + { + "PlaylistId_9560": 1 + }, + { + "PlaylistId_9560": 7 + }, + { + "PlaylistId_9560": 2 + }, + { + "PlaylistId_9560": 17 + }, + { + "PlaylistId_9560": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5bc3e451f2ca7a8a/request.json b/test-snapshots/query/5bc3e451f2ca7a8a/request.json new file mode 100644 index 0000000..776b91b --- /dev/null +++ b/test-snapshots/query/5bc3e451f2ca7a8a/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "PlaylistId_9560": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5bca20ed2d7546a7/expected.json b/test-snapshots/query/5bca20ed2d7546a7/expected.json new file mode 100644 index 0000000..d7ddce6 --- /dev/null +++ b/test-snapshots/query/5bca20ed2d7546a7/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5bca20ed2d7546a7/request.json b/test-snapshots/query/5bca20ed2d7546a7/request.json new file mode 100644 index 0000000..f0d3f94 --- /dev/null +++ b/test-snapshots/query/5bca20ed2d7546a7/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address_2209": { + "type": "column", + "column": "Address", + "fields": null + }, + "PostalCode_3241": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5bfbff3d51fa4770/expected.json b/test-snapshots/query/5bfbff3d51fa4770/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5bfbff3d51fa4770/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5bfbff3d51fa4770/request.json b/test-snapshots/query/5bfbff3d51fa4770/request.json new file mode 100644 index 0000000..69e49dd --- /dev/null +++ b/test-snapshots/query/5bfbff3d51fa4770/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Leacock" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "ftremblay@gmail.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5c1d2661d0ec9c10/expected.json b/test-snapshots/query/5c1d2661d0ec9c10/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5c1d2661d0ec9c10/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5c1d2661d0ec9c10/request.json b/test-snapshots/query/5c1d2661d0ec9c10/request.json new file mode 100644 index 0000000..673a8dd --- /dev/null +++ b/test-snapshots/query/5c1d2661d0ec9c10/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5c4e999a0e5acd54/expected.json b/test-snapshots/query/5c4e999a0e5acd54/expected.json new file mode 100644 index 0000000..0e7d146 --- /dev/null +++ b/test-snapshots/query/5c4e999a0e5acd54/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "PlaylistId_avg_6570": 9.5, + "PlaylistId_count_5908": 18, + "PlaylistId_median_5555": 9.5 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/5c4e999a0e5acd54/request.json b/test-snapshots/query/5c4e999a0e5acd54/request.json new file mode 100644 index 0000000..a83e724 --- /dev/null +++ b/test-snapshots/query/5c4e999a0e5acd54/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Playlist", + "query": { + "aggregates": { + "PlaylistId_count_5908": { + "type": "single_column", + "column": "PlaylistId", + "function": "count" + }, + "PlaylistId_median_5555": { + "type": "single_column", + "column": "PlaylistId", + "function": "median" + }, + "PlaylistId_avg_6570": { + "type": "single_column", + "column": "PlaylistId", + "function": "avg" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5c8b0dee96be321d/expected.json b/test-snapshots/query/5c8b0dee96be321d/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/5c8b0dee96be321d/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5c8b0dee96be321d/request.json b/test-snapshots/query/5c8b0dee96be321d/request.json new file mode 100644 index 0000000..b9ca1c1 --- /dev/null +++ b/test-snapshots/query/5c8b0dee96be321d/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5ca3b8c4fe2e66/expected.json b/test-snapshots/query/5ca3b8c4fe2e66/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5ca3b8c4fe2e66/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5ca3b8c4fe2e66/request.json b/test-snapshots/query/5ca3b8c4fe2e66/request.json new file mode 100644 index 0000000..8c671e6 --- /dev/null +++ b/test-snapshots/query/5ca3b8c4fe2e66/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5cd987443a168748/expected.json b/test-snapshots/query/5cd987443a168748/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/5cd987443a168748/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5cd987443a168748/request.json b/test-snapshots/query/5cd987443a168748/request.json new file mode 100644 index 0000000..ed24bbe --- /dev/null +++ b/test-snapshots/query/5cd987443a168748/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5d1aa46caacc0e5f/expected.json b/test-snapshots/query/5d1aa46caacc0e5f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5d1aa46caacc0e5f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5d1aa46caacc0e5f/request.json b/test-snapshots/query/5d1aa46caacc0e5f/request.json new file mode 100644 index 0000000..b0465bd --- /dev/null +++ b/test-snapshots/query/5d1aa46caacc0e5f/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5d2a13e776d7b45b/expected.json b/test-snapshots/query/5d2a13e776d7b45b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5d2a13e776d7b45b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5d2a13e776d7b45b/request.json b/test-snapshots/query/5d2a13e776d7b45b/request.json new file mode 100644 index 0000000..a974e51 --- /dev/null +++ b/test-snapshots/query/5d2a13e776d7b45b/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T5K 2N1" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5d58b3c361d48f1/expected.json b/test-snapshots/query/5d58b3c361d48f1/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/5d58b3c361d48f1/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5d58b3c361d48f1/request.json b/test-snapshots/query/5d58b3c361d48f1/request.json new file mode 100644 index 0000000..5b9bc7d --- /dev/null +++ b/test-snapshots/query/5d58b3c361d48f1/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5d5ce0cb3b3fa148/expected.json b/test-snapshots/query/5d5ce0cb3b3fa148/expected.json new file mode 100644 index 0000000..fbbbffb --- /dev/null +++ b/test-snapshots/query/5d5ce0cb3b3fa148/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_7484": 1, + "Name_1696": "Rock" + }, + { + "GenreId_7484": 2, + "Name_1696": "Jazz" + }, + { + "GenreId_7484": 3, + "Name_1696": "Metal" + }, + { + "GenreId_7484": 4, + "Name_1696": "Alternative & Punk" + }, + { + "GenreId_7484": 5, + "Name_1696": "Rock And Roll" + }, + { + "GenreId_7484": 6, + "Name_1696": "Blues" + }, + { + "GenreId_7484": 7, + "Name_1696": "Latin" + }, + { + "GenreId_7484": 8, + "Name_1696": "Reggae" + }, + { + "GenreId_7484": 9, + "Name_1696": "Pop" + }, + { + "GenreId_7484": 10, + "Name_1696": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5d5ce0cb3b3fa148/request.json b/test-snapshots/query/5d5ce0cb3b3fa148/request.json new file mode 100644 index 0000000..c74253e --- /dev/null +++ b/test-snapshots/query/5d5ce0cb3b3fa148/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_7484": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_1696": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5d6f5b6f6ad95a52/expected.json b/test-snapshots/query/5d6f5b6f6ad95a52/expected.json new file mode 100644 index 0000000..62d5b9b --- /dev/null +++ b/test-snapshots/query/5d6f5b6f6ad95a52/expected.json @@ -0,0 +1,469 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_4737": "1 Infinite Loop", + "City_0646": "Cupertino", + "FirstName_1479": "Tim", + "LastName_8578": "Goyer", + "Phone_2300": "+1 (408) 996-1010", + "PostalCode_6064": "95014", + "State_8359": "CA", + "SupportRepId_9136": 3 + }, + { + "Address_4737": "113 Lupus St", + "City_0646": "London", + "FirstName_1479": "Phil", + "LastName_8578": "Hughes", + "Phone_2300": "+44 020 7976 5722", + "PostalCode_6064": "SW1V 3EN", + "State_8359": null, + "SupportRepId_9136": 3 + }, + { + "Address_4737": "12,Community Centre", + "City_0646": "Delhi", + "FirstName_1479": "Manoj", + "LastName_8578": "Pareek", + "Phone_2300": "+91 0124 39883988", + "PostalCode_6064": "110017", + "State_8359": null, + "SupportRepId_9136": 3 + }, + { + "Address_4737": "1498 rue Bélanger", + "City_0646": "Montréal", + "FirstName_1479": "François", + "LastName_8578": "Tremblay", + "Phone_2300": "+1 (514) 721-4711", + "PostalCode_6064": "H2G 1A7", + "State_8359": "QC", + "SupportRepId_9136": 3 + }, + { + "Address_4737": "162 E Superior Street", + "City_0646": "Chicago", + "FirstName_1479": "Frank", + "LastName_8578": "Ralston", + "Phone_2300": "+1 (312) 332-3232", + "PostalCode_6064": "60611", + "State_8359": "IL", + "SupportRepId_9136": 3 + }, + { + "Address_4737": "202 Hoxton Street", + "City_0646": "London", + "FirstName_1479": "Emma", + "LastName_8578": "Jones", + "Phone_2300": "+44 020 7707 0707", + "PostalCode_6064": "N1 5LH", + "State_8359": null, + "SupportRepId_9136": 3 + }, + { + "Address_4737": "230 Elgin Street", + "City_0646": "Ottawa", + "FirstName_1479": "Edward", + "LastName_8578": "Francis", + "Phone_2300": "+1 (613) 234-3322", + "PostalCode_6064": "K2P 1L7", + "State_8359": "ON", + "SupportRepId_9136": 3 + }, + { + "Address_4737": "3 Chatham Street", + "City_0646": "Dublin", + "FirstName_1479": "Hugh", + "LastName_8578": "O'Reilly", + "Phone_2300": "+353 01 6792424", + "PostalCode_6064": null, + "State_8359": "Dublin", + "SupportRepId_9136": 3 + }, + { + "Address_4737": "3,Raj Bhavan Road", + "City_0646": "Bangalore", + "FirstName_1479": "Puja", + "LastName_8578": "Srivastava", + "Phone_2300": "+91 080 22289999", + "PostalCode_6064": "560001", + "State_8359": null, + "SupportRepId_9136": 3 + }, + { + "Address_4737": "5112 48 Street", + "City_0646": "Yellowknife", + "FirstName_1479": "Ellie", + "LastName_8578": "Sullivan", + "Phone_2300": "+1 (867) 920-2233", + "PostalCode_6064": "X1A 1N6", + "State_8359": "NT", + "SupportRepId_9136": 3 + } + ] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_4737": "1033 N Park Ave", + "City_0646": "Tucson", + "FirstName_1479": "Patrick", + "LastName_8578": "Gray", + "Phone_2300": "+1 (520) 622-4200", + "PostalCode_6064": "85719", + "State_8359": "AZ", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "120 S Orange Ave", + "City_0646": "Orlando", + "FirstName_1479": "Heather", + "LastName_8578": "Leacock", + "Phone_2300": "+1 (407) 999-7788", + "PostalCode_6064": "32801", + "State_8359": "FL", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "1600 Amphitheatre Parkway", + "City_0646": "Mountain View", + "FirstName_1479": "Frank", + "LastName_8578": "Harris", + "Phone_2300": "+1 (650) 253-0000", + "PostalCode_6064": "94043-1351", + "State_8359": "CA", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "2211 W Berry Street", + "City_0646": "Fort Worth", + "FirstName_1479": "Richard", + "LastName_8578": "Cunningham", + "Phone_2300": "+1 (817) 924-7272", + "PostalCode_6064": "76110", + "State_8359": "TX", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "307 Macacha Güemes", + "City_0646": "Buenos Aires", + "FirstName_1479": "Diego", + "LastName_8578": "Gutiérrez", + "Phone_2300": "+54 (0)11 4311 4333", + "PostalCode_6064": "1106", + "State_8359": null, + "SupportRepId_9136": 4 + }, + { + "Address_4737": "4, Rue Milton", + "City_0646": "Paris", + "FirstName_1479": "Camille", + "LastName_8578": "Bernard", + "Phone_2300": "+33 01 49 70 65 65", + "PostalCode_6064": "75009", + "State_8359": null, + "SupportRepId_9136": 4 + }, + { + "Address_4737": "421 Bourke Street", + "City_0646": "Sidney", + "FirstName_1479": "Mark", + "LastName_8578": "Taylor", + "Phone_2300": "+61 (02) 9332 3633", + "PostalCode_6064": "2010", + "State_8359": "NSW", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "541 Del Medio Avenue", + "City_0646": "Mountain View", + "FirstName_1479": "Dan", + "LastName_8578": "Miller", + "Phone_2300": "+1 (650) 644-3358", + "PostalCode_6064": "94040-111", + "State_8359": "CA", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "69 Salem Street", + "City_0646": "Boston", + "FirstName_1479": "John", + "LastName_8578": "Gordon", + "Phone_2300": "+1 (617) 522-1333", + "PostalCode_6064": "2113", + "State_8359": "MA", + "SupportRepId_9136": 4 + }, + { + "Address_4737": "696 Osborne Street", + "City_0646": "Winnipeg", + "FirstName_1479": "Aaron", + "LastName_8578": "Mitchell", + "Phone_2300": "+1 (204) 452-6452", + "PostalCode_6064": "R3L 2B9", + "State_8359": "MB", + "SupportRepId_9136": 4 + } + ] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_4737": "1 Microsoft Way", + "City_0646": "Redmond", + "FirstName_1479": "Jack", + "LastName_8578": "Smith", + "Phone_2300": "+1 (425) 882-8080", + "PostalCode_6064": "98052-8300", + "State_8359": "WA", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "11, Place Bellecour", + "City_0646": "Lyon", + "FirstName_1479": "Marc", + "LastName_8578": "Dubois", + "Phone_2300": "+33 04 78 30 30 30", + "PostalCode_6064": "69002", + "State_8359": null, + "SupportRepId_9136": 5 + }, + { + "Address_4737": "110 Raeburn Pl", + "City_0646": "Edinburgh ", + "FirstName_1479": "Steve", + "LastName_8578": "Murray", + "Phone_2300": "+44 0131 315 3300", + "PostalCode_6064": "EH4 1HH", + "State_8359": null, + "SupportRepId_9136": 5 + }, + { + "Address_4737": "194A Chain Lake Drive", + "City_0646": "Halifax", + "FirstName_1479": "Martha", + "LastName_8578": "Silk", + "Phone_2300": "+1 (902) 450-0450", + "PostalCode_6064": "B3S 1C5", + "State_8359": "NS", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "302 S 700 E", + "City_0646": "Salt Lake City", + "FirstName_1479": "Julia", + "LastName_8578": "Barnett", + "Phone_2300": "+1 (801) 531-7272", + "PostalCode_6064": "84102", + "State_8359": "UT", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "319 N. Frances Street", + "City_0646": "Madison", + "FirstName_1479": "Victor", + "LastName_8578": "Stevens", + "Phone_2300": "+1 (608) 257-0597", + "PostalCode_6064": "53703", + "State_8359": "WI", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "801 W 4th Street", + "City_0646": "Reno", + "FirstName_1479": "Kathy", + "LastName_8578": "Chase", + "Phone_2300": "+1 (775) 223-7665", + "PostalCode_6064": "89503", + "State_8359": "NV", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "8210 111 ST NW", + "City_0646": "Edmonton", + "FirstName_1479": "Mark", + "LastName_8578": "Philips", + "Phone_2300": "+1 (780) 434-4554", + "PostalCode_6064": "T6G 2C7", + "State_8359": "AB", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "Av. Paulista, 2022", + "City_0646": "São Paulo", + "FirstName_1479": "Alexandre", + "LastName_8578": "Rocha", + "Phone_2300": "+55 (11) 3055-3278", + "PostalCode_6064": "01310-200", + "State_8359": "SP", + "SupportRepId_9136": 5 + }, + { + "Address_4737": "C/ San Bernardo 85", + "City_0646": "Madrid", + "FirstName_1479": "Enrique", + "LastName_8578": "Muñoz", + "Phone_2300": "+34 914 454 454", + "PostalCode_6064": "28015", + "State_8359": null, + "SupportRepId_9136": 5 + } + ] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5d6f5b6f6ad95a52/request.json b/test-snapshots/query/5d6f5b6f6ad95a52/request.json new file mode 100644 index 0000000..b66a151 --- /dev/null +++ b/test-snapshots/query/5d6f5b6f6ad95a52/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address_4737": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_0646": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_6064": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "LastName_8578": { + "type": "column", + "column": "LastName", + "fields": null + }, + "SupportRepId_9136": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Phone_2300": { + "type": "column", + "column": "Phone", + "fields": null + }, + "State_8359": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_1479": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5d846afcd211bbaf/expected.json b/test-snapshots/query/5d846afcd211bbaf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5d846afcd211bbaf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5d846afcd211bbaf/request.json b/test-snapshots/query/5d846afcd211bbaf/request.json new file mode 100644 index 0000000..61783aa --- /dev/null +++ b/test-snapshots/query/5d846afcd211bbaf/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5de1b97b8b582a83/expected.json b/test-snapshots/query/5de1b97b8b582a83/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5de1b97b8b582a83/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5de1b97b8b582a83/request.json b/test-snapshots/query/5de1b97b8b582a83/request.json new file mode 100644 index 0000000..f35b74d --- /dev/null +++ b/test-snapshots/query/5de1b97b8b582a83/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210834 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5e006bf57d8906f8/expected.json b/test-snapshots/query/5e006bf57d8906f8/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/5e006bf57d8906f8/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e006bf57d8906f8/request.json b/test-snapshots/query/5e006bf57d8906f8/request.json new file mode 100644 index 0000000..be87330 --- /dev/null +++ b/test-snapshots/query/5e006bf57d8906f8/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5e0d7eb31ac4ca9b/expected.json b/test-snapshots/query/5e0d7eb31ac4ca9b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5e0d7eb31ac4ca9b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e0d7eb31ac4ca9b/request.json b/test-snapshots/query/5e0d7eb31ac4ca9b/request.json new file mode 100644 index 0000000..51df3c1 --- /dev/null +++ b/test-snapshots/query/5e0d7eb31ac4ca9b/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-08-14" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "King" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5e249e9ec9ab73eb/expected.json b/test-snapshots/query/5e249e9ec9ab73eb/expected.json new file mode 100644 index 0000000..05bdd14 --- /dev/null +++ b/test-snapshots/query/5e249e9ec9ab73eb/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e249e9ec9ab73eb/request.json b/test-snapshots/query/5e249e9ec9ab73eb/request.json new file mode 100644 index 0000000..ee179e0 --- /dev/null +++ b/test-snapshots/query/5e249e9ec9ab73eb/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "patrick.gray@aol.com" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5e4aa464885d4d7e/expected.json b/test-snapshots/query/5e4aa464885d4d7e/expected.json new file mode 100644 index 0000000..5949e9f --- /dev/null +++ b/test-snapshots/query/5e4aa464885d4d7e/expected.json @@ -0,0 +1,845 @@ +[ + { + "rows": [ + { + "City_0113": "Amsterdam", + "Email_2652": "johavanderberg@yahoo.nl", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2009-05-10", + "InvoiceId": 32, + "Total": 8.91 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2010-12-15", + "InvoiceId": 161, + "Total": 1.98 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2011-03-19", + "InvoiceId": 184, + "Total": 3.96 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2011-06-21", + "InvoiceId": 206, + "Total": 8.94 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2012-02-09", + "InvoiceId": 258, + "Total": 0.99 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2013-08-02", + "InvoiceId": 379, + "Total": 1.98 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2013-09-12", + "InvoiceId": 390, + "Total": 13.86 + } + ] + } + }, + { + "City_0113": "Bangalore", + "Email_2652": "puja_srivastava@yahoo.in", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2009-04-05", + "InvoiceId": 23, + "Total": 3.96 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2009-07-08", + "InvoiceId": 45, + "Total": 5.94 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2010-02-26", + "InvoiceId": 97, + "Total": 1.99 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2011-08-20", + "InvoiceId": 218, + "Total": 1.98 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2011-09-30", + "InvoiceId": 229, + "Total": 13.86 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2012-05-30", + "InvoiceId": 284, + "Total": 8.91 + } + ] + } + }, + { + "City_0113": "Berlin", + "Email_2652": "hannah.schneider@yahoo.de", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2009-05-05", + "InvoiceId": 29, + "Total": 1.98 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2009-06-15", + "InvoiceId": 40, + "Total": 13.86 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2010-02-13", + "InvoiceId": 95, + "Total": 8.91 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2011-09-20", + "InvoiceId": 224, + "Total": 1.98 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2011-12-23", + "InvoiceId": 247, + "Total": 3.96 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2012-03-26", + "InvoiceId": 269, + "Total": 5.94 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2012-11-14", + "InvoiceId": 321, + "Total": 0.99 + } + ] + } + }, + { + "City_0113": "Berlin", + "Email_2652": "nschroder@surfeu.de", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2009-02-01", + "InvoiceId": 7, + "Total": 1.98 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2009-05-06", + "InvoiceId": 30, + "Total": 3.96 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2009-08-08", + "InvoiceId": 52, + "Total": 5.94 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2010-03-29", + "InvoiceId": 104, + "Total": 0.99 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2011-09-20", + "InvoiceId": 225, + "Total": 1.98 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2011-10-31", + "InvoiceId": 236, + "Total": 13.86 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2012-06-30", + "InvoiceId": 291, + "Total": 8.91 + } + ] + } + }, + { + "City_0113": "Bordeaux", + "Email_2652": "wyatt.girard@yahoo.fr", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-02-02", + "InvoiceId": 9, + "Total": 3.96 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-05-07", + "InvoiceId": 31, + "Total": 5.94 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-12-26", + "InvoiceId": 83, + "Total": 0.99 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2011-06-19", + "InvoiceId": 204, + "Total": 3.98 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2011-07-30", + "InvoiceId": 215, + "Total": 13.86 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2012-03-29", + "InvoiceId": 270, + "Total": 8.91 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2013-11-03", + "InvoiceId": 399, + "Total": 1.98 + } + ] + } + }, + { + "City_0113": "Boston", + "Email_2652": "johngordon22@yahoo.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2009-01-11", + "InvoiceId": 5, + "Total": 13.86 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2009-09-11", + "InvoiceId": 60, + "Total": 8.91 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2011-04-18", + "InvoiceId": 189, + "Total": 1.98 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2011-07-21", + "InvoiceId": 212, + "Total": 3.96 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2011-10-23", + "InvoiceId": 234, + "Total": 5.94 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2012-06-12", + "InvoiceId": 286, + "Total": 0.99 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2013-12-04", + "InvoiceId": 407, + "Total": 1.98 + } + ] + } + }, + { + "City_0113": "Brasília", + "Email_2652": "fernadaramos4@uol.com.br", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2009-06-05", + "InvoiceId": 35, + "Total": 1.98 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2009-09-07", + "InvoiceId": 58, + "Total": 3.96 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2009-12-10", + "InvoiceId": 80, + "Total": 5.94 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2010-07-31", + "InvoiceId": 132, + "Total": 0.99 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2012-01-22", + "InvoiceId": 253, + "Total": 1.98 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2012-03-03", + "InvoiceId": 264, + "Total": 13.86 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2012-11-01", + "InvoiceId": 319, + "Total": 8.91 + } + ] + } + }, + { + "City_0113": "Brussels", + "Email_2652": "daan_peeters@apple.be", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2009-01-03", + "InvoiceId": 3, + "Total": 5.94 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2009-08-24", + "InvoiceId": 55, + "Total": 0.99 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2011-02-15", + "InvoiceId": 176, + "Total": 1.98 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2011-03-28", + "InvoiceId": 187, + "Total": 13.86 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2011-11-26", + "InvoiceId": 242, + "Total": 8.91 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2013-07-02", + "InvoiceId": 371, + "Total": 1.98 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2013-10-04", + "InvoiceId": 394, + "Total": 3.96 + } + ] + } + }, + { + "City_0113": "Budapest", + "Email_2652": "ladislav_kovacs@apple.hu", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-01-08", + "InvoiceId": 85, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-02-18", + "InvoiceId": 96, + "Total": 21.86 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-10-19", + "InvoiceId": 151, + "Total": 8.91 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2012-05-25", + "InvoiceId": 280, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2012-08-27", + "InvoiceId": 303, + "Total": 3.96 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2012-11-29", + "InvoiceId": 325, + "Total": 5.94 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2013-07-20", + "InvoiceId": 377, + "Total": 0.99 + } + ] + } + }, + { + "City_0113": "Buenos Aires", + "Email_2652": "diego.gutierrez@yahoo.ar", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2010-06-12", + "InvoiceId": 119, + "Total": 1.98 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2010-09-14", + "InvoiceId": 142, + "Total": 3.96 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2010-12-17", + "InvoiceId": 164, + "Total": 5.94 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2011-08-07", + "InvoiceId": 216, + "Total": 0.99 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2013-01-28", + "InvoiceId": 337, + "Total": 1.98 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2013-03-10", + "InvoiceId": 348, + "Total": 13.86 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2013-11-08", + "InvoiceId": 403, + "Total": 8.91 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e4aa464885d4d7e/request.json b/test-snapshots/query/5e4aa464885d4d7e/request.json new file mode 100644 index 0000000..51e47d8 --- /dev/null +++ b/test-snapshots/query/5e4aa464885d4d7e/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Email_2652": { + "type": "column", + "column": "Email", + "fields": null + }, + "City_0113": { + "type": "column", + "column": "City", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5e6972420c5b6c75/expected.json b/test-snapshots/query/5e6972420c5b6c75/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/5e6972420c5b6c75/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e6972420c5b6c75/request.json b/test-snapshots/query/5e6972420c5b6c75/request.json new file mode 100644 index 0000000..d6a8058 --- /dev/null +++ b/test-snapshots/query/5e6972420c5b6c75/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5e6c5636624f1dca/expected.json b/test-snapshots/query/5e6c5636624f1dca/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5e6c5636624f1dca/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e6c5636624f1dca/request.json b/test-snapshots/query/5e6c5636624f1dca/request.json new file mode 100644 index 0000000..d76fd77 --- /dev/null +++ b/test-snapshots/query/5e6c5636624f1dca/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5e79fa5ee090a684/expected.json b/test-snapshots/query/5e79fa5ee090a684/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5e79fa5ee090a684/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5e79fa5ee090a684/request.json b/test-snapshots/query/5e79fa5ee090a684/request.json new file mode 100644 index 0000000..54dd8a0 --- /dev/null +++ b/test-snapshots/query/5e79fa5ee090a684/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 9 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5ea242039a400f8/expected.json b/test-snapshots/query/5ea242039a400f8/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/5ea242039a400f8/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5ea242039a400f8/request.json b/test-snapshots/query/5ea242039a400f8/request.json new file mode 100644 index 0000000..b8e9288 --- /dev/null +++ b/test-snapshots/query/5ea242039a400f8/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5ee2f8fb283677fe/expected.json b/test-snapshots/query/5ee2f8fb283677fe/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/5ee2f8fb283677fe/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5ee2f8fb283677fe/request.json b/test-snapshots/query/5ee2f8fb283677fe/request.json new file mode 100644 index 0000000..feeeb38 --- /dev/null +++ b/test-snapshots/query/5ee2f8fb283677fe/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5ef744fdb831a2ed/expected.json b/test-snapshots/query/5ef744fdb831a2ed/expected.json new file mode 100644 index 0000000..08267a4 --- /dev/null +++ b/test-snapshots/query/5ef744fdb831a2ed/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 8, + "Name": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5ef744fdb831a2ed/request.json b/test-snapshots/query/5ef744fdb831a2ed/request.json new file mode 100644 index 0000000..5ac7c79 --- /dev/null +++ b/test-snapshots/query/5ef744fdb831a2ed/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5f2941413736ebaf/expected.json b/test-snapshots/query/5f2941413736ebaf/expected.json new file mode 100644 index 0000000..582126e --- /dev/null +++ b/test-snapshots/query/5f2941413736ebaf/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "Address_8436": "Via Degli Scipioni, 43", + "Company_5140": null, + "Country_0584": "Italy", + "Phone_1172": "+39 06 39733434", + "PostalCode_0850": "00192", + "State_7377": "RM", + "SupportRepId_6828": 5 + }, + { + "Address_8436": "Ullevålsveien 14", + "Company_5140": null, + "Country_0584": "Norway", + "Phone_1172": "+47 22 44 22 22", + "PostalCode_0850": "0171", + "State_7377": null, + "SupportRepId_6828": 4 + }, + { + "Address_8436": "Theodor-Heuss-Straße 34", + "Company_5140": null, + "Country_0584": "Germany", + "Phone_1172": "+49 0711 2842222", + "PostalCode_0850": "70174", + "State_7377": null, + "SupportRepId_6828": 5 + }, + { + "Address_8436": "Tauentzienstraße 8", + "Company_5140": null, + "Country_0584": "Germany", + "Phone_1172": "+49 030 26550280", + "PostalCode_0850": "10789", + "State_7377": null, + "SupportRepId_6828": 5 + }, + { + "Address_8436": "Sønder Boulevard 51", + "Company_5140": null, + "Country_0584": "Denmark", + "Phone_1172": "+453 3331 9991", + "PostalCode_0850": "1720", + "State_7377": null, + "SupportRepId_6828": 4 + }, + { + "Address_8436": "Rua Dr. Falcão Filho, 155", + "Company_5140": "Woodstock Discos", + "Country_0584": "Brazil", + "Phone_1172": "+55 (11) 3033-5446", + "PostalCode_0850": "01007-010", + "State_7377": "SP", + "SupportRepId_6828": 4 + }, + { + "Address_8436": "Rua dos Campeões Europeus de Viena, 4350", + "Company_5140": null, + "Country_0584": "Portugal", + "Phone_1172": "+351 (225) 022-448", + "PostalCode_0850": null, + "State_7377": null, + "SupportRepId_6828": 4 + }, + { + "Address_8436": "Rua da Assunção 53", + "Company_5140": null, + "Country_0584": "Portugal", + "Phone_1172": "+351 (213) 466-111", + "PostalCode_0850": null, + "State_7377": null, + "SupportRepId_6828": 4 + }, + { + "Address_8436": "Rotenturmstraße 4, 1010 Innere Stadt", + "Company_5140": null, + "Country_0584": "Austria", + "Phone_1172": "+43 01 5134505", + "PostalCode_0850": "1010", + "State_7377": null, + "SupportRepId_6828": 5 + }, + { + "Address_8436": "Rilská 3174/6", + "Company_5140": null, + "Country_0584": "Czech Republic", + "Phone_1172": "+420 2 4177 0449", + "PostalCode_0850": "14300", + "State_7377": null, + "SupportRepId_6828": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5f2941413736ebaf/request.json b/test-snapshots/query/5f2941413736ebaf/request.json new file mode 100644 index 0000000..f65f883 --- /dev/null +++ b/test-snapshots/query/5f2941413736ebaf/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_8436": { + "type": "column", + "column": "Address", + "fields": null + }, + "Phone_1172": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Company_5140": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_0584": { + "type": "column", + "column": "Country", + "fields": null + }, + "PostalCode_0850": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "SupportRepId_6828": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "State_7377": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5f2d896ffc839a80/expected.json b/test-snapshots/query/5f2d896ffc839a80/expected.json new file mode 100644 index 0000000..124718b --- /dev/null +++ b/test-snapshots/query/5f2d896ffc839a80/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_7450": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "Title_7450": "Mozart: Chamber Music" + }, + { + "Title_7450": "Monteverdi: L'Orfeo" + }, + { + "Title_7450": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "Title_7450": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "Title_7450": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "Title_7450": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "Title_7450": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "Title_7450": "Nielsen: The Six Symphonies" + }, + { + "Title_7450": "Szymanowski: Piano Works, Vol. 1" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5f2d896ffc839a80/request.json b/test-snapshots/query/5f2d896ffc839a80/request.json new file mode 100644 index 0000000..97e2125 --- /dev/null +++ b/test-snapshots/query/5f2d896ffc839a80/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_7450": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5f5611f36e525a5/expected.json b/test-snapshots/query/5f5611f36e525a5/expected.json new file mode 100644 index 0000000..49ece30 --- /dev/null +++ b/test-snapshots/query/5f5611f36e525a5/expected.json @@ -0,0 +1,118 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 1 + }, + { + "AlbumId_9697": 4 + } + ] + }, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 13 + } + ] + }, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 141 + } + ] + }, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 142 + }, + { + "AlbumId_9697": 143 + } + ] + }, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 144 + } + ] + }, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 145 + } + ] + }, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 146 + } + ] + }, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 147 + } + ] + }, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_9697": 160 + } + ] + }, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5f5611f36e525a5/request.json b/test-snapshots/query/5f5611f36e525a5/request.json new file mode 100644 index 0000000..6ee5975 --- /dev/null +++ b/test-snapshots/query/5f5611f36e525a5/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_9697": { + "type": "column", + "column": "AlbumId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5f7387f0f49ad2cd/expected.json b/test-snapshots/query/5f7387f0f49ad2cd/expected.json new file mode 100644 index 0000000..09ef815 --- /dev/null +++ b/test-snapshots/query/5f7387f0f49ad2cd/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5f7387f0f49ad2cd/request.json b/test-snapshots/query/5f7387f0f49ad2cd/request.json new file mode 100644 index 0000000..8bb5bd1 --- /dev/null +++ b/test-snapshots/query/5f7387f0f49ad2cd/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address_5127": { + "type": "column", + "column": "Address", + "fields": null + }, + "State_8627": { + "type": "column", + "column": "State", + "fields": null + }, + "City_9769": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2619": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_7809": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_1505": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_5963": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_3959": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_2958": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_9701": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1499": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Title_5443": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5f9c6b80b0c42c89/expected.json b/test-snapshots/query/5f9c6b80b0c42c89/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5f9c6b80b0c42c89/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5f9c6b80b0c42c89/request.json b/test-snapshots/query/5f9c6b80b0c42c89/request.json new file mode 100644 index 0000000..be31dad --- /dev/null +++ b/test-snapshots/query/5f9c6b80b0c42c89/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5f9cdfd2a893ec67/expected.json b/test-snapshots/query/5f9cdfd2a893ec67/expected.json new file mode 100644 index 0000000..ed226db --- /dev/null +++ b/test-snapshots/query/5f9cdfd2a893ec67/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + }, + { + "Name": "Music", + "PlaylistId": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5f9cdfd2a893ec67/request.json b/test-snapshots/query/5f9cdfd2a893ec67/request.json new file mode 100644 index 0000000..705b777 --- /dev/null +++ b/test-snapshots/query/5f9cdfd2a893ec67/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1002 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/5fbe4bb564f39873/expected.json b/test-snapshots/query/5fbe4bb564f39873/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5fbe4bb564f39873/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5fbe4bb564f39873/request.json b/test-snapshots/query/5fbe4bb564f39873/request.json new file mode 100644 index 0000000..32b6652 --- /dev/null +++ b/test-snapshots/query/5fbe4bb564f39873/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/5ff4379e2757ae48/expected.json b/test-snapshots/query/5ff4379e2757ae48/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/5ff4379e2757ae48/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/5ff4379e2757ae48/request.json b/test-snapshots/query/5ff4379e2757ae48/request.json new file mode 100644 index 0000000..3d1aebb --- /dev/null +++ b/test-snapshots/query/5ff4379e2757ae48/request.json @@ -0,0 +1,91 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/601ca802380c57cc/expected.json b/test-snapshots/query/601ca802380c57cc/expected.json new file mode 100644 index 0000000..65a3604 --- /dev/null +++ b/test-snapshots/query/601ca802380c57cc/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/601ca802380c57cc/request.json b/test-snapshots/query/601ca802380c57cc/request.json new file mode 100644 index 0000000..743aafa --- /dev/null +++ b/test-snapshots/query/601ca802380c57cc/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/602909a040ae7b75/expected.json b/test-snapshots/query/602909a040ae7b75/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/602909a040ae7b75/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/602909a040ae7b75/request.json b/test-snapshots/query/602909a040ae7b75/request.json new file mode 100644 index 0000000..4b90023 --- /dev/null +++ b/test-snapshots/query/602909a040ae7b75/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/606cb6d18077f0c6/expected.json b/test-snapshots/query/606cb6d18077f0c6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/606cb6d18077f0c6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/606cb6d18077f0c6/request.json b/test-snapshots/query/606cb6d18077f0c6/request.json new file mode 100644 index 0000000..06dacd1 --- /dev/null +++ b/test-snapshots/query/606cb6d18077f0c6/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/608989d32f7be45a/expected.json b/test-snapshots/query/608989d32f7be45a/expected.json new file mode 100644 index 0000000..4ccbc65 --- /dev/null +++ b/test-snapshots/query/608989d32f7be45a/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_0817": "5112 48 Street", + "City_1741": "Yellowknife", + "Company_6488": null, + "CustomerId_5553": 33, + "Email_7525": "ellie.sullivan@shaw.ca", + "Fax_0289": null, + "FirstName_6234": "Ellie", + "Phone_9082": "+1 (867) 920-2233", + "PostalCode_2392": "X1A 1N6", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "700 W Pender Street", + "City_1741": "Vancouver", + "Company_6488": "Rogers Canada", + "CustomerId_5553": 15, + "Email_7525": "jenniferp@rogers.ca", + "Fax_0289": "+1 (604) 688-8756", + "FirstName_6234": "Jennifer", + "Phone_9082": "+1 (604) 688-2255", + "PostalCode_2392": "V6C 1G8", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "8210 111 ST NW", + "City_1741": "Edmonton", + "Company_6488": "Telus", + "CustomerId_5553": 14, + "Email_7525": "mphilips12@shaw.ca", + "Fax_0289": "+1 (780) 434-5565", + "FirstName_6234": "Mark", + "Phone_9082": "+1 (780) 434-4554", + "PostalCode_2392": "T6G 2C7", + "SupportRepId_9255": 5 + }, + { + "Address_0817": "113 Lupus St", + "City_1741": "London", + "Company_6488": null, + "CustomerId_5553": 53, + "Email_7525": "phil.hughes@gmail.com", + "Fax_0289": null, + "FirstName_6234": "Phil", + "Phone_9082": "+44 020 7976 5722", + "PostalCode_2392": "SW1V 3EN", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "696 Osborne Street", + "City_1741": "Winnipeg", + "Company_6488": null, + "CustomerId_5553": 32, + "Email_7525": "aaronmitchell@yahoo.ca", + "Fax_0289": null, + "FirstName_6234": "Aaron", + "Phone_9082": "+1 (204) 452-6452", + "PostalCode_2392": "R3L 2B9", + "SupportRepId_9255": 4 + }, + { + "Address_0817": "202 Hoxton Street", + "City_1741": "London", + "Company_6488": null, + "CustomerId_5553": 52, + "Email_7525": "emma_jones@hotmail.com", + "Fax_0289": null, + "FirstName_6234": "Emma", + "Phone_9082": "+44 020 7707 0707", + "PostalCode_2392": "N1 5LH", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "796 Dundas Street West", + "City_1741": "Toronto", + "Company_6488": null, + "CustomerId_5553": 29, + "Email_7525": "robbrown@shaw.ca", + "Fax_0289": null, + "FirstName_6234": "Robert", + "Phone_9082": "+1 (416) 363-8888", + "PostalCode_2392": "M6J 1V1", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "230 Elgin Street", + "City_1741": "Ottawa", + "Company_6488": null, + "CustomerId_5553": 30, + "Email_7525": "edfrancis@yachoo.ca", + "Fax_0289": null, + "FirstName_6234": "Edward", + "Phone_9082": "+1 (613) 234-3322", + "PostalCode_2392": "K2P 1L7", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "1498 rue Bélanger", + "City_1741": "Montréal", + "Company_6488": null, + "CustomerId_5553": 3, + "Email_7525": "ftremblay@gmail.com", + "Fax_0289": null, + "FirstName_6234": "François", + "Phone_9082": "+1 (514) 721-4711", + "PostalCode_2392": "H2G 1A7", + "SupportRepId_9255": 3 + }, + { + "Address_0817": "Erzsébet krt. 58.", + "City_1741": "Budapest", + "Company_6488": null, + "CustomerId_5553": 45, + "Email_7525": "ladislav_kovacs@apple.hu", + "Fax_0289": null, + "FirstName_6234": "Ladislav", + "Phone_9082": null, + "PostalCode_2392": "H-1073", + "SupportRepId_9255": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/608989d32f7be45a/request.json b/test-snapshots/query/608989d32f7be45a/request.json new file mode 100644 index 0000000..63a531c --- /dev/null +++ b/test-snapshots/query/608989d32f7be45a/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_0817": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_1741": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_6488": { + "type": "column", + "column": "Company", + "fields": null + }, + "PostalCode_2392": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "CustomerId_5553": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_7525": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_0289": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6234": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "SupportRepId_9255": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Phone_9082": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/60a5f6c490fc9bd1/expected.json b/test-snapshots/query/60a5f6c490fc9bd1/expected.json new file mode 100644 index 0000000..5e5048e --- /dev/null +++ b/test-snapshots/query/60a5f6c490fc9bd1/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_3283": "5827 Bowness Road NW", + "BirthDate_4177": "1973-07-01", + "City_2748": "Calgary", + "Country_9261": "Canada", + "Email_9521": "michael@chinookcorp.com", + "Fax_3146": "+1 (403) 246-9899", + "FirstName_9234": "Michael", + "HireDate_4551": "2003-10-17", + "LastName_4972": "Mitchell", + "PostalCode_7688": "T3B 0C5", + "ReportsTo_2342": 1, + "State_2514": "AB", + "Title_7041": "IT Manager" + }, + { + "Address_3283": "825 8 Ave SW", + "BirthDate_4177": "1958-12-08", + "City_2748": "Calgary", + "Country_9261": "Canada", + "Email_9521": "nancy@chinookcorp.com", + "Fax_3146": "+1 (403) 262-3322", + "FirstName_9234": "Nancy", + "HireDate_4551": "2002-05-01", + "LastName_4972": "Edwards", + "PostalCode_7688": "T2P 2T3", + "ReportsTo_2342": 1, + "State_2514": "AB", + "Title_7041": "Sales Manager" + }, + { + "Address_3283": "1111 6 Ave SW", + "BirthDate_4177": "1973-08-29", + "City_2748": "Calgary", + "Country_9261": "Canada", + "Email_9521": "jane@chinookcorp.com", + "Fax_3146": "+1 (403) 262-6712", + "FirstName_9234": "Jane", + "HireDate_4551": "2002-04-01", + "LastName_4972": "Peacock", + "PostalCode_7688": "T2P 5M5", + "ReportsTo_2342": 2, + "State_2514": "AB", + "Title_7041": "Sales Support Agent" + }, + { + "Address_3283": "683 10 Street SW", + "BirthDate_4177": "1947-09-19", + "City_2748": "Calgary", + "Country_9261": "Canada", + "Email_9521": "margaret@chinookcorp.com", + "Fax_3146": "+1 (403) 263-4289", + "FirstName_9234": "Margaret", + "HireDate_4551": "2003-05-03", + "LastName_4972": "Park", + "PostalCode_7688": "T2P 5G3", + "ReportsTo_2342": 2, + "State_2514": "AB", + "Title_7041": "Sales Support Agent" + }, + { + "Address_3283": "590 Columbia Boulevard West", + "BirthDate_4177": "1970-05-29", + "City_2748": "Lethbridge", + "Country_9261": "Canada", + "Email_9521": "robert@chinookcorp.com", + "Fax_3146": "+1 (403) 456-8485", + "FirstName_9234": "Robert", + "HireDate_4551": "2004-01-02", + "LastName_4972": "King", + "PostalCode_7688": "T1K 5N8", + "ReportsTo_2342": 6, + "State_2514": "AB", + "Title_7041": "IT Staff" + }, + { + "Address_3283": "923 7 ST NW", + "BirthDate_4177": "1968-01-09", + "City_2748": "Lethbridge", + "Country_9261": "Canada", + "Email_9521": "laura@chinookcorp.com", + "Fax_3146": "+1 (403) 467-8772", + "FirstName_9234": "Laura", + "HireDate_4551": "2004-03-04", + "LastName_4972": "Callahan", + "PostalCode_7688": "T1H 1Y8", + "ReportsTo_2342": 6, + "State_2514": "AB", + "Title_7041": "IT Staff" + }, + { + "Address_3283": "11120 Jasper Ave NW", + "BirthDate_4177": "1962-02-18", + "City_2748": "Edmonton", + "Country_9261": "Canada", + "Email_9521": "andrew@chinookcorp.com", + "Fax_3146": "+1 (780) 428-3457", + "FirstName_9234": "Andrew", + "HireDate_4551": "2002-08-14", + "LastName_4972": "Adams", + "PostalCode_7688": "T5K 2N1", + "ReportsTo_2342": null, + "State_2514": "AB", + "Title_7041": "General Manager" + }, + { + "Address_3283": "7727B 41 Ave", + "BirthDate_4177": "1965-03-03", + "City_2748": "Calgary", + "Country_9261": "Canada", + "Email_9521": "steve@chinookcorp.com", + "Fax_3146": "1 (780) 836-9543", + "FirstName_9234": "Steve", + "HireDate_4551": "2003-10-17", + "LastName_4972": "Johnson", + "PostalCode_7688": "T3B 1Y7", + "ReportsTo_2342": 2, + "State_2514": "AB", + "Title_7041": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/60a5f6c490fc9bd1/request.json b/test-snapshots/query/60a5f6c490fc9bd1/request.json new file mode 100644 index 0000000..52c525e --- /dev/null +++ b/test-snapshots/query/60a5f6c490fc9bd1/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_3283": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_4177": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_2748": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_9261": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_9521": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_2514": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_3146": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_9234": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_4551": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_4972": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Title_7041": { + "type": "column", + "column": "Title", + "fields": null + }, + "PostalCode_7688": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_2342": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/60cd8062cd76e776/expected.json b/test-snapshots/query/60cd8062cd76e776/expected.json new file mode 100644 index 0000000..20415fa --- /dev/null +++ b/test-snapshots/query/60cd8062cd76e776/expected.json @@ -0,0 +1,960 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 1, + "Bytes_9336": 11170334, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 343719, + "TrackId_6755": 1, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 6566314, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 199836, + "TrackId_6755": 11, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 6599424, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 203102, + "TrackId_6755": 9, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 6706347, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 205688, + "TrackId_6755": 13, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 6713451, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 205662, + "TrackId_6755": 6, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 6852860, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 210834, + "TrackId_6755": 8, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 7636561, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 233926, + "TrackId_6755": 7, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 8596840, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 263288, + "TrackId_6755": 12, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 8611245, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 263497, + "TrackId_6755": 10, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 1, + "Bytes_9336": 8817038, + "Composer_0550": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_1125": 1, + "Milliseconds_4438": 270863, + "TrackId_6755": 14, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 10, + "Bytes_9336": 4948095, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 206053, + "TrackId_6755": 93, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 4961887, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 206628, + "TrackId_6755": 94, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 5339931, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 222380, + "TrackId_6755": 85, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 5988186, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 249391, + "TrackId_6755": 88, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 6321091, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 263262, + "TrackId_6755": 90, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 6672176, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 277890, + "TrackId_6755": 86, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 6709793, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 279457, + "TrackId_6755": 87, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 7059624, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 294034, + "TrackId_6755": 89, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 7193162, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 299598, + "TrackId_6755": 97, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 10, + "Bytes_9336": 7289084, + "Composer_0550": "Audioslave/Chris Cornell", + "GenreId_1125": 1, + "Milliseconds_4438": 303595, + "TrackId_6755": 96, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 100, + "Bytes_9336": 10276872, + "Composer_0550": "Steve Harris", + "GenreId_1125": 6, + "Milliseconds_4438": 428016, + "TrackId_6755": 1272, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 4712576, + "Composer_0550": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId_1125": 6, + "Milliseconds_4438": 196284, + "TrackId_6755": 1269, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 4739122, + "Composer_0550": "Harris/Paul Di´Anno", + "GenreId_1125": 6, + "Milliseconds_4438": 197276, + "TrackId_6755": 1271, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 5189891, + "Composer_0550": "Steve Harris", + "GenreId_1125": 6, + "Milliseconds_4438": 216058, + "TrackId_6755": 1276, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 5668992, + "Composer_0550": "Steve Harris", + "GenreId_1125": 6, + "Milliseconds_4438": 236173, + "TrackId_6755": 1268, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 6066304, + "Composer_0550": "Murray Dave", + "GenreId_1125": 6, + "Milliseconds_4438": 252708, + "TrackId_6755": 1275, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 6226048, + "Composer_0550": "Steve Harris", + "GenreId_1125": 6, + "Milliseconds_4438": 259343, + "TrackId_6755": 1273, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 7889024, + "Composer_0550": "Harris/Paul Di´Anno", + "GenreId_1125": 6, + "Milliseconds_4438": 328620, + "TrackId_6755": 1270, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 100, + "Bytes_9336": 7981184, + "Composer_0550": "Steve Harris", + "GenreId_1125": 6, + "Milliseconds_4438": 332460, + "TrackId_6755": 1274, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 101, + "Bytes_9336": 2543744, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 105926, + "TrackId_6755": 1277, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 4188288, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 174471, + "TrackId_6755": 1278, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 4493440, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 187141, + "TrackId_6755": 1281, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 4804736, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 200150, + "TrackId_6755": 1285, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 4874368, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 203049, + "TrackId_6755": 1280, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 5584861, + "Composer_0550": "Di´Anno/Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 232515, + "TrackId_6755": 1282, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 6205786, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 258377, + "TrackId_6755": 1279, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 6934660, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 288757, + "TrackId_6755": 1286, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 7227440, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 300956, + "TrackId_6755": 1283, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 101, + "Bytes_9336": 8937600, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 372349, + "TrackId_6755": 1284, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 102, + "Bytes_9336": 10589917, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 441155, + "TrackId_6755": 1304, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 10836304, + "Composer_0550": "Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 451422, + "TrackId_6755": 1296, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 10921567, + "Composer_0550": null, + "GenreId_1125": 3, + "Milliseconds_4438": 454974, + "TrackId_6755": 1294, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 1154488, + "Composer_0550": null, + "GenreId_1125": 13, + "Milliseconds_4438": 48013, + "TrackId_6755": 1287, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 18949518, + "Composer_0550": null, + "GenreId_1125": 3, + "Milliseconds_4438": 789472, + "TrackId_6755": 1293, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 4410181, + "Composer_0550": "Steve Harris", + "GenreId_1125": 13, + "Milliseconds_4438": 183666, + "TrackId_6755": 1300, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 4912986, + "Composer_0550": "Harris/Di Anno", + "GenreId_1125": 3, + "Milliseconds_4438": 204617, + "TrackId_6755": 1299, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 5521744, + "Composer_0550": "Smith/Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 229982, + "TrackId_6755": 1292, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 5561241, + "Composer_0550": "Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 231627, + "TrackId_6755": 1298, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 102, + "Bytes_9336": 6289117, + "Composer_0550": "Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 261955, + "TrackId_6755": 1297, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 103, + "Bytes_9336": 10361452, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 431542, + "TrackId_6755": 1314, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 11479913, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 478145, + "TrackId_6755": 1312, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 4182963, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 174106, + "TrackId_6755": 1307, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 5118995, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 213106, + "TrackId_6755": 1309, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 5599853, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 233142, + "TrackId_6755": 1305, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 5947795, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 247640, + "TrackId_6755": 1311, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 6831163, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 284447, + "TrackId_6755": 1308, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 7060625, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 294008, + "TrackId_6755": 1306, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 8091301, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 336953, + "TrackId_6755": 1310, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 103, + "Bytes_9336": 9905048, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 412525, + "TrackId_6755": 1313, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 104, + "Bytes_9336": 10577743, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 440555, + "TrackId_6755": 1317, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 10751410, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 447791, + "TrackId_6755": 1321, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 11380851, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 474017, + "TrackId_6755": 1324, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 11874875, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 494602, + "TrackId_6755": 1320, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 5588560, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 232672, + "TrackId_6755": 1322, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 5665052, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 235859, + "TrackId_6755": 1318, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 6302648, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 262426, + "TrackId_6755": 1316, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 7648679, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 318511, + "TrackId_6755": 1323, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 8122030, + "Composer_0550": "Adrian Smith/Bruce Dickinson", + "GenreId_1125": 1, + "Milliseconds_4438": 338233, + "TrackId_6755": 1319, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 104, + "Bytes_9336": 9045532, + "Composer_0550": null, + "GenreId_1125": 1, + "Milliseconds_4438": 376711, + "TrackId_6755": 1315, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 105, + "Bytes_9336": 3672064, + "Composer_0550": "Bruce Dickinson/Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 229459, + "TrackId_6755": 1326, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 3960832, + "Composer_0550": "Adrian Smith/Bruce Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 247510, + "TrackId_6755": 1332, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4018088, + "Composer_0550": "David Murray/Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 250853, + "TrackId_6755": 1329, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4071587, + "Composer_0550": "Bruce Dickinson/David Murray", + "GenreId_1125": 3, + "Milliseconds_4438": 254197, + "TrackId_6755": 1328, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4089856, + "Composer_0550": "Bruce Dickinson/Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 255582, + "TrackId_6755": 1325, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4141056, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 258768, + "TrackId_6755": 1330, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4225024, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 263941, + "TrackId_6755": 1327, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4407296, + "Composer_0550": "Bruce Dickinson/Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 275408, + "TrackId_6755": 1331, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 4548608, + "Composer_0550": "Bruce Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 284238, + "TrackId_6755": 1333, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 105, + "Bytes_9336": 5322752, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 332617, + "TrackId_6755": 1334, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 106, + "Bytes_9336": 3306324, + "Composer_0550": "Adrian Smith/Bruce Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 206367, + "TrackId_6755": 1342, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 3543040, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 221309, + "TrackId_6755": 1341, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 3686400, + "Composer_0550": "Adrian Smith/Bruce Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 230269, + "TrackId_6755": 1337, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 4024320, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 251454, + "TrackId_6755": 1339, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 4710400, + "Composer_0550": "David Murray/Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 294347, + "TrackId_6755": 1340, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 5212160, + "Composer_0550": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 325694, + "TrackId_6755": 1338, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 5914624, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 369554, + "TrackId_6755": 1335, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 6539264, + "Composer_0550": "Bruce Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 408607, + "TrackId_6755": 1336, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 106, + "Bytes_9336": 7129264, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 445283, + "TrackId_6755": 1343, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3954": 107, + "Bytes_9336": 19599577, + "Composer_0550": "Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 816509, + "TrackId_6755": 1351, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 5828861, + "Composer_0550": "Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 242729, + "TrackId_6755": 1347, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 6074756, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 252891, + "TrackId_6755": 1346, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 6472088, + "Composer_0550": "Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 269531, + "TrackId_6755": 1344, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 7696518, + "Composer_0550": "Dickinson/Smith", + "GenreId_1125": 3, + "Milliseconds_4438": 320548, + "TrackId_6755": 1349, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 8638809, + "Composer_0550": "Smith/Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 359810, + "TrackId_6755": 1345, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 8800686, + "Composer_0550": "Steve Harris", + "GenreId_1125": 3, + "Milliseconds_4438": 366471, + "TrackId_6755": 1348, + "UnitPrice_2613": 0.99 + }, + { + "AlbumId_3954": 107, + "Bytes_9336": 9791106, + "Composer_0550": "Dickinson", + "GenreId_1125": 3, + "Milliseconds_4438": 407823, + "TrackId_6755": 1350, + "UnitPrice_2613": 0.99 + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/60cd8062cd76e776/request.json b/test-snapshots/query/60cd8062cd76e776/request.json new file mode 100644 index 0000000..fa4ac47 --- /dev/null +++ b/test-snapshots/query/60cd8062cd76e776/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_3954": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_9336": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_0550": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_1125": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "UnitPrice_2613": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Milliseconds_4438": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "TrackId_6755": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/60e1d39cd843071d/expected.json b/test-snapshots/query/60e1d39cd843071d/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/60e1d39cd843071d/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/60e1d39cd843071d/request.json b/test-snapshots/query/60e1d39cd843071d/request.json new file mode 100644 index 0000000..598a9d8 --- /dev/null +++ b/test-snapshots/query/60e1d39cd843071d/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/60f96e8d862c1db0/expected.json b/test-snapshots/query/60f96e8d862c1db0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/60f96e8d862c1db0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/60f96e8d862c1db0/request.json b/test-snapshots/query/60f96e8d862c1db0/request.json new file mode 100644 index 0000000..4c97acf --- /dev/null +++ b/test-snapshots/query/60f96e8d862c1db0/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/610b8102abb7acee/expected.json b/test-snapshots/query/610b8102abb7acee/expected.json new file mode 100644 index 0000000..225f24b --- /dev/null +++ b/test-snapshots/query/610b8102abb7acee/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "MediaTypeId_median_5644": 3, + "Name_count_5693": 5, + "Name_min_6891": "AAC audio file" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/610b8102abb7acee/request.json b/test-snapshots/query/610b8102abb7acee/request.json new file mode 100644 index 0000000..a3a7663 --- /dev/null +++ b/test-snapshots/query/610b8102abb7acee/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "Name_count_5693": { + "type": "single_column", + "column": "Name", + "function": "count" + }, + "Name_min_6891": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "MediaTypeId_median_5644": { + "type": "single_column", + "column": "MediaTypeId", + "function": "median" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/612c0430b49c81f5/expected.json b/test-snapshots/query/612c0430b49c81f5/expected.json new file mode 100644 index 0000000..eaed366 --- /dev/null +++ b/test-snapshots/query/612c0430b49c81f5/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1020 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1021 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1022 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1023 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1024 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1025 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1026 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1027 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1028 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_1327": 5, + "TrackId_4335": 1029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/612c0430b49c81f5/request.json b/test-snapshots/query/612c0430b49c81f5/request.json new file mode 100644 index 0000000..5abf6a8 --- /dev/null +++ b/test-snapshots/query/612c0430b49c81f5/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_1327": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_4335": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/614140f9bdd4eed9/expected.json b/test-snapshots/query/614140f9bdd4eed9/expected.json new file mode 100644 index 0000000..37986be --- /dev/null +++ b/test-snapshots/query/614140f9bdd4eed9/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 10428382, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 316264, + "Name": "Over And Out", + "TrackId": 1004, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/614140f9bdd4eed9/request.json b/test-snapshots/query/614140f9bdd4eed9/request.json new file mode 100644 index 0000000..5a9c54c --- /dev/null +++ b/test-snapshots/query/614140f9bdd4eed9/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1004 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6146e5c62e3533b6/expected.json b/test-snapshots/query/6146e5c62e3533b6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6146e5c62e3533b6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6146e5c62e3533b6/request.json b/test-snapshots/query/6146e5c62e3533b6/request.json new file mode 100644 index 0000000..c2ba46d --- /dev/null +++ b/test-snapshots/query/6146e5c62e3533b6/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/61771ad0ed26321/expected.json b/test-snapshots/query/61771ad0ed26321/expected.json new file mode 100644 index 0000000..6cba1dd --- /dev/null +++ b/test-snapshots/query/61771ad0ed26321/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_3357": 347, + "ArtistId_8438": 275, + "Title_0765": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_3357": 346, + "ArtistId_8438": 274, + "Title_0765": "Mozart: Chamber Music" + }, + { + "AlbumId_3357": 345, + "ArtistId_8438": 273, + "Title_0765": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_3357": 344, + "ArtistId_8438": 272, + "Title_0765": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_3357": 343, + "ArtistId_8438": 226, + "Title_0765": "Respighi:Pines of Rome" + }, + { + "AlbumId_3357": 342, + "ArtistId_8438": 271, + "Title_0765": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_3357": 341, + "ArtistId_8438": 270, + "Title_0765": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_3357": 340, + "ArtistId_8438": 269, + "Title_0765": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_3357": 339, + "ArtistId_8438": 268, + "Title_0765": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_3357": 338, + "ArtistId_8438": 267, + "Title_0765": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/61771ad0ed26321/request.json b/test-snapshots/query/61771ad0ed26321/request.json new file mode 100644 index 0000000..c13cf82 --- /dev/null +++ b/test-snapshots/query/61771ad0ed26321/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_3357": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_8438": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_0765": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/617caee6ed0d57aa/expected.json b/test-snapshots/query/617caee6ed0d57aa/expected.json new file mode 100644 index 0000000..2f37b2c --- /dev/null +++ b/test-snapshots/query/617caee6ed0d57aa/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 203102 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 203102 + } + ] + }, + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 205662 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 205688 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 210834 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 210834 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 263288 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 263497 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 270863 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_6343": 1, + "Composer_5606": "Angus Young, Malcolm Young, Brian Johnson", + "Milliseconds_6014": 343719 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/617caee6ed0d57aa/request.json b/test-snapshots/query/617caee6ed0d57aa/request.json new file mode 100644 index 0000000..0d7549b --- /dev/null +++ b/test-snapshots/query/617caee6ed0d57aa/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_6343": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Milliseconds_6014": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Composer_5606": { + "type": "column", + "column": "Composer", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6185d2153ab644ee/expected.json b/test-snapshots/query/6185d2153ab644ee/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/6185d2153ab644ee/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6185d2153ab644ee/request.json b/test-snapshots/query/6185d2153ab644ee/request.json new file mode 100644 index 0000000..f35a22d --- /dev/null +++ b/test-snapshots/query/6185d2153ab644ee/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1004 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/618a661f2de3c55c/expected.json b/test-snapshots/query/618a661f2de3c55c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/618a661f2de3c55c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/618a661f2de3c55c/request.json b/test-snapshots/query/618a661f2de3c55c/request.json new file mode 100644 index 0000000..266c2c9 --- /dev/null +++ b/test-snapshots/query/618a661f2de3c55c/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edmonton" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/618caa2c168adf67/expected.json b/test-snapshots/query/618caa2c168adf67/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/618caa2c168adf67/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/618caa2c168adf67/request.json b/test-snapshots/query/618caa2c168adf67/request.json new file mode 100644 index 0000000..fe707da --- /dev/null +++ b/test-snapshots/query/618caa2c168adf67/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Hughes" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Google Inc." + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/618d358881a7f7ee/expected.json b/test-snapshots/query/618d358881a7f7ee/expected.json new file mode 100644 index 0000000..9ba7956 --- /dev/null +++ b/test-snapshots/query/618d358881a7f7ee/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/618d358881a7f7ee/request.json b/test-snapshots/query/618d358881a7f7ee/request.json new file mode 100644 index 0000000..4b690c8 --- /dev/null +++ b/test-snapshots/query/618d358881a7f7ee/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 203102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6227d88f0e12073e/expected.json b/test-snapshots/query/6227d88f0e12073e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6227d88f0e12073e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6227d88f0e12073e/request.json b/test-snapshots/query/6227d88f0e12073e/request.json new file mode 100644 index 0000000..3b151fb --- /dev/null +++ b/test-snapshots/query/6227d88f0e12073e/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/62471151f8deff84/expected.json b/test-snapshots/query/62471151f8deff84/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/62471151f8deff84/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62471151f8deff84/request.json b/test-snapshots/query/62471151f8deff84/request.json new file mode 100644 index 0000000..78a4c56 --- /dev/null +++ b/test-snapshots/query/62471151f8deff84/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/624d377ba9b80524/expected.json b/test-snapshots/query/624d377ba9b80524/expected.json new file mode 100644 index 0000000..2caf337 --- /dev/null +++ b/test-snapshots/query/624d377ba9b80524/expected.json @@ -0,0 +1,164 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/624d377ba9b80524/request.json b/test-snapshots/query/624d377ba9b80524/request.json new file mode 100644 index 0000000..12f5d05 --- /dev/null +++ b/test-snapshots/query/624d377ba9b80524/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/62514a6d0c05c498/expected.json b/test-snapshots/query/62514a6d0c05c498/expected.json new file mode 100644 index 0000000..c34373b --- /dev/null +++ b/test-snapshots/query/62514a6d0c05c498/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "ArtistId": 90, + "Title": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62514a6d0c05c498/request.json b/test-snapshots/query/62514a6d0c05c498/request.json new file mode 100644 index 0000000..44aef4e --- /dev/null +++ b/test-snapshots/query/62514a6d0c05c498/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/625cb1f5dc651536/expected.json b/test-snapshots/query/625cb1f5dc651536/expected.json new file mode 100644 index 0000000..42086c5 --- /dev/null +++ b/test-snapshots/query/625cb1f5dc651536/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 11, + "Name": "Bossa Nova" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/625cb1f5dc651536/request.json b/test-snapshots/query/625cb1f5dc651536/request.json new file mode 100644 index 0000000..cdc9af3 --- /dev/null +++ b/test-snapshots/query/625cb1f5dc651536/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Bossa Nova" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6279c2063a4cdbd0/expected.json b/test-snapshots/query/6279c2063a4cdbd0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6279c2063a4cdbd0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6279c2063a4cdbd0/request.json b/test-snapshots/query/6279c2063a4cdbd0/request.json new file mode 100644 index 0000000..e06e81c --- /dev/null +++ b/test-snapshots/query/6279c2063a4cdbd0/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "C.O.D." + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6286d76035fd6006/expected.json b/test-snapshots/query/6286d76035fd6006/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6286d76035fd6006/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6286d76035fd6006/request.json b/test-snapshots/query/6286d76035fd6006/request.json new file mode 100644 index 0000000..fd636ec --- /dev/null +++ b/test-snapshots/query/6286d76035fd6006/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/629841776a161fc5/expected.json b/test-snapshots/query/629841776a161fc5/expected.json new file mode 100644 index 0000000..188697f --- /dev/null +++ b/test-snapshots/query/629841776a161fc5/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "Address_0731": "3,Raj Bhavan Road", + "Country_7437": "India", + "CustomerId_3241": 59, + "Email_0652": "puja_srivastava@yahoo.in", + "Fax_6220": null, + "LastName_1738": "Srivastava", + "PostalCode_5249": "560001", + "State_1946": null + }, + { + "Address_0731": "Barbarossastraße 19", + "Country_7437": "Germany", + "CustomerId_3241": 38, + "Email_0652": "nschroder@surfeu.de", + "Fax_6220": null, + "LastName_1738": "Schröder", + "PostalCode_5249": "10779", + "State_1946": null + }, + { + "Address_0731": "Tauentzienstraße 8", + "Country_7437": "Germany", + "CustomerId_3241": 36, + "Email_0652": "hannah.schneider@yahoo.de", + "Fax_6220": null, + "LastName_1738": "Schneider", + "PostalCode_5249": "10789", + "State_1946": null + }, + { + "Address_0731": "9, Place Louis Barthou", + "Country_7437": "France", + "CustomerId_3241": 42, + "Email_0652": "wyatt.girard@yahoo.fr", + "Fax_6220": null, + "LastName_1738": "Girard", + "PostalCode_5249": "33000", + "State_1946": null + }, + { + "Address_0731": "Grétrystraat 63", + "Country_7437": "Belgium", + "CustomerId_3241": 8, + "Email_0652": "daan_peeters@apple.be", + "Fax_6220": null, + "LastName_1738": "Peeters", + "PostalCode_5249": "1000", + "State_1946": null + }, + { + "Address_0731": "Erzsébet krt. 58.", + "Country_7437": "Hungary", + "CustomerId_3241": 45, + "Email_0652": "ladislav_kovacs@apple.hu", + "Fax_6220": null, + "LastName_1738": "Kovács", + "PostalCode_5249": "H-1073", + "State_1946": null + }, + { + "Address_0731": "307 Macacha Güemes", + "Country_7437": "Argentina", + "CustomerId_3241": 56, + "Email_0652": "diego.gutierrez@yahoo.ar", + "Fax_6220": null, + "LastName_1738": "Gutiérrez", + "PostalCode_5249": "1106", + "State_1946": null + }, + { + "Address_0731": "Sønder Boulevard 51", + "Country_7437": "Denmark", + "CustomerId_3241": 9, + "Email_0652": "kara.nielsen@jubii.dk", + "Fax_6220": null, + "LastName_1738": "Nielsen", + "PostalCode_5249": "1720", + "State_1946": null + }, + { + "Address_0731": "12,Community Centre", + "Country_7437": "India", + "CustomerId_3241": 58, + "Email_0652": "manoj.pareek@rediff.com", + "Fax_6220": null, + "LastName_1738": "Pareek", + "PostalCode_5249": "110017", + "State_1946": null + }, + { + "Address_0731": "68, Rue Jouvence", + "Country_7437": "France", + "CustomerId_3241": 43, + "Email_0652": "isabelle_mercier@apple.fr", + "Fax_6220": null, + "LastName_1738": "Mercier", + "PostalCode_5249": "21000", + "State_1946": null + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/629841776a161fc5/request.json b/test-snapshots/query/629841776a161fc5/request.json new file mode 100644 index 0000000..da71901 --- /dev/null +++ b/test-snapshots/query/629841776a161fc5/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_0731": { + "type": "column", + "column": "Address", + "fields": null + }, + "LastName_1738": { + "type": "column", + "column": "LastName", + "fields": null + }, + "State_1946": { + "type": "column", + "column": "State", + "fields": null + }, + "Country_7437": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_3241": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_0652": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_6220": { + "type": "column", + "column": "Fax", + "fields": null + }, + "PostalCode_5249": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/62a63fc978464e22/expected.json b/test-snapshots/query/62a63fc978464e22/expected.json new file mode 100644 index 0000000..f559ffc --- /dev/null +++ b/test-snapshots/query/62a63fc978464e22/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_5943": 1, + "TrackId_9874": 3503 + }, + { + "PlaylistId_5943": 12, + "TrackId_9874": 3503 + }, + { + "PlaylistId_5943": 13, + "TrackId_9874": 3503 + }, + { + "PlaylistId_5943": 5, + "TrackId_9874": 3503 + }, + { + "PlaylistId_5943": 8, + "TrackId_9874": 3503 + }, + { + "PlaylistId_5943": 1, + "TrackId_9874": 3502 + }, + { + "PlaylistId_5943": 12, + "TrackId_9874": 3502 + }, + { + "PlaylistId_5943": 13, + "TrackId_9874": 3502 + }, + { + "PlaylistId_5943": 8, + "TrackId_9874": 3502 + }, + { + "PlaylistId_5943": 1, + "TrackId_9874": 3501 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62a63fc978464e22/request.json b/test-snapshots/query/62a63fc978464e22/request.json new file mode 100644 index 0000000..4cf60e9 --- /dev/null +++ b/test-snapshots/query/62a63fc978464e22/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_5943": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_9874": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/62a95c25d86e817e/expected.json b/test-snapshots/query/62a95c25d86e817e/expected.json new file mode 100644 index 0000000..0d86e56 --- /dev/null +++ b/test-snapshots/query/62a95c25d86e817e/expected.json @@ -0,0 +1,312 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 15, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 15, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 210, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 210, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 233, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 233, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 233, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 233, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 255, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 255, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 255, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 255, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 255, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 255, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 26, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 307, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 81, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 111, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 14, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 14, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_3905": 232, + "Quantity_1887": 1 + }, + { + "InvoiceId_3905": 232, + "Quantity_1887": 1 + } + ] + }, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62a95c25d86e817e/request.json b/test-snapshots/query/62a95c25d86e817e/request.json new file mode 100644 index 0000000..8a315e9 --- /dev/null +++ b/test-snapshots/query/62a95c25d86e817e/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId_3905": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Quantity_1887": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/62bc1fc9a6ee7046/expected.json b/test-snapshots/query/62bc1fc9a6ee7046/expected.json new file mode 100644 index 0000000..adeeafd --- /dev/null +++ b/test-snapshots/query/62bc1fc9a6ee7046/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "BirthDate_4084": "1968-01-09", + "City_3847": "Lethbridge", + "Country_6643": "Canada", + "EmployeeId_7830": 8, + "FirstName_6136": "Laura", + "HireDate_9113": "2004-03-04", + "Phone_6026": "+1 (403) 467-3351", + "ReportsTo_6873": 6, + "Title_3668": "IT Staff" + }, + { + "BirthDate_4084": "1958-12-08", + "City_3847": "Calgary", + "Country_6643": "Canada", + "EmployeeId_7830": 2, + "FirstName_6136": "Nancy", + "HireDate_9113": "2002-05-01", + "Phone_6026": "+1 (403) 262-3443", + "ReportsTo_6873": 1, + "Title_3668": "Sales Manager" + }, + { + "BirthDate_4084": "1965-03-03", + "City_3847": "Calgary", + "Country_6643": "Canada", + "EmployeeId_7830": 5, + "FirstName_6136": "Steve", + "HireDate_9113": "2003-10-17", + "Phone_6026": "1 (780) 836-9987", + "ReportsTo_6873": 2, + "Title_3668": "Sales Support Agent" + }, + { + "BirthDate_4084": "1947-09-19", + "City_3847": "Calgary", + "Country_6643": "Canada", + "EmployeeId_7830": 4, + "FirstName_6136": "Margaret", + "HireDate_9113": "2003-05-03", + "Phone_6026": "+1 (403) 263-4423", + "ReportsTo_6873": 2, + "Title_3668": "Sales Support Agent" + }, + { + "BirthDate_4084": "1970-05-29", + "City_3847": "Lethbridge", + "Country_6643": "Canada", + "EmployeeId_7830": 7, + "FirstName_6136": "Robert", + "HireDate_9113": "2004-01-02", + "Phone_6026": "+1 (403) 456-9986", + "ReportsTo_6873": 6, + "Title_3668": "IT Staff" + }, + { + "BirthDate_4084": "1973-07-01", + "City_3847": "Calgary", + "Country_6643": "Canada", + "EmployeeId_7830": 6, + "FirstName_6136": "Michael", + "HireDate_9113": "2003-10-17", + "Phone_6026": "+1 (403) 246-9887", + "ReportsTo_6873": 1, + "Title_3668": "IT Manager" + }, + { + "BirthDate_4084": "1962-02-18", + "City_3847": "Edmonton", + "Country_6643": "Canada", + "EmployeeId_7830": 1, + "FirstName_6136": "Andrew", + "HireDate_9113": "2002-08-14", + "Phone_6026": "+1 (780) 428-9482", + "ReportsTo_6873": null, + "Title_3668": "General Manager" + }, + { + "BirthDate_4084": "1973-08-29", + "City_3847": "Calgary", + "Country_6643": "Canada", + "EmployeeId_7830": 3, + "FirstName_6136": "Jane", + "HireDate_9113": "2002-04-01", + "Phone_6026": "+1 (403) 262-3443", + "ReportsTo_6873": 2, + "Title_3668": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62bc1fc9a6ee7046/request.json b/test-snapshots/query/62bc1fc9a6ee7046/request.json new file mode 100644 index 0000000..163c62f --- /dev/null +++ b/test-snapshots/query/62bc1fc9a6ee7046/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Phone_6026": { + "type": "column", + "column": "Phone", + "fields": null + }, + "BirthDate_4084": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_3847": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_6643": { + "type": "column", + "column": "Country", + "fields": null + }, + "ReportsTo_6873": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "EmployeeId_7830": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Title_3668": { + "type": "column", + "column": "Title", + "fields": null + }, + "FirstName_6136": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_9113": { + "type": "column", + "column": "HireDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/62d443ef98952a17/expected.json b/test-snapshots/query/62d443ef98952a17/expected.json new file mode 100644 index 0000000..9ceba10 --- /dev/null +++ b/test-snapshots/query/62d443ef98952a17/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 6596617, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 200724, + "Name": "Cold Day In The Sun", + "TrackId": 1007, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62d443ef98952a17/request.json b/test-snapshots/query/62d443ef98952a17/request.json new file mode 100644 index 0000000..c1cf2b7 --- /dev/null +++ b/test-snapshots/query/62d443ef98952a17/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1007 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/62d9d5fb97d17432/expected.json b/test-snapshots/query/62d9d5fb97d17432/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/62d9d5fb97d17432/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/62d9d5fb97d17432/request.json b/test-snapshots/query/62d9d5fb97d17432/request.json new file mode 100644 index 0000000..483f07e --- /dev/null +++ b/test-snapshots/query/62d9d5fb97d17432/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/636109b4bac22f5/expected.json b/test-snapshots/query/636109b4bac22f5/expected.json new file mode 100644 index 0000000..98aa65f --- /dev/null +++ b/test-snapshots/query/636109b4bac22f5/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_1231": 347, + "ArtistId_7205": 275 + }, + { + "AlbumId_1231": 346, + "ArtistId_7205": 274 + }, + { + "AlbumId_1231": 345, + "ArtistId_7205": 273 + }, + { + "AlbumId_1231": 344, + "ArtistId_7205": 272 + }, + { + "AlbumId_1231": 343, + "ArtistId_7205": 226 + }, + { + "AlbumId_1231": 342, + "ArtistId_7205": 271 + }, + { + "AlbumId_1231": 341, + "ArtistId_7205": 270 + }, + { + "AlbumId_1231": 340, + "ArtistId_7205": 269 + }, + { + "AlbumId_1231": 339, + "ArtistId_7205": 268 + }, + { + "AlbumId_1231": 338, + "ArtistId_7205": 267 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/636109b4bac22f5/request.json b/test-snapshots/query/636109b4bac22f5/request.json new file mode 100644 index 0000000..afc82b0 --- /dev/null +++ b/test-snapshots/query/636109b4bac22f5/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_1231": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_7205": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/639a840ede78a964/expected.json b/test-snapshots/query/639a840ede78a964/expected.json new file mode 100644 index 0000000..52e9531 --- /dev/null +++ b/test-snapshots/query/639a840ede78a964/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_0543": 347, + "ArtistId_3860": 275 + }, + { + "AlbumId_0543": 346, + "ArtistId_3860": 274 + }, + { + "AlbumId_0543": 345, + "ArtistId_3860": 273 + }, + { + "AlbumId_0543": 344, + "ArtistId_3860": 272 + }, + { + "AlbumId_0543": 343, + "ArtistId_3860": 226 + }, + { + "AlbumId_0543": 342, + "ArtistId_3860": 271 + }, + { + "AlbumId_0543": 341, + "ArtistId_3860": 270 + }, + { + "AlbumId_0543": 340, + "ArtistId_3860": 269 + }, + { + "AlbumId_0543": 339, + "ArtistId_3860": 268 + }, + { + "AlbumId_0543": 338, + "ArtistId_3860": 267 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/639a840ede78a964/request.json b/test-snapshots/query/639a840ede78a964/request.json new file mode 100644 index 0000000..48a6905 --- /dev/null +++ b/test-snapshots/query/639a840ede78a964/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_0543": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_3860": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/63b6363153cebf74/expected.json b/test-snapshots/query/63b6363153cebf74/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/63b6363153cebf74/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/63b6363153cebf74/request.json b/test-snapshots/query/63b6363153cebf74/request.json new file mode 100644 index 0000000..4dbf565 --- /dev/null +++ b/test-snapshots/query/63b6363153cebf74/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/63ba81fe74e5097f/expected.json b/test-snapshots/query/63ba81fe74e5097f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/63ba81fe74e5097f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/63ba81fe74e5097f/request.json b/test-snapshots/query/63ba81fe74e5097f/request.json new file mode 100644 index 0000000..323bf6c --- /dev/null +++ b/test-snapshots/query/63ba81fe74e5097f/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "andrew@chinookcorp.com" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/64236a149decc0b/expected.json b/test-snapshots/query/64236a149decc0b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/64236a149decc0b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/64236a149decc0b/request.json b/test-snapshots/query/64236a149decc0b/request.json new file mode 100644 index 0000000..629133b --- /dev/null +++ b/test-snapshots/query/64236a149decc0b/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tucson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Goyer" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/643251d8337218f2/expected.json b/test-snapshots/query/643251d8337218f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/643251d8337218f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/643251d8337218f2/request.json b/test-snapshots/query/643251d8337218f2/request.json new file mode 100644 index 0000000..e1d8797 --- /dev/null +++ b/test-snapshots/query/643251d8337218f2/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Goyer" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6450338e4bf1b716/expected.json b/test-snapshots/query/6450338e4bf1b716/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6450338e4bf1b716/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6450338e4bf1b716/request.json b/test-snapshots/query/6450338e4bf1b716/request.json new file mode 100644 index 0000000..a09b05e --- /dev/null +++ b/test-snapshots/query/6450338e4bf1b716/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "No Prayer For The Dying" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6477d2288170478b/expected.json b/test-snapshots/query/6477d2288170478b/expected.json new file mode 100644 index 0000000..06e034c --- /dev/null +++ b/test-snapshots/query/6477d2288170478b/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "City_count_5374": 59, + "SupportRepId_count_9779": 59, + "SupportRepId_min_8377": 3 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/6477d2288170478b/request.json b/test-snapshots/query/6477d2288170478b/request.json new file mode 100644 index 0000000..871e008 --- /dev/null +++ b/test-snapshots/query/6477d2288170478b/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "SupportRepId_min_8377": { + "type": "single_column", + "column": "SupportRepId", + "function": "min" + }, + "City_count_5374": { + "type": "single_column", + "column": "City", + "function": "count" + }, + "SupportRepId_count_9779": { + "type": "single_column", + "column": "SupportRepId", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/647fe55306ae5e6f/expected.json b/test-snapshots/query/647fe55306ae5e6f/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/647fe55306ae5e6f/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/647fe55306ae5e6f/request.json b/test-snapshots/query/647fe55306ae5e6f/request.json new file mode 100644 index 0000000..627402d --- /dev/null +++ b/test-snapshots/query/647fe55306ae5e6f/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/649953e737b59506/expected.json b/test-snapshots/query/649953e737b59506/expected.json new file mode 100644 index 0000000..09d6228 --- /dev/null +++ b/test-snapshots/query/649953e737b59506/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2013-03-05", + "InvoiceId_7292": 347, + "Total_3592": 8.91 + }, + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2012-07-05", + "InvoiceId_7292": 292, + "Total_3592": 13.86 + }, + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2012-05-25", + "InvoiceId_7292": 281, + "Total_3592": 1.98 + }, + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2010-12-02", + "InvoiceId_7292": 160, + "Total_3592": 0.99 + }, + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2010-04-13", + "InvoiceId_7292": 108, + "Total_3592": 5.94 + }, + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2010-01-09", + "InvoiceId_7292": 86, + "Total_3592": 3.96 + }, + { + "BillingAddress_2011": "Via Degli Scipioni, 43", + "BillingCity_3030": "Rome", + "BillingCountry_8635": "Italy", + "BillingPostalCode_2010": "00192", + "BillingState_4845": "RM", + "CustomerId_3507": 47, + "InvoiceDate_1237": "2009-10-07", + "InvoiceId_7292": 63, + "Total_3592": 1.98 + }, + { + "BillingAddress_2011": "Ullevålsveien 14", + "BillingCity_3030": "Oslo", + "BillingCountry_8635": "Norway", + "BillingPostalCode_2010": "0171", + "BillingState_4845": null, + "CustomerId_3507": 4, + "InvoiceDate_1237": "2013-10-03", + "InvoiceId_7292": 392, + "Total_3592": 1.98 + }, + { + "BillingAddress_2011": "Ullevålsveien 14", + "BillingCity_3030": "Oslo", + "BillingCountry_8635": "Norway", + "BillingPostalCode_2010": "0171", + "BillingState_4845": null, + "CustomerId_3507": 4, + "InvoiceDate_1237": "2012-02-27", + "InvoiceId_7292": 263, + "Total_3592": 8.91 + }, + { + "BillingAddress_2011": "Ullevålsveien 14", + "BillingCity_3030": "Oslo", + "BillingCountry_8635": "Norway", + "BillingPostalCode_2010": "0171", + "BillingState_4845": null, + "CustomerId_3507": 4, + "InvoiceDate_1237": "2011-06-29", + "InvoiceId_7292": 208, + "Total_3592": 15.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/649953e737b59506/request.json b/test-snapshots/query/649953e737b59506/request.json new file mode 100644 index 0000000..2a88456 --- /dev/null +++ b/test-snapshots/query/649953e737b59506/request.json @@ -0,0 +1,75 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_2011": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_3030": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_8635": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_2010": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_4845": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_3507": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_1237": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_7292": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_3592": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/64a9ea241f800ad2/expected.json b/test-snapshots/query/64a9ea241f800ad2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/64a9ea241f800ad2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/64a9ea241f800ad2/request.json b/test-snapshots/query/64a9ea241f800ad2/request.json new file mode 100644 index 0000000..9ec8b60 --- /dev/null +++ b/test-snapshots/query/64a9ea241f800ad2/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-12-13" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/64bf122b2973e66d/expected.json b/test-snapshots/query/64bf122b2973e66d/expected.json new file mode 100644 index 0000000..f5119ce --- /dev/null +++ b/test-snapshots/query/64bf122b2973e66d/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/64bf122b2973e66d/request.json b/test-snapshots/query/64bf122b2973e66d/request.json new file mode 100644 index 0000000..2b1cb81 --- /dev/null +++ b/test-snapshots/query/64bf122b2973e66d/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/64ca48bfad2663e4/expected.json b/test-snapshots/query/64ca48bfad2663e4/expected.json new file mode 100644 index 0000000..7dcee57 --- /dev/null +++ b/test-snapshots/query/64ca48bfad2663e4/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/64ca48bfad2663e4/request.json b/test-snapshots/query/64ca48bfad2663e4/request.json new file mode 100644 index 0000000..bf458c6 --- /dev/null +++ b/test-snapshots/query/64ca48bfad2663e4/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Gray" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/64e09e6d830f7ba5/expected.json b/test-snapshots/query/64e09e6d830f7ba5/expected.json new file mode 100644 index 0000000..cfe3131 --- /dev/null +++ b/test-snapshots/query/64e09e6d830f7ba5/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/64e09e6d830f7ba5/request.json b/test-snapshots/query/64e09e6d830f7ba5/request.json new file mode 100644 index 0000000..b54e8b5 --- /dev/null +++ b/test-snapshots/query/64e09e6d830f7ba5/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/64e57f6222173d83/expected.json b/test-snapshots/query/64e57f6222173d83/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/64e57f6222173d83/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/64e57f6222173d83/request.json b/test-snapshots/query/64e57f6222173d83/request.json new file mode 100644 index 0000000..b839fc3 --- /dev/null +++ b/test-snapshots/query/64e57f6222173d83/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "London" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/652e37608d113de7/expected.json b/test-snapshots/query/652e37608d113de7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/652e37608d113de7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/652e37608d113de7/request.json b/test-snapshots/query/652e37608d113de7/request.json new file mode 100644 index 0000000..857081b --- /dev/null +++ b/test-snapshots/query/652e37608d113de7/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8.91 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-12-13" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6559a717ec2826b9/expected.json b/test-snapshots/query/6559a717ec2826b9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6559a717ec2826b9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6559a717ec2826b9/request.json b/test-snapshots/query/6559a717ec2826b9/request.json new file mode 100644 index 0000000..bab57bb --- /dev/null +++ b/test-snapshots/query/6559a717ec2826b9/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "France" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "François" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/655aec5e969aa801/expected.json b/test-snapshots/query/655aec5e969aa801/expected.json new file mode 100644 index 0000000..f3cac41 --- /dev/null +++ b/test-snapshots/query/655aec5e969aa801/expected.json @@ -0,0 +1,302 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 10, + "TrackId": 2819 + }, + { + "PlaylistId": 10, + "TrackId": 2820 + }, + { + "PlaylistId": 10, + "TrackId": 2821 + }, + { + "PlaylistId": 10, + "TrackId": 2822 + }, + { + "PlaylistId": 10, + "TrackId": 2823 + }, + { + "PlaylistId": 10, + "TrackId": 2824 + }, + { + "PlaylistId": 10, + "TrackId": 2825 + }, + { + "PlaylistId": 10, + "TrackId": 2826 + }, + { + "PlaylistId": 10, + "TrackId": 2827 + }, + { + "PlaylistId": 10, + "TrackId": 2828 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 11, + "TrackId": 1088 + }, + { + "PlaylistId": 11, + "TrackId": 1093 + }, + { + "PlaylistId": 11, + "TrackId": 1099 + }, + { + "PlaylistId": 11, + "TrackId": 1105 + }, + { + "PlaylistId": 11, + "TrackId": 1514 + }, + { + "PlaylistId": 11, + "TrackId": 1518 + }, + { + "PlaylistId": 11, + "TrackId": 1519 + }, + { + "PlaylistId": 11, + "TrackId": 1916 + }, + { + "PlaylistId": 11, + "TrackId": 1921 + }, + { + "PlaylistId": 11, + "TrackId": 1928 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 12, + "TrackId": 3403 + }, + { + "PlaylistId": 12, + "TrackId": 3404 + }, + { + "PlaylistId": 12, + "TrackId": 3405 + }, + { + "PlaylistId": 12, + "TrackId": 3406 + }, + { + "PlaylistId": 12, + "TrackId": 3407 + }, + { + "PlaylistId": 12, + "TrackId": 3408 + }, + { + "PlaylistId": 12, + "TrackId": 3409 + }, + { + "PlaylistId": 12, + "TrackId": 3410 + }, + { + "PlaylistId": 12, + "TrackId": 3411 + }, + { + "PlaylistId": 12, + "TrackId": 3412 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 13, + "TrackId": 3479 + }, + { + "PlaylistId": 13, + "TrackId": 3480 + }, + { + "PlaylistId": 13, + "TrackId": 3481 + }, + { + "PlaylistId": 13, + "TrackId": 3482 + }, + { + "PlaylistId": 13, + "TrackId": 3483 + }, + { + "PlaylistId": 13, + "TrackId": 3484 + }, + { + "PlaylistId": 13, + "TrackId": 3485 + }, + { + "PlaylistId": 13, + "TrackId": 3486 + }, + { + "PlaylistId": 13, + "TrackId": 3487 + }, + { + "PlaylistId": 13, + "TrackId": 3488 + } + ] + } + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 14, + "TrackId": 3430 + }, + { + "PlaylistId": 14, + "TrackId": 3431 + }, + { + "PlaylistId": 14, + "TrackId": 3432 + }, + { + "PlaylistId": 14, + "TrackId": 3433 + }, + { + "PlaylistId": 14, + "TrackId": 3434 + }, + { + "PlaylistId": 14, + "TrackId": 3435 + }, + { + "PlaylistId": 14, + "TrackId": 3436 + }, + { + "PlaylistId": 14, + "TrackId": 3437 + }, + { + "PlaylistId": 14, + "TrackId": 3438 + }, + { + "PlaylistId": 14, + "TrackId": 3439 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/655aec5e969aa801/request.json b/test-snapshots/query/655aec5e969aa801/request.json new file mode 100644 index 0000000..82903ff --- /dev/null +++ b/test-snapshots/query/655aec5e969aa801/request.json @@ -0,0 +1,39 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/658a73762cfd4c40/expected.json b/test-snapshots/query/658a73762cfd4c40/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/658a73762cfd4c40/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/658a73762cfd4c40/request.json b/test-snapshots/query/658a73762cfd4c40/request.json new file mode 100644 index 0000000..d3e37ce --- /dev/null +++ b/test-snapshots/query/658a73762cfd4c40/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/65b18c5bfc87adb2/expected.json b/test-snapshots/query/65b18c5bfc87adb2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/65b18c5bfc87adb2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/65b18c5bfc87adb2/request.json b/test-snapshots/query/65b18c5bfc87adb2/request.json new file mode 100644 index 0000000..86afa7d --- /dev/null +++ b/test-snapshots/query/65b18c5bfc87adb2/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/65cdb5fc7b4de698/expected.json b/test-snapshots/query/65cdb5fc7b4de698/expected.json new file mode 100644 index 0000000..05387d0 --- /dev/null +++ b/test-snapshots/query/65cdb5fc7b4de698/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 115, + "Bytes": 10498031, + "Composer": "Bobby Byrd/James Brown/Ron Lenhoff", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 316551, + "Name": "Get Up (I Feel Like Being A) Sex Machine", + "TrackId": 1423, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 11183457, + "Composer": "Full Force/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 334236, + "Name": "I'm Real", + "TrackId": 1431, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4174420, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 127399, + "Name": "Papa's Got A Brand New Bag Pt.1", + "TrackId": 1418, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4711323, + "Composer": "Ted Wright", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 143725, + "Name": "Out Of Sight", + "TrackId": 1417, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5394585, + "Composer": "James Brown/Johnny Terry", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 165067, + "Name": "Please Please Please", + "TrackId": 1414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5468472, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "I Got You (I Feel Good)", + "TrackId": 1419, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5478117, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "Say It Loud, I'm Black And I'm Proud Pt.1", + "TrackId": 1422, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5513208, + "Composer": "Lowman Pauling", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 166739, + "Name": "Think", + "TrackId": 1415, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5541611, + "Composer": "Betty Newsome/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 168228, + "Name": "It's A Man's Man's Man's World", + "TrackId": 1420, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5643213, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 172408, + "Name": "Cold Sweat", + "TrackId": 1421, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/65cdb5fc7b4de698/request.json b/test-snapshots/query/65cdb5fc7b4de698/request.json new file mode 100644 index 0000000..42dfb70 --- /dev/null +++ b/test-snapshots/query/65cdb5fc7b4de698/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6646db7078c446db/expected.json b/test-snapshots/query/6646db7078c446db/expected.json new file mode 100644 index 0000000..9698449 --- /dev/null +++ b/test-snapshots/query/6646db7078c446db/expected.json @@ -0,0 +1,499 @@ +[ + { + "rows": [ + { + "FK_CustomerSupportRepId": { + "rows": [] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + } + }, + { + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6646db7078c446db/request.json b/test-snapshots/query/6646db7078c446db/request.json new file mode 100644 index 0000000..cabac43 --- /dev/null +++ b/test-snapshots/query/6646db7078c446db/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/664bc4dae4ee06bf/expected.json b/test-snapshots/query/664bc4dae4ee06bf/expected.json new file mode 100644 index 0000000..c09678e --- /dev/null +++ b/test-snapshots/query/664bc4dae4ee06bf/expected.json @@ -0,0 +1,72 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5881293, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 175333, + "Name": "Amor De Muito", + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7960868, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 240091, + "Name": "Sobremesa", + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/664bc4dae4ee06bf/request.json b/test-snapshots/query/664bc4dae4ee06bf/request.json new file mode 100644 index 0000000..f1dc051 --- /dev/null +++ b/test-snapshots/query/664bc4dae4ee06bf/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/665dc01b8a66bbc7/expected.json b/test-snapshots/query/665dc01b8a66bbc7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/665dc01b8a66bbc7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/665dc01b8a66bbc7/request.json b/test-snapshots/query/665dc01b8a66bbc7/request.json new file mode 100644 index 0000000..a7dc717 --- /dev/null +++ b/test-snapshots/query/665dc01b8a66bbc7/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/66794c13b6647252/expected.json b/test-snapshots/query/66794c13b6647252/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/66794c13b6647252/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/66794c13b6647252/request.json b/test-snapshots/query/66794c13b6647252/request.json new file mode 100644 index 0000000..0413531 --- /dev/null +++ b/test-snapshots/query/66794c13b6647252/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/667a16017dfe4977/expected.json b/test-snapshots/query/667a16017dfe4977/expected.json new file mode 100644 index 0000000..65b9938 --- /dev/null +++ b/test-snapshots/query/667a16017dfe4977/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_3154": 18 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + }, + { + "PlaylistId_3154": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/667a16017dfe4977/request.json b/test-snapshots/query/667a16017dfe4977/request.json new file mode 100644 index 0000000..f2cf4d6 --- /dev/null +++ b/test-snapshots/query/667a16017dfe4977/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_3154": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/667a4fc6b49e666a/expected.json b/test-snapshots/query/667a4fc6b49e666a/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/667a4fc6b49e666a/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/667a4fc6b49e666a/request.json b/test-snapshots/query/667a4fc6b49e666a/request.json new file mode 100644 index 0000000..e2fe2fc --- /dev/null +++ b/test-snapshots/query/667a4fc6b49e666a/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/668ce4b2f6a7a603/expected.json b/test-snapshots/query/668ce4b2f6a7a603/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/668ce4b2f6a7a603/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/668ce4b2f6a7a603/request.json b/test-snapshots/query/668ce4b2f6a7a603/request.json new file mode 100644 index 0000000..81571c7 --- /dev/null +++ b/test-snapshots/query/668ce4b2f6a7a603/request.json @@ -0,0 +1,139 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 1Y7" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Mitchell" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/66ac482cafa96978/expected.json b/test-snapshots/query/66ac482cafa96978/expected.json new file mode 100644 index 0000000..b6af38a --- /dev/null +++ b/test-snapshots/query/66ac482cafa96978/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 8, + "TrackId": 1000 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 8, + "TrackId": 1001 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 8, + "TrackId": 1002 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 8, + "TrackId": 1003 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 8, + "TrackId": 1004 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 8, + "TrackId": 1005 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 8, + "TrackId": 1006 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 8, + "TrackId": 1007 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 8, + "TrackId": 1008 + } + ] + }, + "GenreId_6255": 1, + "MediaTypeId_8460": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1009 + }, + { + "PlaylistId": 8, + "TrackId": 1009 + } + ] + }, + "GenreId_6255": 4, + "MediaTypeId_8460": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/66ac482cafa96978/request.json b/test-snapshots/query/66ac482cafa96978/request.json new file mode 100644 index 0000000..82f32a8 --- /dev/null +++ b/test-snapshots/query/66ac482cafa96978/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "MediaTypeId_8460": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "GenreId_6255": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/66b2b3966ee5ea67/expected.json b/test-snapshots/query/66b2b3966ee5ea67/expected.json new file mode 100644 index 0000000..5393d04 --- /dev/null +++ b/test-snapshots/query/66b2b3966ee5ea67/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Address_1729": "11120 Jasper Ave NW", + "City_9261": "Edmonton", + "Fax_3411": "+1 (780) 428-3457", + "FirstName_1924": "Andrew", + "HireDate_5573": "2002-08-14", + "Phone_3605": "+1 (780) 428-9482", + "ReportsTo_5703": null, + "Title_1060": "General Manager" + }, + { + "Address_1729": "923 7 ST NW", + "City_9261": "Lethbridge", + "Fax_3411": "+1 (403) 467-8772", + "FirstName_1924": "Laura", + "HireDate_5573": "2004-03-04", + "Phone_3605": "+1 (403) 467-3351", + "ReportsTo_5703": 6, + "Title_1060": "IT Staff" + }, + { + "Address_1729": "825 8 Ave SW", + "City_9261": "Calgary", + "Fax_3411": "+1 (403) 262-3322", + "FirstName_1924": "Nancy", + "HireDate_5573": "2002-05-01", + "Phone_3605": "+1 (403) 262-3443", + "ReportsTo_5703": 1, + "Title_1060": "Sales Manager" + }, + { + "Address_1729": "7727B 41 Ave", + "City_9261": "Calgary", + "Fax_3411": "1 (780) 836-9543", + "FirstName_1924": "Steve", + "HireDate_5573": "2003-10-17", + "Phone_3605": "1 (780) 836-9987", + "ReportsTo_5703": 2, + "Title_1060": "Sales Support Agent" + }, + { + "Address_1729": "590 Columbia Boulevard West", + "City_9261": "Lethbridge", + "Fax_3411": "+1 (403) 456-8485", + "FirstName_1924": "Robert", + "HireDate_5573": "2004-01-02", + "Phone_3605": "+1 (403) 456-9986", + "ReportsTo_5703": 6, + "Title_1060": "IT Staff" + }, + { + "Address_1729": "5827 Bowness Road NW", + "City_9261": "Calgary", + "Fax_3411": "+1 (403) 246-9899", + "FirstName_1924": "Michael", + "HireDate_5573": "2003-10-17", + "Phone_3605": "+1 (403) 246-9887", + "ReportsTo_5703": 1, + "Title_1060": "IT Manager" + }, + { + "Address_1729": "683 10 Street SW", + "City_9261": "Calgary", + "Fax_3411": "+1 (403) 263-4289", + "FirstName_1924": "Margaret", + "HireDate_5573": "2003-05-03", + "Phone_3605": "+1 (403) 263-4423", + "ReportsTo_5703": 2, + "Title_1060": "Sales Support Agent" + }, + { + "Address_1729": "1111 6 Ave SW", + "City_9261": "Calgary", + "Fax_3411": "+1 (403) 262-6712", + "FirstName_1924": "Jane", + "HireDate_5573": "2002-04-01", + "Phone_3605": "+1 (403) 262-3443", + "ReportsTo_5703": 2, + "Title_1060": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/66b2b3966ee5ea67/request.json b/test-snapshots/query/66b2b3966ee5ea67/request.json new file mode 100644 index 0000000..6608c58 --- /dev/null +++ b/test-snapshots/query/66b2b3966ee5ea67/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_1729": { + "type": "column", + "column": "Address", + "fields": null + }, + "HireDate_5573": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "City_9261": { + "type": "column", + "column": "City", + "fields": null + }, + "Phone_3605": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Title_1060": { + "type": "column", + "column": "Title", + "fields": null + }, + "ReportsTo_5703": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Fax_3411": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_1924": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/66b610bc61cb8396/expected.json b/test-snapshots/query/66b610bc61cb8396/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/66b610bc61cb8396/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/66b610bc61cb8396/request.json b/test-snapshots/query/66b610bc61cb8396/request.json new file mode 100644 index 0000000..db168cb --- /dev/null +++ b/test-snapshots/query/66b610bc61cb8396/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "C.O.D." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/66c4c5ebd01cedcb/expected.json b/test-snapshots/query/66c4c5ebd01cedcb/expected.json new file mode 100644 index 0000000..0e4d699 --- /dev/null +++ b/test-snapshots/query/66c4c5ebd01cedcb/expected.json @@ -0,0 +1,215 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {} + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {} + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {} + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/66c4c5ebd01cedcb/request.json b/test-snapshots/query/66c4c5ebd01cedcb/request.json new file mode 100644 index 0000000..a11c55f --- /dev/null +++ b/test-snapshots/query/66c4c5ebd01cedcb/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/66d03e2565d3d170/expected.json b/test-snapshots/query/66d03e2565d3d170/expected.json new file mode 100644 index 0000000..0042b31 --- /dev/null +++ b/test-snapshots/query/66d03e2565d3d170/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "Quantity_2352": 1, + "UnitPrice_2731": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/66d03e2565d3d170/request.json b/test-snapshots/query/66d03e2565d3d170/request.json new file mode 100644 index 0000000..baec07f --- /dev/null +++ b/test-snapshots/query/66d03e2565d3d170/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "UnitPrice_2731": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Quantity_2352": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6719e568aeff5ff1/expected.json b/test-snapshots/query/6719e568aeff5ff1/expected.json new file mode 100644 index 0000000..d3a5f46 --- /dev/null +++ b/test-snapshots/query/6719e568aeff5ff1/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_1249": 412, + "InvoiceLineId_1451": 2240, + "Quantity_7693": 1, + "TrackId_6355": 3177 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2226, + "Quantity_7693": 1, + "TrackId_6355": 3046 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2227, + "Quantity_7693": 1, + "TrackId_6355": 3055 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2228, + "Quantity_7693": 1, + "TrackId_6355": 3064 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2229, + "Quantity_7693": 1, + "TrackId_6355": 3073 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2230, + "Quantity_7693": 1, + "TrackId_6355": 3082 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2231, + "Quantity_7693": 1, + "TrackId_6355": 3091 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2232, + "Quantity_7693": 1, + "TrackId_6355": 3100 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2233, + "Quantity_7693": 1, + "TrackId_6355": 3109 + }, + { + "InvoiceId_1249": 411, + "InvoiceLineId_1451": 2234, + "Quantity_7693": 1, + "TrackId_6355": 3118 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6719e568aeff5ff1/request.json b/test-snapshots/query/6719e568aeff5ff1/request.json new file mode 100644 index 0000000..398b8aa --- /dev/null +++ b/test-snapshots/query/6719e568aeff5ff1/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_1249": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_1451": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_7693": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_6355": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/67253ce29dcf5c2e/expected.json b/test-snapshots/query/67253ce29dcf5c2e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/67253ce29dcf5c2e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/67253ce29dcf5c2e/request.json b/test-snapshots/query/67253ce29dcf5c2e/request.json new file mode 100644 index 0000000..a6bba81 --- /dev/null +++ b/test-snapshots/query/67253ce29dcf5c2e/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Gray" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "tgoyer@apple.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/67575a1bb0577ed9/expected.json b/test-snapshots/query/67575a1bb0577ed9/expected.json new file mode 100644 index 0000000..86ad783 --- /dev/null +++ b/test-snapshots/query/67575a1bb0577ed9/expected.json @@ -0,0 +1,32 @@ +[ + { + "aggregates": { + "Address_count": 59, + "Address_distinct_count": 59, + "City_count": 59, + "City_distinct_count": 53, + "Company_count": 10, + "Company_distinct_count": 10, + "Country_count": 59, + "Country_distinct_count": 24, + "CustomerId_count": 59, + "CustomerId_distinct_count": 59, + "Email_count": 59, + "Email_distinct_count": 59, + "Fax_count": 12, + "Fax_distinct_count": 12, + "FirstName_count": 59, + "FirstName_distinct_count": 56, + "LastName_count": 59, + "LastName_distinct_count": 59, + "Phone_count": 58, + "Phone_distinct_count": 58, + "PostalCode_count": 55, + "PostalCode_distinct_count": 55, + "State_count": 30, + "State_distinct_count": 25, + "SupportRepId_count": 59, + "SupportRepId_distinct_count": 3 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/67575a1bb0577ed9/request.json b/test-snapshots/query/67575a1bb0577ed9/request.json new file mode 100644 index 0000000..027c959 --- /dev/null +++ b/test-snapshots/query/67575a1bb0577ed9/request.json @@ -0,0 +1,140 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "Address_count": { + "type": "column_count", + "column": "Address", + "distinct": false + }, + "Address_distinct_count": { + "type": "column_count", + "column": "Address", + "distinct": true + }, + "City_count": { + "type": "column_count", + "column": "City", + "distinct": false + }, + "City_distinct_count": { + "type": "column_count", + "column": "City", + "distinct": true + }, + "Company_count": { + "type": "column_count", + "column": "Company", + "distinct": false + }, + "Company_distinct_count": { + "type": "column_count", + "column": "Company", + "distinct": true + }, + "Country_count": { + "type": "column_count", + "column": "Country", + "distinct": false + }, + "Country_distinct_count": { + "type": "column_count", + "column": "Country", + "distinct": true + }, + "CustomerId_count": { + "type": "column_count", + "column": "CustomerId", + "distinct": false + }, + "CustomerId_distinct_count": { + "type": "column_count", + "column": "CustomerId", + "distinct": true + }, + "Email_count": { + "type": "column_count", + "column": "Email", + "distinct": false + }, + "Email_distinct_count": { + "type": "column_count", + "column": "Email", + "distinct": true + }, + "Fax_count": { + "type": "column_count", + "column": "Fax", + "distinct": false + }, + "Fax_distinct_count": { + "type": "column_count", + "column": "Fax", + "distinct": true + }, + "FirstName_count": { + "type": "column_count", + "column": "FirstName", + "distinct": false + }, + "FirstName_distinct_count": { + "type": "column_count", + "column": "FirstName", + "distinct": true + }, + "LastName_count": { + "type": "column_count", + "column": "LastName", + "distinct": false + }, + "LastName_distinct_count": { + "type": "column_count", + "column": "LastName", + "distinct": true + }, + "Phone_count": { + "type": "column_count", + "column": "Phone", + "distinct": false + }, + "Phone_distinct_count": { + "type": "column_count", + "column": "Phone", + "distinct": true + }, + "PostalCode_count": { + "type": "column_count", + "column": "PostalCode", + "distinct": false + }, + "PostalCode_distinct_count": { + "type": "column_count", + "column": "PostalCode", + "distinct": true + }, + "State_count": { + "type": "column_count", + "column": "State", + "distinct": false + }, + "State_distinct_count": { + "type": "column_count", + "column": "State", + "distinct": true + }, + "SupportRepId_count": { + "type": "column_count", + "column": "SupportRepId", + "distinct": false + }, + "SupportRepId_distinct_count": { + "type": "column_count", + "column": "SupportRepId", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/67735f34e1e69deb/expected.json b/test-snapshots/query/67735f34e1e69deb/expected.json new file mode 100644 index 0000000..08267a4 --- /dev/null +++ b/test-snapshots/query/67735f34e1e69deb/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 8, + "Name": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/67735f34e1e69deb/request.json b/test-snapshots/query/67735f34e1e69deb/request.json new file mode 100644 index 0000000..885be77 --- /dev/null +++ b/test-snapshots/query/67735f34e1e69deb/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/677de052964c15fd/expected.json b/test-snapshots/query/677de052964c15fd/expected.json new file mode 100644 index 0000000..3548bb1 --- /dev/null +++ b/test-snapshots/query/677de052964c15fd/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_6825": "TV Shows", + "PlaylistId_0432": 3 + }, + { + "Name_6825": "TV Shows", + "PlaylistId_0432": 10 + }, + { + "Name_6825": "On-The-Go 1", + "PlaylistId_0432": 18 + }, + { + "Name_6825": "Music Videos", + "PlaylistId_0432": 9 + }, + { + "Name_6825": "Music", + "PlaylistId_0432": 1 + }, + { + "Name_6825": "Music", + "PlaylistId_0432": 8 + }, + { + "Name_6825": "Movies", + "PlaylistId_0432": 2 + }, + { + "Name_6825": "Movies", + "PlaylistId_0432": 7 + }, + { + "Name_6825": "Heavy Metal Classic", + "PlaylistId_0432": 17 + }, + { + "Name_6825": "Grunge", + "PlaylistId_0432": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/677de052964c15fd/request.json b/test-snapshots/query/677de052964c15fd/request.json new file mode 100644 index 0000000..93416ca --- /dev/null +++ b/test-snapshots/query/677de052964c15fd/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_6825": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_0432": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6782b82053367e14/expected.json b/test-snapshots/query/6782b82053367e14/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6782b82053367e14/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6782b82053367e14/request.json b/test-snapshots/query/6782b82053367e14/request.json new file mode 100644 index 0000000..4dcb6c2 --- /dev/null +++ b/test-snapshots/query/6782b82053367e14/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "margaret@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Adams" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/67a5e2468038bdf3/expected.json b/test-snapshots/query/67a5e2468038bdf3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/67a5e2468038bdf3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/67a5e2468038bdf3/request.json b/test-snapshots/query/67a5e2468038bdf3/request.json new file mode 100644 index 0000000..8e5f97b --- /dev/null +++ b/test-snapshots/query/67a5e2468038bdf3/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6840e10d66ee92bd/expected.json b/test-snapshots/query/6840e10d66ee92bd/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/6840e10d66ee92bd/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6840e10d66ee92bd/request.json b/test-snapshots/query/6840e10d66ee92bd/request.json new file mode 100644 index 0000000..6bcbe39 --- /dev/null +++ b/test-snapshots/query/6840e10d66ee92bd/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6854cf50d10dffd7/expected.json b/test-snapshots/query/6854cf50d10dffd7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6854cf50d10dffd7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6854cf50d10dffd7/request.json b/test-snapshots/query/6854cf50d10dffd7/request.json new file mode 100644 index 0000000..2451bde --- /dev/null +++ b/test-snapshots/query/6854cf50d10dffd7/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/686012b1df006e28/expected.json b/test-snapshots/query/686012b1df006e28/expected.json new file mode 100644 index 0000000..23e830f --- /dev/null +++ b/test-snapshots/query/686012b1df006e28/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_0829": 1, + "TrackId_1206": 1 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 2 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 3 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 4 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 5 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 6 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 7 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 8 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 9 + }, + { + "PlaylistId_0829": 1, + "TrackId_1206": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/686012b1df006e28/request.json b/test-snapshots/query/686012b1df006e28/request.json new file mode 100644 index 0000000..01106a3 --- /dev/null +++ b/test-snapshots/query/686012b1df006e28/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_0829": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_1206": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6862b3170a9b0e5b/expected.json b/test-snapshots/query/6862b3170a9b0e5b/expected.json new file mode 100644 index 0000000..c8264c2 --- /dev/null +++ b/test-snapshots/query/6862b3170a9b0e5b/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 275 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/6862b3170a9b0e5b/request.json b/test-snapshots/query/6862b3170a9b0e5b/request.json new file mode 100644 index 0000000..577aab4 --- /dev/null +++ b/test-snapshots/query/6862b3170a9b0e5b/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Artist", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6866512c3a1c9915/expected.json b/test-snapshots/query/6866512c3a1c9915/expected.json new file mode 100644 index 0000000..3c25d77 --- /dev/null +++ b/test-snapshots/query/6866512c3a1c9915/expected.json @@ -0,0 +1,70 @@ +[ + { + "rows": [ + { + "Address_8576": "7727B 41 Ave", + "BirthDate_6107": "1965-03-03", + "HireDate_5738": "2003-10-17", + "LastName_3933": "Johnson", + "State_3812": "AB", + "Title_5474": "Sales Support Agent" + }, + { + "Address_8576": "11120 Jasper Ave NW", + "BirthDate_6107": "1962-02-18", + "HireDate_5738": "2002-08-14", + "LastName_3933": "Adams", + "State_3812": "AB", + "Title_5474": "General Manager" + }, + { + "Address_8576": "923 7 ST NW", + "BirthDate_6107": "1968-01-09", + "HireDate_5738": "2004-03-04", + "LastName_3933": "Callahan", + "State_3812": "AB", + "Title_5474": "IT Staff" + }, + { + "Address_8576": "590 Columbia Boulevard West", + "BirthDate_6107": "1970-05-29", + "HireDate_5738": "2004-01-02", + "LastName_3933": "King", + "State_3812": "AB", + "Title_5474": "IT Staff" + }, + { + "Address_8576": "683 10 Street SW", + "BirthDate_6107": "1947-09-19", + "HireDate_5738": "2003-05-03", + "LastName_3933": "Park", + "State_3812": "AB", + "Title_5474": "Sales Support Agent" + }, + { + "Address_8576": "1111 6 Ave SW", + "BirthDate_6107": "1973-08-29", + "HireDate_5738": "2002-04-01", + "LastName_3933": "Peacock", + "State_3812": "AB", + "Title_5474": "Sales Support Agent" + }, + { + "Address_8576": "825 8 Ave SW", + "BirthDate_6107": "1958-12-08", + "HireDate_5738": "2002-05-01", + "LastName_3933": "Edwards", + "State_3812": "AB", + "Title_5474": "Sales Manager" + }, + { + "Address_8576": "5827 Bowness Road NW", + "BirthDate_6107": "1973-07-01", + "HireDate_5738": "2003-10-17", + "LastName_3933": "Mitchell", + "State_3812": "AB", + "Title_5474": "IT Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6866512c3a1c9915/request.json b/test-snapshots/query/6866512c3a1c9915/request.json new file mode 100644 index 0000000..2cbac19 --- /dev/null +++ b/test-snapshots/query/6866512c3a1c9915/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_8576": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_6107": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "Title_5474": { + "type": "column", + "column": "Title", + "fields": null + }, + "LastName_3933": { + "type": "column", + "column": "LastName", + "fields": null + }, + "State_3812": { + "type": "column", + "column": "State", + "fields": null + }, + "HireDate_5738": { + "type": "column", + "column": "HireDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/687a69b0d18f30f3/expected.json b/test-snapshots/query/687a69b0d18f30f3/expected.json new file mode 100644 index 0000000..e809809 --- /dev/null +++ b/test-snapshots/query/687a69b0d18f30f3/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/687a69b0d18f30f3/request.json b/test-snapshots/query/687a69b0d18f30f3/request.json new file mode 100644 index 0000000..fa34e4a --- /dev/null +++ b/test-snapshots/query/687a69b0d18f30f3/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/68a43c6be8b989f/expected.json b/test-snapshots/query/68a43c6be8b989f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/68a43c6be8b989f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/68a43c6be8b989f/request.json b/test-snapshots/query/68a43c6be8b989f/request.json new file mode 100644 index 0000000..029bd35 --- /dev/null +++ b/test-snapshots/query/68a43c6be8b989f/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/692115156dca2078/expected.json b/test-snapshots/query/692115156dca2078/expected.json new file mode 100644 index 0000000..d3cfec3 --- /dev/null +++ b/test-snapshots/query/692115156dca2078/expected.json @@ -0,0 +1,306 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 3, + "FirstName_7122": "Jane", + "LastName_4868": "Peacock", + "PostalCode_8724": "T2P 5M5", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 5, + "FirstName_7122": "Steve", + "LastName_4868": "Johnson", + "PostalCode_8724": "T3B 1Y7", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 4, + "FirstName_7122": "Margaret", + "LastName_4868": "Park", + "PostalCode_8724": "T2P 5G3", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 5, + "FirstName_7122": "Steve", + "LastName_4868": "Johnson", + "PostalCode_8724": "T3B 1Y7", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 5, + "FirstName_7122": "Steve", + "LastName_4868": "Johnson", + "PostalCode_8724": "T3B 1Y7", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 3, + "FirstName_7122": "Jane", + "LastName_4868": "Peacock", + "PostalCode_8724": "T2P 5M5", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 3, + "FirstName_7122": "Jane", + "LastName_4868": "Peacock", + "PostalCode_8724": "T2P 5M5", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 4, + "FirstName_7122": "Margaret", + "LastName_4868": "Park", + "PostalCode_8724": "T2P 5G3", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 3, + "FirstName_7122": "Jane", + "LastName_4868": "Peacock", + "PostalCode_8724": "T2P 5M5", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_5344": "Calgary", + "Country_2159": "Canada", + "EmployeeId_9279": 4, + "FirstName_7122": "Margaret", + "LastName_4868": "Park", + "PostalCode_8724": "T2P 5G3", + "ReportsTo_5549": 2, + "State_3364": "AB", + "Title_5450": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/692115156dca2078/request.json b/test-snapshots/query/692115156dca2078/request.json new file mode 100644 index 0000000..1b82648 --- /dev/null +++ b/test-snapshots/query/692115156dca2078/request.json @@ -0,0 +1,139 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "PostalCode_8724": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_5549": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "City_5344": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2159": { + "type": "column", + "column": "Country", + "fields": null + }, + "LastName_4868": { + "type": "column", + "column": "LastName", + "fields": null + }, + "EmployeeId_9279": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "State_3364": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_7122": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Title_5450": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/693a8643a0f8e61d/expected.json b/test-snapshots/query/693a8643a0f8e61d/expected.json new file mode 100644 index 0000000..1e0c083 --- /dev/null +++ b/test-snapshots/query/693a8643a0f8e61d/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/693a8643a0f8e61d/request.json b/test-snapshots/query/693a8643a0f8e61d/request.json new file mode 100644 index 0000000..04aed44 --- /dev/null +++ b/test-snapshots/query/693a8643a0f8e61d/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/69558c0481955e5a/expected.json b/test-snapshots/query/69558c0481955e5a/expected.json new file mode 100644 index 0000000..755aeea --- /dev/null +++ b/test-snapshots/query/69558c0481955e5a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_5434": "Music" + }, + { + "Name_5434": "Movies" + }, + { + "Name_5434": "TV Shows" + }, + { + "Name_5434": "Audiobooks" + }, + { + "Name_5434": "90’s Music" + }, + { + "Name_5434": "Audiobooks" + }, + { + "Name_5434": "Movies" + }, + { + "Name_5434": "Music" + }, + { + "Name_5434": "Music Videos" + }, + { + "Name_5434": "TV Shows" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/69558c0481955e5a/request.json b/test-snapshots/query/69558c0481955e5a/request.json new file mode 100644 index 0000000..ce2ab6b --- /dev/null +++ b/test-snapshots/query/69558c0481955e5a/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_5434": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/695ff110cdefe868/expected.json b/test-snapshots/query/695ff110cdefe868/expected.json new file mode 100644 index 0000000..f2854f6 --- /dev/null +++ b/test-snapshots/query/695ff110cdefe868/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/695ff110cdefe868/request.json b/test-snapshots/query/695ff110cdefe868/request.json new file mode 100644 index 0000000..9bbc328 --- /dev/null +++ b/test-snapshots/query/695ff110cdefe868/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6987362c4379fc3a/expected.json b/test-snapshots/query/6987362c4379fc3a/expected.json new file mode 100644 index 0000000..ebd6b34 --- /dev/null +++ b/test-snapshots/query/6987362c4379fc3a/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "ArtistId_4302": 1, + "Title_5616": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6987362c4379fc3a/request.json b/test-snapshots/query/6987362c4379fc3a/request.json new file mode 100644 index 0000000..5323958 --- /dev/null +++ b/test-snapshots/query/6987362c4379fc3a/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "Title_5616": { + "type": "column", + "column": "Title", + "fields": null + }, + "ArtistId_4302": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/699c4bc31465c926/expected.json b/test-snapshots/query/699c4bc31465c926/expected.json new file mode 100644 index 0000000..9243d0e --- /dev/null +++ b/test-snapshots/query/699c4bc31465c926/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "Address_min_6317": "1 Infinite Loop", + "Fax_min_4381": "+1 (212) 221-4679", + "PostalCode_min_2912": "00-358" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/699c4bc31465c926/request.json b/test-snapshots/query/699c4bc31465c926/request.json new file mode 100644 index 0000000..df194a2 --- /dev/null +++ b/test-snapshots/query/699c4bc31465c926/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "PostalCode_min_2912": { + "type": "single_column", + "column": "PostalCode", + "function": "min" + }, + "Address_min_6317": { + "type": "single_column", + "column": "Address", + "function": "min" + }, + "Fax_min_4381": { + "type": "single_column", + "column": "Fax", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/69d3a2616a4a7910/expected.json b/test-snapshots/query/69d3a2616a4a7910/expected.json new file mode 100644 index 0000000..ae73120 --- /dev/null +++ b/test-snapshots/query/69d3a2616a4a7910/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_0999": 347, + "ArtistId_8540": 275 + }, + { + "AlbumId_0999": 346, + "ArtistId_8540": 274 + }, + { + "AlbumId_0999": 345, + "ArtistId_8540": 273 + }, + { + "AlbumId_0999": 344, + "ArtistId_8540": 272 + }, + { + "AlbumId_0999": 342, + "ArtistId_8540": 271 + }, + { + "AlbumId_0999": 341, + "ArtistId_8540": 270 + }, + { + "AlbumId_0999": 340, + "ArtistId_8540": 269 + }, + { + "AlbumId_0999": 339, + "ArtistId_8540": 268 + }, + { + "AlbumId_0999": 338, + "ArtistId_8540": 267 + }, + { + "AlbumId_0999": 337, + "ArtistId_8540": 266 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/69d3a2616a4a7910/request.json b/test-snapshots/query/69d3a2616a4a7910/request.json new file mode 100644 index 0000000..225fbb5 --- /dev/null +++ b/test-snapshots/query/69d3a2616a4a7910/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_0999": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_8540": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/69da2481c37656f2/expected.json b/test-snapshots/query/69da2481c37656f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/69da2481c37656f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/69da2481c37656f2/request.json b/test-snapshots/query/69da2481c37656f2/request.json new file mode 100644 index 0000000..5ac9dca --- /dev/null +++ b/test-snapshots/query/69da2481c37656f2/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/69f30774ba4b96b8/expected.json b/test-snapshots/query/69f30774ba4b96b8/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/69f30774ba4b96b8/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/69f30774ba4b96b8/request.json b/test-snapshots/query/69f30774ba4b96b8/request.json new file mode 100644 index 0000000..2d783f6 --- /dev/null +++ b/test-snapshots/query/69f30774ba4b96b8/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6a37a163755e1dfb/expected.json b/test-snapshots/query/6a37a163755e1dfb/expected.json new file mode 100644 index 0000000..1e0c083 --- /dev/null +++ b/test-snapshots/query/6a37a163755e1dfb/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a37a163755e1dfb/request.json b/test-snapshots/query/6a37a163755e1dfb/request.json new file mode 100644 index 0000000..0959ed4 --- /dev/null +++ b/test-snapshots/query/6a37a163755e1dfb/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6a459d75a881c38b/expected.json b/test-snapshots/query/6a459d75a881c38b/expected.json new file mode 100644 index 0000000..9da5abf --- /dev/null +++ b/test-snapshots/query/6a459d75a881c38b/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 5881293, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 175333, + "Name": "Amor De Muito", + "TrackId": 264, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a459d75a881c38b/request.json b/test-snapshots/query/6a459d75a881c38b/request.json new file mode 100644 index 0000000..b36884d --- /dev/null +++ b/test-snapshots/query/6a459d75a881c38b/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 49 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6a659fc438bb0502/expected.json b/test-snapshots/query/6a659fc438bb0502/expected.json new file mode 100644 index 0000000..c522dfe --- /dev/null +++ b/test-snapshots/query/6a659fc438bb0502/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a659fc438bb0502/request.json b/test-snapshots/query/6a659fc438bb0502/request.json new file mode 100644 index 0000000..83b54a8 --- /dev/null +++ b/test-snapshots/query/6a659fc438bb0502/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6a6b339df9a90c8f/expected.json b/test-snapshots/query/6a6b339df9a90c8f/expected.json new file mode 100644 index 0000000..48734b3 --- /dev/null +++ b/test-snapshots/query/6a6b339df9a90c8f/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_5079": 1, + "Name_6292": "MPEG audio file" + }, + { + "MediaTypeId_5079": 2, + "Name_6292": "Protected AAC audio file" + }, + { + "MediaTypeId_5079": 3, + "Name_6292": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_5079": 4, + "Name_6292": "Purchased AAC audio file" + }, + { + "MediaTypeId_5079": 5, + "Name_6292": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a6b339df9a90c8f/request.json b/test-snapshots/query/6a6b339df9a90c8f/request.json new file mode 100644 index 0000000..1ed6f24 --- /dev/null +++ b/test-snapshots/query/6a6b339df9a90c8f/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_5079": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_6292": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6a6ee20c29e51669/expected.json b/test-snapshots/query/6a6ee20c29e51669/expected.json new file mode 100644 index 0000000..24ee8c6 --- /dev/null +++ b/test-snapshots/query/6a6ee20c29e51669/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 5 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a6ee20c29e51669/request.json b/test-snapshots/query/6a6ee20c29e51669/request.json new file mode 100644 index 0000000..093064f --- /dev/null +++ b/test-snapshots/query/6a6ee20c29e51669/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6a75a01e910b435b/expected.json b/test-snapshots/query/6a75a01e910b435b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6a75a01e910b435b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a75a01e910b435b/request.json b/test-snapshots/query/6a75a01e910b435b/request.json new file mode 100644 index 0000000..9878013 --- /dev/null +++ b/test-snapshots/query/6a75a01e910b435b/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6a85ec1e0b639a51/expected.json b/test-snapshots/query/6a85ec1e0b639a51/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6a85ec1e0b639a51/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6a85ec1e0b639a51/request.json b/test-snapshots/query/6a85ec1e0b639a51/request.json new file mode 100644 index 0000000..da35c2a --- /dev/null +++ b/test-snapshots/query/6a85ec1e0b639a51/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 2T3" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Adams" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6ad28004ece8ed96/expected.json b/test-snapshots/query/6ad28004ece8ed96/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6ad28004ece8ed96/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6ad28004ece8ed96/request.json b/test-snapshots/query/6ad28004ece8ed96/request.json new file mode 100644 index 0000000..10a869e --- /dev/null +++ b/test-snapshots/query/6ad28004ece8ed96/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 9 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6b10a10de34b906f/expected.json b/test-snapshots/query/6b10a10de34b906f/expected.json new file mode 100644 index 0000000..900eca7 --- /dev/null +++ b/test-snapshots/query/6b10a10de34b906f/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 10 + }, + { + "PlaylistId": 1, + "TrackId": 11 + }, + { + "PlaylistId": 1, + "TrackId": 12 + }, + { + "PlaylistId": 1, + "TrackId": 13 + }, + { + "PlaylistId": 1, + "TrackId": 14 + }, + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 1, + "TrackId": 6 + }, + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 1, + "TrackId": 8 + }, + { + "PlaylistId": 1, + "TrackId": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b10a10de34b906f/request.json b/test-snapshots/query/6b10a10de34b906f/request.json new file mode 100644 index 0000000..b34cb7a --- /dev/null +++ b/test-snapshots/query/6b10a10de34b906f/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6b17e5c9003483c/expected.json b/test-snapshots/query/6b17e5c9003483c/expected.json new file mode 100644 index 0000000..c8d79c2 --- /dev/null +++ b/test-snapshots/query/6b17e5c9003483c/expected.json @@ -0,0 +1,603 @@ +[ + { + "rows": [ + { + "Address_9988": "1111 6 Ave SW", + "BirthDate_8746": "1973-08-29", + "City_8471": "Calgary", + "Country_5032": "Canada", + "Email_4131": "jane@chinookcorp.com", + "EmployeeId_5164": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + }, + "Fax_3640": "+1 (403) 262-6712", + "FirstName_4510": "Jane", + "HireDate_7023": "2002-04-01", + "Phone_1464": "+1 (403) 262-3443", + "PostalCode_8635": "T2P 5M5", + "State_8755": "AB", + "Title_2886": "Sales Support Agent" + }, + { + "Address_9988": "11120 Jasper Ave NW", + "BirthDate_8746": "1962-02-18", + "City_8471": "Edmonton", + "Country_5032": "Canada", + "Email_4131": "andrew@chinookcorp.com", + "EmployeeId_5164": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_3640": "+1 (780) 428-3457", + "FirstName_4510": "Andrew", + "HireDate_7023": "2002-08-14", + "Phone_1464": "+1 (780) 428-9482", + "PostalCode_8635": "T5K 2N1", + "State_8755": "AB", + "Title_2886": "General Manager" + }, + { + "Address_9988": "5827 Bowness Road NW", + "BirthDate_8746": "1973-07-01", + "City_8471": "Calgary", + "Country_5032": "Canada", + "Email_4131": "michael@chinookcorp.com", + "EmployeeId_5164": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_3640": "+1 (403) 246-9899", + "FirstName_4510": "Michael", + "HireDate_7023": "2003-10-17", + "Phone_1464": "+1 (403) 246-9887", + "PostalCode_8635": "T3B 0C5", + "State_8755": "AB", + "Title_2886": "IT Manager" + }, + { + "Address_9988": "590 Columbia Boulevard West", + "BirthDate_8746": "1970-05-29", + "City_8471": "Lethbridge", + "Country_5032": "Canada", + "Email_4131": "robert@chinookcorp.com", + "EmployeeId_5164": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_3640": "+1 (403) 456-8485", + "FirstName_4510": "Robert", + "HireDate_7023": "2004-01-02", + "Phone_1464": "+1 (403) 456-9986", + "PostalCode_8635": "T1K 5N8", + "State_8755": "AB", + "Title_2886": "IT Staff" + }, + { + "Address_9988": "683 10 Street SW", + "BirthDate_8746": "1947-09-19", + "City_8471": "Calgary", + "Country_5032": "Canada", + "Email_4131": "margaret@chinookcorp.com", + "EmployeeId_5164": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + }, + "Fax_3640": "+1 (403) 263-4289", + "FirstName_4510": "Margaret", + "HireDate_7023": "2003-05-03", + "Phone_1464": "+1 (403) 263-4423", + "PostalCode_8635": "T2P 5G3", + "State_8755": "AB", + "Title_2886": "Sales Support Agent" + }, + { + "Address_9988": "7727B 41 Ave", + "BirthDate_8746": "1965-03-03", + "City_8471": "Calgary", + "Country_5032": "Canada", + "Email_4131": "steve@chinookcorp.com", + "EmployeeId_5164": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + }, + "Fax_3640": "1 (780) 836-9543", + "FirstName_4510": "Steve", + "HireDate_7023": "2003-10-17", + "Phone_1464": "1 (780) 836-9987", + "PostalCode_8635": "T3B 1Y7", + "State_8755": "AB", + "Title_2886": "Sales Support Agent" + }, + { + "Address_9988": "825 8 Ave SW", + "BirthDate_8746": "1958-12-08", + "City_8471": "Calgary", + "Country_5032": "Canada", + "Email_4131": "nancy@chinookcorp.com", + "EmployeeId_5164": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_3640": "+1 (403) 262-3322", + "FirstName_4510": "Nancy", + "HireDate_7023": "2002-05-01", + "Phone_1464": "+1 (403) 262-3443", + "PostalCode_8635": "T2P 2T3", + "State_8755": "AB", + "Title_2886": "Sales Manager" + }, + { + "Address_9988": "923 7 ST NW", + "BirthDate_8746": "1968-01-09", + "City_8471": "Lethbridge", + "Country_5032": "Canada", + "Email_4131": "laura@chinookcorp.com", + "EmployeeId_5164": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_3640": "+1 (403) 467-8772", + "FirstName_4510": "Laura", + "HireDate_7023": "2004-03-04", + "Phone_1464": "+1 (403) 467-3351", + "PostalCode_8635": "T1H 1Y8", + "State_8755": "AB", + "Title_2886": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b17e5c9003483c/request.json b/test-snapshots/query/6b17e5c9003483c/request.json new file mode 100644 index 0000000..fdebc1e --- /dev/null +++ b/test-snapshots/query/6b17e5c9003483c/request.json @@ -0,0 +1,159 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_9988": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_8746": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_8471": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_5032": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_4131": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_5164": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_3640": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_4510": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_7023": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Title_2886": { + "type": "column", + "column": "Title", + "fields": null + }, + "Phone_1464": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_8635": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_8755": { + "type": "column", + "column": "State", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6b234417c5308260/expected.json b/test-snapshots/query/6b234417c5308260/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6b234417c5308260/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b234417c5308260/request.json b/test-snapshots/query/6b234417c5308260/request.json new file mode 100644 index 0000000..020e796 --- /dev/null +++ b/test-snapshots/query/6b234417c5308260/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Park" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6b31f8eecced6296/expected.json b/test-snapshots/query/6b31f8eecced6296/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/6b31f8eecced6296/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b31f8eecced6296/request.json b/test-snapshots/query/6b31f8eecced6296/request.json new file mode 100644 index 0000000..28a023b --- /dev/null +++ b/test-snapshots/query/6b31f8eecced6296/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6b8cfea1afbc4079/expected.json b/test-snapshots/query/6b8cfea1afbc4079/expected.json new file mode 100644 index 0000000..a95fc1d --- /dev/null +++ b/test-snapshots/query/6b8cfea1afbc4079/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b8cfea1afbc4079/request.json b/test-snapshots/query/6b8cfea1afbc4079/request.json new file mode 100644 index 0000000..8ba8f68 --- /dev/null +++ b/test-snapshots/query/6b8cfea1afbc4079/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 252 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6b8de1e5e54540af/expected.json b/test-snapshots/query/6b8de1e5e54540af/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/6b8de1e5e54540af/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b8de1e5e54540af/request.json b/test-snapshots/query/6b8de1e5e54540af/request.json new file mode 100644 index 0000000..4097d43 --- /dev/null +++ b/test-snapshots/query/6b8de1e5e54540af/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6b8f2ac34665d234/expected.json b/test-snapshots/query/6b8f2ac34665d234/expected.json new file mode 100644 index 0000000..a00eeb1 --- /dev/null +++ b/test-snapshots/query/6b8f2ac34665d234/expected.json @@ -0,0 +1,48 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6b8f2ac34665d234/request.json b/test-snapshots/query/6b8f2ac34665d234/request.json new file mode 100644 index 0000000..47b2d39 --- /dev/null +++ b/test-snapshots/query/6b8f2ac34665d234/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6bc05a29cf84ea9d/expected.json b/test-snapshots/query/6bc05a29cf84ea9d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6bc05a29cf84ea9d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6bc05a29cf84ea9d/request.json b/test-snapshots/query/6bc05a29cf84ea9d/request.json new file mode 100644 index 0000000..76ff9ab --- /dev/null +++ b/test-snapshots/query/6bc05a29cf84ea9d/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6be268ac96778913/expected.json b/test-snapshots/query/6be268ac96778913/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6be268ac96778913/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6be268ac96778913/request.json b/test-snapshots/query/6be268ac96778913/request.json new file mode 100644 index 0000000..3dc4743 --- /dev/null +++ b/test-snapshots/query/6be268ac96778913/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Snowballed" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 270863 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6c029db5eb0e3a52/expected.json b/test-snapshots/query/6c029db5eb0e3a52/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6c029db5eb0e3a52/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c029db5eb0e3a52/request.json b/test-snapshots/query/6c029db5eb0e3a52/request.json new file mode 100644 index 0000000..91dd2e1 --- /dev/null +++ b/test-snapshots/query/6c029db5eb0e3a52/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6c0c47c2eb86185f/expected.json b/test-snapshots/query/6c0c47c2eb86185f/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/6c0c47c2eb86185f/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c0c47c2eb86185f/request.json b/test-snapshots/query/6c0c47c2eb86185f/request.json new file mode 100644 index 0000000..64d6082 --- /dev/null +++ b/test-snapshots/query/6c0c47c2eb86185f/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6c121b14b867b4f3/expected.json b/test-snapshots/query/6c121b14b867b4f3/expected.json new file mode 100644 index 0000000..e7a9692 --- /dev/null +++ b/test-snapshots/query/6c121b14b867b4f3/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c121b14b867b4f3/request.json b/test-snapshots/query/6c121b14b867b4f3/request.json new file mode 100644 index 0000000..9ef5eaf --- /dev/null +++ b/test-snapshots/query/6c121b14b867b4f3/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6c35fa408edf1c99/expected.json b/test-snapshots/query/6c35fa408edf1c99/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/6c35fa408edf1c99/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c35fa408edf1c99/request.json b/test-snapshots/query/6c35fa408edf1c99/request.json new file mode 100644 index 0000000..d4ec0e4 --- /dev/null +++ b/test-snapshots/query/6c35fa408edf1c99/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6c363c0f7e0d3f4/expected.json b/test-snapshots/query/6c363c0f7e0d3f4/expected.json new file mode 100644 index 0000000..5a3225c --- /dev/null +++ b/test-snapshots/query/6c363c0f7e0d3f4/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "AlbumId_9059": 137 + }, + { + "AlbumId_9059": 50 + }, + { + "AlbumId_9059": 127 + }, + { + "AlbumId_9059": 198 + }, + { + "AlbumId_9059": 198 + }, + { + "AlbumId_9059": 50 + }, + { + "AlbumId_9059": 49 + }, + { + "AlbumId_9059": 197 + }, + { + "AlbumId_9059": 208 + }, + { + "AlbumId_9059": 138 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c363c0f7e0d3f4/request.json b/test-snapshots/query/6c363c0f7e0d3f4/request.json new file mode 100644 index 0000000..59844b1 --- /dev/null +++ b/test-snapshots/query/6c363c0f7e0d3f4/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_9059": { + "type": "column", + "column": "AlbumId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6c42ad19e234e1d5/expected.json b/test-snapshots/query/6c42ad19e234e1d5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6c42ad19e234e1d5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c42ad19e234e1d5/request.json b/test-snapshots/query/6c42ad19e234e1d5/request.json new file mode 100644 index 0000000..0117dd8 --- /dev/null +++ b/test-snapshots/query/6c42ad19e234e1d5/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6c63f16dd74376cb/expected.json b/test-snapshots/query/6c63f16dd74376cb/expected.json new file mode 100644 index 0000000..4342b72 --- /dev/null +++ b/test-snapshots/query/6c63f16dd74376cb/expected.json @@ -0,0 +1,429 @@ +[ + { + "rows": [ + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2009-03-04", + "InvoiceId_2797": 15, + "Total_3353": 1.98 + }, + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2011-07-20", + "InvoiceId_2797": 210, + "Total_3353": 1.98 + }, + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2011-10-22", + "InvoiceId_2797": 233, + "Total_3353": 3.96 + }, + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1377, + "Quantity": 1, + "TrackId": 1370, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1378, + "Quantity": 1, + "TrackId": 1374, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1379, + "Quantity": 1, + "TrackId": 1378, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1380, + "Quantity": 1, + "TrackId": 1382, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2012-01-24", + "InvoiceId_2797": 255, + "Total_3353": 5.94 + }, + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 144, + "Quantity": 1, + "TrackId": 867, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 145, + "Quantity": 1, + "TrackId": 876, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2009-04-14", + "InvoiceId_2797": 26, + "Total_3353": 13.86 + }, + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 307, + "InvoiceLineId": 1670, + "Quantity": 1, + "TrackId": 3200, + "UnitPrice": 1.99 + } + ] + }, + "InvoiceDate_5998": "2012-09-13", + "InvoiceId_2797": 307, + "Total_3353": 1.99 + }, + { + "BillingAddress_4895": "1 Infinite Loop", + "BillingCity_4866": "Cupertino", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "95014", + "BillingState_6412": "CA", + "CustomerId_2471": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 81, + "InvoiceLineId": 431, + "Quantity": 1, + "TrackId": 2594, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 432, + "Quantity": 1, + "TrackId": 2600, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 433, + "Quantity": 1, + "TrackId": 2606, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 434, + "Quantity": 1, + "TrackId": 2612, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 435, + "Quantity": 1, + "TrackId": 2618, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 436, + "Quantity": 1, + "TrackId": 2624, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 437, + "Quantity": 1, + "TrackId": 2630, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 438, + "Quantity": 1, + "TrackId": 2636, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 439, + "Quantity": 1, + "TrackId": 2642, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2009-12-13", + "InvoiceId_2797": 81, + "Total_3353": 8.91 + }, + { + "BillingAddress_4895": "1 Microsoft Way", + "BillingCity_4866": "Redmond", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "98052-8300", + "BillingState_6412": "WA", + "CustomerId_2471": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2010-04-29", + "InvoiceId_2797": 111, + "Total_3353": 0.99 + }, + { + "BillingAddress_4895": "1 Microsoft Way", + "BillingCity_4866": "Redmond", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "98052-8300", + "BillingState_6412": "WA", + "CustomerId_2471": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2009-03-04", + "InvoiceId_2797": 14, + "Total_3353": 1.98 + }, + { + "BillingAddress_4895": "1 Microsoft Way", + "BillingCity_4866": "Redmond", + "BillingCountry_0131": "USA", + "BillingPostalCode_4862": "98052-8300", + "BillingState_6412": "WA", + "CustomerId_2471": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_5998": "2011-10-21", + "InvoiceId_2797": 232, + "Total_3353": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c63f16dd74376cb/request.json b/test-snapshots/query/6c63f16dd74376cb/request.json new file mode 100644 index 0000000..c7ef19b --- /dev/null +++ b/test-snapshots/query/6c63f16dd74376cb/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_4895": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_4866": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_0131": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_4862": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_6412": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_2471": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_5998": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_2797": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_3353": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6c6fe40c98618fb3/expected.json b/test-snapshots/query/6c6fe40c98618fb3/expected.json new file mode 100644 index 0000000..e546971 --- /dev/null +++ b/test-snapshots/query/6c6fe40c98618fb3/expected.json @@ -0,0 +1,589 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_3916": "1 Infinite Loop", + "City_8925": "Cupertino", + "Company_7187": "Apple Inc.", + "Country_6963": "USA", + "Email_8365": "tgoyer@apple.com", + "Fax_1833": "+1 (408) 996-1011", + "FirstName_3040": "Tim", + "LastName_6046": "Goyer", + "Phone_1455": "+1 (408) 996-1010", + "PostalCode_3714": "95014", + "State_6902": "CA", + "SupportRepId_6639": 3 + }, + { + "Address_3916": "113 Lupus St", + "City_8925": "London", + "Company_7187": null, + "Country_6963": "United Kingdom", + "Email_8365": "phil.hughes@gmail.com", + "Fax_1833": null, + "FirstName_3040": "Phil", + "LastName_6046": "Hughes", + "Phone_1455": "+44 020 7976 5722", + "PostalCode_3714": "SW1V 3EN", + "State_6902": null, + "SupportRepId_6639": 3 + }, + { + "Address_3916": "12,Community Centre", + "City_8925": "Delhi", + "Company_7187": null, + "Country_6963": "India", + "Email_8365": "manoj.pareek@rediff.com", + "Fax_1833": null, + "FirstName_3040": "Manoj", + "LastName_6046": "Pareek", + "Phone_1455": "+91 0124 39883988", + "PostalCode_3714": "110017", + "State_6902": null, + "SupportRepId_6639": 3 + }, + { + "Address_3916": "1498 rue Bélanger", + "City_8925": "Montréal", + "Company_7187": null, + "Country_6963": "Canada", + "Email_8365": "ftremblay@gmail.com", + "Fax_1833": null, + "FirstName_3040": "François", + "LastName_6046": "Tremblay", + "Phone_1455": "+1 (514) 721-4711", + "PostalCode_3714": "H2G 1A7", + "State_6902": "QC", + "SupportRepId_6639": 3 + }, + { + "Address_3916": "162 E Superior Street", + "City_8925": "Chicago", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "fralston@gmail.com", + "Fax_1833": null, + "FirstName_3040": "Frank", + "LastName_6046": "Ralston", + "Phone_1455": "+1 (312) 332-3232", + "PostalCode_3714": "60611", + "State_6902": "IL", + "SupportRepId_6639": 3 + }, + { + "Address_3916": "202 Hoxton Street", + "City_8925": "London", + "Company_7187": null, + "Country_6963": "United Kingdom", + "Email_8365": "emma_jones@hotmail.com", + "Fax_1833": null, + "FirstName_3040": "Emma", + "LastName_6046": "Jones", + "Phone_1455": "+44 020 7707 0707", + "PostalCode_3714": "N1 5LH", + "State_6902": null, + "SupportRepId_6639": 3 + }, + { + "Address_3916": "230 Elgin Street", + "City_8925": "Ottawa", + "Company_7187": null, + "Country_6963": "Canada", + "Email_8365": "edfrancis@yachoo.ca", + "Fax_1833": null, + "FirstName_3040": "Edward", + "LastName_6046": "Francis", + "Phone_1455": "+1 (613) 234-3322", + "PostalCode_3714": "K2P 1L7", + "State_6902": "ON", + "SupportRepId_6639": 3 + }, + { + "Address_3916": "3 Chatham Street", + "City_8925": "Dublin", + "Company_7187": null, + "Country_6963": "Ireland", + "Email_8365": "hughoreilly@apple.ie", + "Fax_1833": null, + "FirstName_3040": "Hugh", + "LastName_6046": "O'Reilly", + "Phone_1455": "+353 01 6792424", + "PostalCode_3714": null, + "State_6902": "Dublin", + "SupportRepId_6639": 3 + }, + { + "Address_3916": "3,Raj Bhavan Road", + "City_8925": "Bangalore", + "Company_7187": null, + "Country_6963": "India", + "Email_8365": "puja_srivastava@yahoo.in", + "Fax_1833": null, + "FirstName_3040": "Puja", + "LastName_6046": "Srivastava", + "Phone_1455": "+91 080 22289999", + "PostalCode_3714": "560001", + "State_6902": null, + "SupportRepId_6639": 3 + }, + { + "Address_3916": "5112 48 Street", + "City_8925": "Yellowknife", + "Company_7187": null, + "Country_6963": "Canada", + "Email_8365": "ellie.sullivan@shaw.ca", + "Fax_1833": null, + "FirstName_3040": "Ellie", + "LastName_6046": "Sullivan", + "Phone_1455": "+1 (867) 920-2233", + "PostalCode_3714": "X1A 1N6", + "State_6902": "NT", + "SupportRepId_6639": 3 + } + ] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_3916": "1033 N Park Ave", + "City_8925": "Tucson", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "patrick.gray@aol.com", + "Fax_1833": null, + "FirstName_3040": "Patrick", + "LastName_6046": "Gray", + "Phone_1455": "+1 (520) 622-4200", + "PostalCode_3714": "85719", + "State_6902": "AZ", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "120 S Orange Ave", + "City_8925": "Orlando", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "hleacock@gmail.com", + "Fax_1833": null, + "FirstName_3040": "Heather", + "LastName_6046": "Leacock", + "Phone_1455": "+1 (407) 999-7788", + "PostalCode_3714": "32801", + "State_6902": "FL", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "1600 Amphitheatre Parkway", + "City_8925": "Mountain View", + "Company_7187": "Google Inc.", + "Country_6963": "USA", + "Email_8365": "fharris@google.com", + "Fax_1833": "+1 (650) 253-0000", + "FirstName_3040": "Frank", + "LastName_6046": "Harris", + "Phone_1455": "+1 (650) 253-0000", + "PostalCode_3714": "94043-1351", + "State_6902": "CA", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "2211 W Berry Street", + "City_8925": "Fort Worth", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "ricunningham@hotmail.com", + "Fax_1833": null, + "FirstName_3040": "Richard", + "LastName_6046": "Cunningham", + "Phone_1455": "+1 (817) 924-7272", + "PostalCode_3714": "76110", + "State_6902": "TX", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "307 Macacha Güemes", + "City_8925": "Buenos Aires", + "Company_7187": null, + "Country_6963": "Argentina", + "Email_8365": "diego.gutierrez@yahoo.ar", + "Fax_1833": null, + "FirstName_3040": "Diego", + "LastName_6046": "Gutiérrez", + "Phone_1455": "+54 (0)11 4311 4333", + "PostalCode_3714": "1106", + "State_6902": null, + "SupportRepId_6639": 4 + }, + { + "Address_3916": "4, Rue Milton", + "City_8925": "Paris", + "Company_7187": null, + "Country_6963": "France", + "Email_8365": "camille.bernard@yahoo.fr", + "Fax_1833": null, + "FirstName_3040": "Camille", + "LastName_6046": "Bernard", + "Phone_1455": "+33 01 49 70 65 65", + "PostalCode_3714": "75009", + "State_6902": null, + "SupportRepId_6639": 4 + }, + { + "Address_3916": "421 Bourke Street", + "City_8925": "Sidney", + "Company_7187": null, + "Country_6963": "Australia", + "Email_8365": "mark.taylor@yahoo.au", + "Fax_1833": null, + "FirstName_3040": "Mark", + "LastName_6046": "Taylor", + "Phone_1455": "+61 (02) 9332 3633", + "PostalCode_3714": "2010", + "State_6902": "NSW", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "541 Del Medio Avenue", + "City_8925": "Mountain View", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "dmiller@comcast.com", + "Fax_1833": null, + "FirstName_3040": "Dan", + "LastName_6046": "Miller", + "Phone_1455": "+1 (650) 644-3358", + "PostalCode_3714": "94040-111", + "State_6902": "CA", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "69 Salem Street", + "City_8925": "Boston", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "johngordon22@yahoo.com", + "Fax_1833": null, + "FirstName_3040": "John", + "LastName_6046": "Gordon", + "Phone_1455": "+1 (617) 522-1333", + "PostalCode_3714": "2113", + "State_6902": "MA", + "SupportRepId_6639": 4 + }, + { + "Address_3916": "696 Osborne Street", + "City_8925": "Winnipeg", + "Company_7187": null, + "Country_6963": "Canada", + "Email_8365": "aaronmitchell@yahoo.ca", + "Fax_1833": null, + "FirstName_3040": "Aaron", + "LastName_6046": "Mitchell", + "Phone_1455": "+1 (204) 452-6452", + "PostalCode_3714": "R3L 2B9", + "State_6902": "MB", + "SupportRepId_6639": 4 + } + ] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_3916": "1 Microsoft Way", + "City_8925": "Redmond", + "Company_7187": "Microsoft Corporation", + "Country_6963": "USA", + "Email_8365": "jacksmith@microsoft.com", + "Fax_1833": "+1 (425) 882-8081", + "FirstName_3040": "Jack", + "LastName_6046": "Smith", + "Phone_1455": "+1 (425) 882-8080", + "PostalCode_3714": "98052-8300", + "State_6902": "WA", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "11, Place Bellecour", + "City_8925": "Lyon", + "Company_7187": null, + "Country_6963": "France", + "Email_8365": "marc.dubois@hotmail.com", + "Fax_1833": null, + "FirstName_3040": "Marc", + "LastName_6046": "Dubois", + "Phone_1455": "+33 04 78 30 30 30", + "PostalCode_3714": "69002", + "State_6902": null, + "SupportRepId_6639": 5 + }, + { + "Address_3916": "110 Raeburn Pl", + "City_8925": "Edinburgh ", + "Company_7187": null, + "Country_6963": "United Kingdom", + "Email_8365": "steve.murray@yahoo.uk", + "Fax_1833": null, + "FirstName_3040": "Steve", + "LastName_6046": "Murray", + "Phone_1455": "+44 0131 315 3300", + "PostalCode_3714": "EH4 1HH", + "State_6902": null, + "SupportRepId_6639": 5 + }, + { + "Address_3916": "194A Chain Lake Drive", + "City_8925": "Halifax", + "Company_7187": null, + "Country_6963": "Canada", + "Email_8365": "marthasilk@gmail.com", + "Fax_1833": null, + "FirstName_3040": "Martha", + "LastName_6046": "Silk", + "Phone_1455": "+1 (902) 450-0450", + "PostalCode_3714": "B3S 1C5", + "State_6902": "NS", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "302 S 700 E", + "City_8925": "Salt Lake City", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "jubarnett@gmail.com", + "Fax_1833": null, + "FirstName_3040": "Julia", + "LastName_6046": "Barnett", + "Phone_1455": "+1 (801) 531-7272", + "PostalCode_3714": "84102", + "State_6902": "UT", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "319 N. Frances Street", + "City_8925": "Madison", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "vstevens@yahoo.com", + "Fax_1833": null, + "FirstName_3040": "Victor", + "LastName_6046": "Stevens", + "Phone_1455": "+1 (608) 257-0597", + "PostalCode_3714": "53703", + "State_6902": "WI", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "801 W 4th Street", + "City_8925": "Reno", + "Company_7187": null, + "Country_6963": "USA", + "Email_8365": "kachase@hotmail.com", + "Fax_1833": null, + "FirstName_3040": "Kathy", + "LastName_6046": "Chase", + "Phone_1455": "+1 (775) 223-7665", + "PostalCode_3714": "89503", + "State_6902": "NV", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "8210 111 ST NW", + "City_8925": "Edmonton", + "Company_7187": "Telus", + "Country_6963": "Canada", + "Email_8365": "mphilips12@shaw.ca", + "Fax_1833": "+1 (780) 434-5565", + "FirstName_3040": "Mark", + "LastName_6046": "Philips", + "Phone_1455": "+1 (780) 434-4554", + "PostalCode_3714": "T6G 2C7", + "State_6902": "AB", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "Av. Paulista, 2022", + "City_8925": "São Paulo", + "Company_7187": "Banco do Brasil S.A.", + "Country_6963": "Brazil", + "Email_8365": "alero@uol.com.br", + "Fax_1833": "+55 (11) 3055-8131", + "FirstName_3040": "Alexandre", + "LastName_6046": "Rocha", + "Phone_1455": "+55 (11) 3055-3278", + "PostalCode_3714": "01310-200", + "State_6902": "SP", + "SupportRepId_6639": 5 + }, + { + "Address_3916": "C/ San Bernardo 85", + "City_8925": "Madrid", + "Company_7187": null, + "Country_6963": "Spain", + "Email_8365": "enrique_munoz@yahoo.es", + "Fax_1833": null, + "FirstName_3040": "Enrique", + "LastName_6046": "Muñoz", + "Phone_1455": "+34 914 454 454", + "PostalCode_3714": "28015", + "State_6902": null, + "SupportRepId_6639": 5 + } + ] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6c6fe40c98618fb3/request.json b/test-snapshots/query/6c6fe40c98618fb3/request.json new file mode 100644 index 0000000..3c8f340 --- /dev/null +++ b/test-snapshots/query/6c6fe40c98618fb3/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address_3916": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_8925": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_7187": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_6963": { + "type": "column", + "column": "Country", + "fields": null + }, + "SupportRepId_6639": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Email_8365": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_1833": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_3040": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_6046": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1455": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_3714": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_6902": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6ca3a464749faf/expected.json b/test-snapshots/query/6ca3a464749faf/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/6ca3a464749faf/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6ca3a464749faf/request.json b/test-snapshots/query/6ca3a464749faf/request.json new file mode 100644 index 0000000..6b7aba3 --- /dev/null +++ b/test-snapshots/query/6ca3a464749faf/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6cb3487abad66243/expected.json b/test-snapshots/query/6cb3487abad66243/expected.json new file mode 100644 index 0000000..27e6010 --- /dev/null +++ b/test-snapshots/query/6cb3487abad66243/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6cb3487abad66243/request.json b/test-snapshots/query/6cb3487abad66243/request.json new file mode 100644 index 0000000..884e983 --- /dev/null +++ b/test-snapshots/query/6cb3487abad66243/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6cd52e53e97526f5/expected.json b/test-snapshots/query/6cd52e53e97526f5/expected.json new file mode 100644 index 0000000..adf7af5 --- /dev/null +++ b/test-snapshots/query/6cd52e53e97526f5/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 81, + "Bytes": 8665545, + "Composer": "Foo Fighters", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 263653, + "Name": "All My Life", + "TrackId": 1009, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6cd52e53e97526f5/request.json b/test-snapshots/query/6cd52e53e97526f5/request.json new file mode 100644 index 0000000..b2d19d5 --- /dev/null +++ b/test-snapshots/query/6cd52e53e97526f5/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1009 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6cdb3999bc98960/expected.json b/test-snapshots/query/6cdb3999bc98960/expected.json new file mode 100644 index 0000000..e587a2e --- /dev/null +++ b/test-snapshots/query/6cdb3999bc98960/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-01-08", + "InvoiceId": 85, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-02-18", + "InvoiceId": 96, + "Total": 21.86 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-10-19", + "InvoiceId": 151, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6cdb3999bc98960/request.json b/test-snapshots/query/6cdb3999bc98960/request.json new file mode 100644 index 0000000..2ad3117 --- /dev/null +++ b/test-snapshots/query/6cdb3999bc98960/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (514) 721-4711" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6ced8d3f90a29b98/expected.json b/test-snapshots/query/6ced8d3f90a29b98/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6ced8d3f90a29b98/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6ced8d3f90a29b98/request.json b/test-snapshots/query/6ced8d3f90a29b98/request.json new file mode 100644 index 0000000..d727f26 --- /dev/null +++ b/test-snapshots/query/6ced8d3f90a29b98/request.json @@ -0,0 +1,151 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "5827 Bowness Road NW" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6cf3d8a7d70f8f35/expected.json b/test-snapshots/query/6cf3d8a7d70f8f35/expected.json new file mode 100644 index 0000000..d235ad9 --- /dev/null +++ b/test-snapshots/query/6cf3d8a7d70f8f35/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6cf3d8a7d70f8f35/request.json b/test-snapshots/query/6cf3d8a7d70f8f35/request.json new file mode 100644 index 0000000..f4ea5d9 --- /dev/null +++ b/test-snapshots/query/6cf3d8a7d70f8f35/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6d5d94a61bf35718/expected.json b/test-snapshots/query/6d5d94a61bf35718/expected.json new file mode 100644 index 0000000..1d3ebf9 --- /dev/null +++ b/test-snapshots/query/6d5d94a61bf35718/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6d5d94a61bf35718/request.json b/test-snapshots/query/6d5d94a61bf35718/request.json new file mode 100644 index 0000000..7e00074 --- /dev/null +++ b/test-snapshots/query/6d5d94a61bf35718/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6d8df789f2077e81/expected.json b/test-snapshots/query/6d8df789f2077e81/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/6d8df789f2077e81/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6d8df789f2077e81/request.json b/test-snapshots/query/6d8df789f2077e81/request.json new file mode 100644 index 0000000..9e2e140 --- /dev/null +++ b/test-snapshots/query/6d8df789f2077e81/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Inject The Venom" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6dc0ec2e6006f990/expected.json b/test-snapshots/query/6dc0ec2e6006f990/expected.json new file mode 100644 index 0000000..c09678e --- /dev/null +++ b/test-snapshots/query/6dc0ec2e6006f990/expected.json @@ -0,0 +1,72 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5881293, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 175333, + "Name": "Amor De Muito", + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7960868, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 240091, + "Name": "Sobremesa", + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6dc0ec2e6006f990/request.json b/test-snapshots/query/6dc0ec2e6006f990/request.json new file mode 100644 index 0000000..9b5e15f --- /dev/null +++ b/test-snapshots/query/6dc0ec2e6006f990/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6de05bf2f386ee16/expected.json b/test-snapshots/query/6de05bf2f386ee16/expected.json new file mode 100644 index 0000000..c149a54 --- /dev/null +++ b/test-snapshots/query/6de05bf2f386ee16/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6de05bf2f386ee16/request.json b/test-snapshots/query/6de05bf2f386ee16/request.json new file mode 100644 index 0000000..e43c296 --- /dev/null +++ b/test-snapshots/query/6de05bf2f386ee16/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 199836 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6de25a86ade24a13/expected.json b/test-snapshots/query/6de25a86ade24a13/expected.json new file mode 100644 index 0000000..fed586e --- /dev/null +++ b/test-snapshots/query/6de25a86ade24a13/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_8943": 1, + "InvoiceLineId_9655": 1, + "Quantity_3996": 1, + "TrackId_6340": 2, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 1, + "InvoiceLineId_9655": 2, + "Quantity_3996": 1, + "TrackId_6340": 4, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 10, + "InvoiceLineId_9655": 45, + "Quantity_3996": 1, + "TrackId_6340": 248, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 10, + "InvoiceLineId_9655": 46, + "Quantity_3996": 1, + "TrackId_6340": 252, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 10, + "InvoiceLineId_9655": 47, + "Quantity_3996": 1, + "TrackId_6340": 256, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 10, + "InvoiceLineId_9655": 48, + "Quantity_3996": 1, + "TrackId_6340": 260, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 10, + "InvoiceLineId_9655": 49, + "Quantity_3996": 1, + "TrackId_6340": 264, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 10, + "InvoiceLineId_9655": 50, + "Quantity_3996": 1, + "TrackId_6340": 268, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 100, + "InvoiceLineId_9655": 535, + "Quantity_3996": 1, + "TrackId_6340": 3254, + "UnitPrice_5816": 0.99 + }, + { + "InvoiceId_8943": 100, + "InvoiceLineId_9655": 536, + "Quantity_3996": 1, + "TrackId_6340": 3256, + "UnitPrice_5816": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6de25a86ade24a13/request.json b/test-snapshots/query/6de25a86ade24a13/request.json new file mode 100644 index 0000000..5f532c1 --- /dev/null +++ b/test-snapshots/query/6de25a86ade24a13/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_8943": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_9655": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_3996": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_6340": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_5816": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6e1bd54d1e232835/expected.json b/test-snapshots/query/6e1bd54d1e232835/expected.json new file mode 100644 index 0000000..a0aa40f --- /dev/null +++ b/test-snapshots/query/6e1bd54d1e232835/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "Address_7381": "923 7 ST NW", + "BirthDate_8934": "1968-01-09", + "City_0905": "Lethbridge", + "Country_5010": "Canada", + "Email_4653": "laura@chinookcorp.com", + "EmployeeId_2476": 8, + "Fax_2868": "+1 (403) 467-8772", + "FirstName_8793": "Laura", + "HireDate_3978": "2004-03-04", + "LastName_7385": "Callahan", + "Phone_3092": "+1 (403) 467-3351", + "PostalCode_9971": "T1H 1Y8", + "ReportsTo_3366": 6, + "State_8737": "AB", + "Title_0322": "IT Staff" + }, + { + "Address_7381": "825 8 Ave SW", + "BirthDate_8934": "1958-12-08", + "City_0905": "Calgary", + "Country_5010": "Canada", + "Email_4653": "nancy@chinookcorp.com", + "EmployeeId_2476": 2, + "Fax_2868": "+1 (403) 262-3322", + "FirstName_8793": "Nancy", + "HireDate_3978": "2002-05-01", + "LastName_7385": "Edwards", + "Phone_3092": "+1 (403) 262-3443", + "PostalCode_9971": "T2P 2T3", + "ReportsTo_3366": 1, + "State_8737": "AB", + "Title_0322": "Sales Manager" + }, + { + "Address_7381": "7727B 41 Ave", + "BirthDate_8934": "1965-03-03", + "City_0905": "Calgary", + "Country_5010": "Canada", + "Email_4653": "steve@chinookcorp.com", + "EmployeeId_2476": 5, + "Fax_2868": "1 (780) 836-9543", + "FirstName_8793": "Steve", + "HireDate_3978": "2003-10-17", + "LastName_7385": "Johnson", + "Phone_3092": "1 (780) 836-9987", + "PostalCode_9971": "T3B 1Y7", + "ReportsTo_3366": 2, + "State_8737": "AB", + "Title_0322": "Sales Support Agent" + }, + { + "Address_7381": "683 10 Street SW", + "BirthDate_8934": "1947-09-19", + "City_0905": "Calgary", + "Country_5010": "Canada", + "Email_4653": "margaret@chinookcorp.com", + "EmployeeId_2476": 4, + "Fax_2868": "+1 (403) 263-4289", + "FirstName_8793": "Margaret", + "HireDate_3978": "2003-05-03", + "LastName_7385": "Park", + "Phone_3092": "+1 (403) 263-4423", + "PostalCode_9971": "T2P 5G3", + "ReportsTo_3366": 2, + "State_8737": "AB", + "Title_0322": "Sales Support Agent" + }, + { + "Address_7381": "590 Columbia Boulevard West", + "BirthDate_8934": "1970-05-29", + "City_0905": "Lethbridge", + "Country_5010": "Canada", + "Email_4653": "robert@chinookcorp.com", + "EmployeeId_2476": 7, + "Fax_2868": "+1 (403) 456-8485", + "FirstName_8793": "Robert", + "HireDate_3978": "2004-01-02", + "LastName_7385": "King", + "Phone_3092": "+1 (403) 456-9986", + "PostalCode_9971": "T1K 5N8", + "ReportsTo_3366": 6, + "State_8737": "AB", + "Title_0322": "IT Staff" + }, + { + "Address_7381": "5827 Bowness Road NW", + "BirthDate_8934": "1973-07-01", + "City_0905": "Calgary", + "Country_5010": "Canada", + "Email_4653": "michael@chinookcorp.com", + "EmployeeId_2476": 6, + "Fax_2868": "+1 (403) 246-9899", + "FirstName_8793": "Michael", + "HireDate_3978": "2003-10-17", + "LastName_7385": "Mitchell", + "Phone_3092": "+1 (403) 246-9887", + "PostalCode_9971": "T3B 0C5", + "ReportsTo_3366": 1, + "State_8737": "AB", + "Title_0322": "IT Manager" + }, + { + "Address_7381": "11120 Jasper Ave NW", + "BirthDate_8934": "1962-02-18", + "City_0905": "Edmonton", + "Country_5010": "Canada", + "Email_4653": "andrew@chinookcorp.com", + "EmployeeId_2476": 1, + "Fax_2868": "+1 (780) 428-3457", + "FirstName_8793": "Andrew", + "HireDate_3978": "2002-08-14", + "LastName_7385": "Adams", + "Phone_3092": "+1 (780) 428-9482", + "PostalCode_9971": "T5K 2N1", + "ReportsTo_3366": null, + "State_8737": "AB", + "Title_0322": "General Manager" + }, + { + "Address_7381": "1111 6 Ave SW", + "BirthDate_8934": "1973-08-29", + "City_0905": "Calgary", + "Country_5010": "Canada", + "Email_4653": "jane@chinookcorp.com", + "EmployeeId_2476": 3, + "Fax_2868": "+1 (403) 262-6712", + "FirstName_8793": "Jane", + "HireDate_3978": "2002-04-01", + "LastName_7385": "Peacock", + "Phone_3092": "+1 (403) 262-3443", + "PostalCode_9971": "T2P 5M5", + "ReportsTo_3366": 2, + "State_8737": "AB", + "Title_0322": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6e1bd54d1e232835/request.json b/test-snapshots/query/6e1bd54d1e232835/request.json new file mode 100644 index 0000000..5000065 --- /dev/null +++ b/test-snapshots/query/6e1bd54d1e232835/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_7381": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_8934": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_0905": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_5010": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_4653": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_2476": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_2868": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_8793": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_3978": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_7385": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_3092": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_9971": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_3366": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_8737": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_0322": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6e4abc8b377cde7c/expected.json b/test-snapshots/query/6e4abc8b377cde7c/expected.json new file mode 100644 index 0000000..92f0816 --- /dev/null +++ b/test-snapshots/query/6e4abc8b377cde7c/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "5112 48 Street", + "BillingCity_8122": "Yellowknife", + "BillingState_4561": "NT", + "CustomerId_7446": 33 + }, + { + "BillingAddress_8147": "696 Osborne Street", + "BillingCity_8122": "Winnipeg", + "BillingState_4561": "MB", + "CustomerId_7446": 32 + }, + { + "BillingAddress_8147": "696 Osborne Street", + "BillingCity_8122": "Winnipeg", + "BillingState_4561": "MB", + "CustomerId_7446": 32 + }, + { + "BillingAddress_8147": "696 Osborne Street", + "BillingCity_8122": "Winnipeg", + "BillingState_4561": "MB", + "CustomerId_7446": 32 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6e4abc8b377cde7c/request.json b/test-snapshots/query/6e4abc8b377cde7c/request.json new file mode 100644 index 0000000..6865778 --- /dev/null +++ b/test-snapshots/query/6e4abc8b377cde7c/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_8147": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_8122": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingState_4561": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_7446": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6e81f3c9085b6580/expected.json b/test-snapshots/query/6e81f3c9085b6580/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/6e81f3c9085b6580/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6e81f3c9085b6580/request.json b/test-snapshots/query/6e81f3c9085b6580/request.json new file mode 100644 index 0000000..08ba012 --- /dev/null +++ b/test-snapshots/query/6e81f3c9085b6580/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6e9f3e6431c01ea1/expected.json b/test-snapshots/query/6e9f3e6431c01ea1/expected.json new file mode 100644 index 0000000..8c8205c --- /dev/null +++ b/test-snapshots/query/6e9f3e6431c01ea1/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "BirthDate_9953": "1973-08-29", + "Country_7069": "Canada", + "EmployeeId_3027": 3, + "FirstName_3911": "Jane", + "Phone_3671": "+1 (403) 262-3443", + "PostalCode_8126": "T2P 5M5", + "ReportsTo_5536": 2, + "State_4928": "AB", + "Title_3572": "Sales Support Agent" + }, + { + "BirthDate_9953": "1973-07-01", + "Country_7069": "Canada", + "EmployeeId_3027": 6, + "FirstName_3911": "Michael", + "Phone_3671": "+1 (403) 246-9887", + "PostalCode_8126": "T3B 0C5", + "ReportsTo_5536": 1, + "State_4928": "AB", + "Title_3572": "IT Manager" + }, + { + "BirthDate_9953": "1970-05-29", + "Country_7069": "Canada", + "EmployeeId_3027": 7, + "FirstName_3911": "Robert", + "Phone_3671": "+1 (403) 456-9986", + "PostalCode_8126": "T1K 5N8", + "ReportsTo_5536": 6, + "State_4928": "AB", + "Title_3572": "IT Staff" + }, + { + "BirthDate_9953": "1968-01-09", + "Country_7069": "Canada", + "EmployeeId_3027": 8, + "FirstName_3911": "Laura", + "Phone_3671": "+1 (403) 467-3351", + "PostalCode_8126": "T1H 1Y8", + "ReportsTo_5536": 6, + "State_4928": "AB", + "Title_3572": "IT Staff" + }, + { + "BirthDate_9953": "1965-03-03", + "Country_7069": "Canada", + "EmployeeId_3027": 5, + "FirstName_3911": "Steve", + "Phone_3671": "1 (780) 836-9987", + "PostalCode_8126": "T3B 1Y7", + "ReportsTo_5536": 2, + "State_4928": "AB", + "Title_3572": "Sales Support Agent" + }, + { + "BirthDate_9953": "1962-02-18", + "Country_7069": "Canada", + "EmployeeId_3027": 1, + "FirstName_3911": "Andrew", + "Phone_3671": "+1 (780) 428-9482", + "PostalCode_8126": "T5K 2N1", + "ReportsTo_5536": null, + "State_4928": "AB", + "Title_3572": "General Manager" + }, + { + "BirthDate_9953": "1958-12-08", + "Country_7069": "Canada", + "EmployeeId_3027": 2, + "FirstName_3911": "Nancy", + "Phone_3671": "+1 (403) 262-3443", + "PostalCode_8126": "T2P 2T3", + "ReportsTo_5536": 1, + "State_4928": "AB", + "Title_3572": "Sales Manager" + }, + { + "BirthDate_9953": "1947-09-19", + "Country_7069": "Canada", + "EmployeeId_3027": 4, + "FirstName_3911": "Margaret", + "Phone_3671": "+1 (403) 263-4423", + "PostalCode_8126": "T2P 5G3", + "ReportsTo_5536": 2, + "State_4928": "AB", + "Title_3572": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6e9f3e6431c01ea1/request.json b/test-snapshots/query/6e9f3e6431c01ea1/request.json new file mode 100644 index 0000000..7e966b7 --- /dev/null +++ b/test-snapshots/query/6e9f3e6431c01ea1/request.json @@ -0,0 +1,67 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Title_3572": { + "type": "column", + "column": "Title", + "fields": null + }, + "BirthDate_9953": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "Phone_3671": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Country_7069": { + "type": "column", + "column": "Country", + "fields": null + }, + "PostalCode_8126": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "EmployeeId_3027": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "ReportsTo_5536": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "FirstName_3911": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "State_4928": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BirthDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6ea3567e7366cf58/expected.json b/test-snapshots/query/6ea3567e7366cf58/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6ea3567e7366cf58/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6ea3567e7366cf58/request.json b/test-snapshots/query/6ea3567e7366cf58/request.json new file mode 100644 index 0000000..3018da6 --- /dev/null +++ b/test-snapshots/query/6ea3567e7366cf58/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205662 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 9 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6ea6668d150743a3/expected.json b/test-snapshots/query/6ea6668d150743a3/expected.json new file mode 100644 index 0000000..249852f --- /dev/null +++ b/test-snapshots/query/6ea6668d150743a3/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + }, + { + "Quantity_7538": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6ea6668d150743a3/request.json b/test-snapshots/query/6ea6668d150743a3/request.json new file mode 100644 index 0000000..33d56ad --- /dev/null +++ b/test-snapshots/query/6ea6668d150743a3/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_7538": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6eea464eb8ed2f11/expected.json b/test-snapshots/query/6eea464eb8ed2f11/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6eea464eb8ed2f11/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6eea464eb8ed2f11/request.json b/test-snapshots/query/6eea464eb8ed2f11/request.json new file mode 100644 index 0000000..b46a0b3 --- /dev/null +++ b/test-snapshots/query/6eea464eb8ed2f11/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6eee8050ec5df716/expected.json b/test-snapshots/query/6eee8050ec5df716/expected.json new file mode 100644 index 0000000..e86a631 --- /dev/null +++ b/test-snapshots/query/6eee8050ec5df716/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 15, + "Total_1262": 1.98 + }, + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 210, + "Total_1262": 1.98 + }, + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 233, + "Total_1262": 3.96 + }, + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 255, + "Total_1262": 5.94 + }, + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 26, + "Total_1262": 13.86 + }, + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 307, + "Total_1262": 1.99 + }, + { + "BillingCity_5306": "Cupertino", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "95014", + "InvoiceId_2680": 81, + "Total_1262": 8.91 + }, + { + "BillingCity_5306": "Redmond", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "98052-8300", + "InvoiceId_2680": 111, + "Total_1262": 0.99 + }, + { + "BillingCity_5306": "Redmond", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "98052-8300", + "InvoiceId_2680": 14, + "Total_1262": 1.98 + }, + { + "BillingCity_5306": "Redmond", + "BillingCountry_8517": "USA", + "BillingPostalCode_4911": "98052-8300", + "InvoiceId_2680": 232, + "Total_1262": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6eee8050ec5df716/request.json b/test-snapshots/query/6eee8050ec5df716/request.json new file mode 100644 index 0000000..00b8d1c --- /dev/null +++ b/test-snapshots/query/6eee8050ec5df716/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "Total_1262": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCity_5306": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_8517": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_4911": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "InvoiceId_2680": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6f2df708b09df633/expected.json b/test-snapshots/query/6f2df708b09df633/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/6f2df708b09df633/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6f2df708b09df633/request.json b/test-snapshots/query/6f2df708b09df633/request.json new file mode 100644 index 0000000..f63484c --- /dev/null +++ b/test-snapshots/query/6f2df708b09df633/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6f44a8d7685cf0ff/expected.json b/test-snapshots/query/6f44a8d7685cf0ff/expected.json new file mode 100644 index 0000000..b1b14f6 --- /dev/null +++ b/test-snapshots/query/6f44a8d7685cf0ff/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 121, + "Bytes": 1851753, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 102630, + "Name": "Midnight", + "TrackId": 1504, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 1944738, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 108435, + "Name": "Hill of the Skull", + "TrackId": 1501, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3300654, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 193560, + "Name": "Satch Boogie", + "TrackId": 1500, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3435777, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 202035, + "Name": "Always With Me, Always With You", + "TrackId": 1499, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3548553, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 209071, + "Name": "Circles", + "TrackId": 1502, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4036215, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 239721, + "Name": "Ice 9", + "TrackId": 1497, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4418504, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 263707, + "Name": "Surfing with the Alien", + "TrackId": 1496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4809279, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 288227, + "Name": "Lords of Karma", + "TrackId": 1503, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5232158, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 314768, + "Name": "Crushing Day", + "TrackId": 1498, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5595557, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 337570, + "Name": "Echo", + "TrackId": 1505, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6f44a8d7685cf0ff/request.json b/test-snapshots/query/6f44a8d7685cf0ff/request.json new file mode 100644 index 0000000..22f8a17 --- /dev/null +++ b/test-snapshots/query/6f44a8d7685cf0ff/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6f6359cf84e9fb73/expected.json b/test-snapshots/query/6f6359cf84e9fb73/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/6f6359cf84e9fb73/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6f6359cf84e9fb73/request.json b/test-snapshots/query/6f6359cf84e9fb73/request.json new file mode 100644 index 0000000..f62f19e --- /dev/null +++ b/test-snapshots/query/6f6359cf84e9fb73/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1947-09-19" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-08-14" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6f6a20c2919a5d5e/expected.json b/test-snapshots/query/6f6a20c2919a5d5e/expected.json new file mode 100644 index 0000000..d77d814 --- /dev/null +++ b/test-snapshots/query/6f6a20c2919a5d5e/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "GenreId_0064": 25 + }, + { + "GenreId_0064": 24 + }, + { + "GenreId_0064": 23 + }, + { + "GenreId_0064": 22 + }, + { + "GenreId_0064": 21 + }, + { + "GenreId_0064": 20 + }, + { + "GenreId_0064": 19 + }, + { + "GenreId_0064": 18 + }, + { + "GenreId_0064": 17 + }, + { + "GenreId_0064": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6f6a20c2919a5d5e/request.json b/test-snapshots/query/6f6a20c2919a5d5e/request.json new file mode 100644 index 0000000..d191d9f --- /dev/null +++ b/test-snapshots/query/6f6a20c2919a5d5e/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_0064": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6f8e8364e1a2aa0b/expected.json b/test-snapshots/query/6f8e8364e1a2aa0b/expected.json new file mode 100644 index 0000000..98f614b --- /dev/null +++ b/test-snapshots/query/6f8e8364e1a2aa0b/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + }, + { + "PlaylistId_6844": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6f8e8364e1a2aa0b/request.json b/test-snapshots/query/6f8e8364e1a2aa0b/request.json new file mode 100644 index 0000000..5567ce3 --- /dev/null +++ b/test-snapshots/query/6f8e8364e1a2aa0b/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_6844": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/6f9ab74a96d32818/expected.json b/test-snapshots/query/6f9ab74a96d32818/expected.json new file mode 100644 index 0000000..13dd5e6 --- /dev/null +++ b/test-snapshots/query/6f9ab74a96d32818/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + {}, + {} + ] + }, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "FK_AlbumArtistId": { + "rows": [ + {}, + {} + ] + }, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "FK_AlbumArtistId": { + "rows": [ + {} + ] + }, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6f9ab74a96d32818/request.json b/test-snapshots/query/6f9ab74a96d32818/request.json new file mode 100644 index 0000000..34a1dc7 --- /dev/null +++ b/test-snapshots/query/6f9ab74a96d32818/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/6fa6d34930633e6a/expected.json b/test-snapshots/query/6fa6d34930633e6a/expected.json new file mode 100644 index 0000000..b6ee811 --- /dev/null +++ b/test-snapshots/query/6fa6d34930633e6a/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_8735": 1, + "TrackId_2405": 1 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 2 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 3 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 4 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 5 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 6 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 7 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 8 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 9 + }, + { + "PlaylistId_8735": 1, + "TrackId_2405": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/6fa6d34930633e6a/request.json b/test-snapshots/query/6fa6d34930633e6a/request.json new file mode 100644 index 0000000..ef90137 --- /dev/null +++ b/test-snapshots/query/6fa6d34930633e6a/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8735": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_2405": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7034961322cf6869/expected.json b/test-snapshots/query/7034961322cf6869/expected.json new file mode 100644 index 0000000..6011fe1 --- /dev/null +++ b/test-snapshots/query/7034961322cf6869/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "Milliseconds_max_2798": 5286953 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/7034961322cf6869/request.json b/test-snapshots/query/7034961322cf6869/request.json new file mode 100644 index 0000000..0bcd7af --- /dev/null +++ b/test-snapshots/query/7034961322cf6869/request.json @@ -0,0 +1,15 @@ +{ + "collection": "chinook.Track", + "query": { + "aggregates": { + "Milliseconds_max_2798": { + "type": "single_column", + "column": "Milliseconds", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/704f4a80684922ae/expected.json b/test-snapshots/query/704f4a80684922ae/expected.json new file mode 100644 index 0000000..2fe4664 --- /dev/null +++ b/test-snapshots/query/704f4a80684922ae/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/704f4a80684922ae/request.json b/test-snapshots/query/704f4a80684922ae/request.json new file mode 100644 index 0000000..21ef2e7 --- /dev/null +++ b/test-snapshots/query/704f4a80684922ae/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/705898d656560324/expected.json b/test-snapshots/query/705898d656560324/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/705898d656560324/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/705898d656560324/request.json b/test-snapshots/query/705898d656560324/request.json new file mode 100644 index 0000000..ca78ad6 --- /dev/null +++ b/test-snapshots/query/705898d656560324/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7058f18319299677/expected.json b/test-snapshots/query/7058f18319299677/expected.json new file mode 100644 index 0000000..c64f946 --- /dev/null +++ b/test-snapshots/query/7058f18319299677/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7058f18319299677/request.json b/test-snapshots/query/7058f18319299677/request.json new file mode 100644 index 0000000..87dc96a --- /dev/null +++ b/test-snapshots/query/7058f18319299677/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/705d5cfc3f0455bf/expected.json b/test-snapshots/query/705d5cfc3f0455bf/expected.json new file mode 100644 index 0000000..9648d84 --- /dev/null +++ b/test-snapshots/query/705d5cfc3f0455bf/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_6599": 10 + }, + { + "PlaylistId_6599": 3 + }, + { + "PlaylistId_6599": 18 + }, + { + "PlaylistId_6599": 9 + }, + { + "PlaylistId_6599": 1 + }, + { + "PlaylistId_6599": 8 + }, + { + "PlaylistId_6599": 2 + }, + { + "PlaylistId_6599": 7 + }, + { + "PlaylistId_6599": 17 + }, + { + "PlaylistId_6599": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/705d5cfc3f0455bf/request.json b/test-snapshots/query/705d5cfc3f0455bf/request.json new file mode 100644 index 0000000..f95452e --- /dev/null +++ b/test-snapshots/query/705d5cfc3f0455bf/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "PlaylistId_6599": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/70afd2ab5862aede/expected.json b/test-snapshots/query/70afd2ab5862aede/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/70afd2ab5862aede/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/70afd2ab5862aede/request.json b/test-snapshots/query/70afd2ab5862aede/request.json new file mode 100644 index 0000000..c0169c4 --- /dev/null +++ b/test-snapshots/query/70afd2ab5862aede/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/70cdd7ee62ba2bda/expected.json b/test-snapshots/query/70cdd7ee62ba2bda/expected.json new file mode 100644 index 0000000..d9b2c68 --- /dev/null +++ b/test-snapshots/query/70cdd7ee62ba2bda/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/70cdd7ee62ba2bda/request.json b/test-snapshots/query/70cdd7ee62ba2bda/request.json new file mode 100644 index 0000000..4c0d554 --- /dev/null +++ b/test-snapshots/query/70cdd7ee62ba2bda/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/70d29df56ef808af/expected.json b/test-snapshots/query/70d29df56ef808af/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/70d29df56ef808af/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/70d29df56ef808af/request.json b/test-snapshots/query/70d29df56ef808af/request.json new file mode 100644 index 0000000..73eef1d --- /dev/null +++ b/test-snapshots/query/70d29df56ef808af/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/70fc7e96bbc2f5bf/expected.json b/test-snapshots/query/70fc7e96bbc2f5bf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/70fc7e96bbc2f5bf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/70fc7e96bbc2f5bf/request.json b/test-snapshots/query/70fc7e96bbc2f5bf/request.json new file mode 100644 index 0000000..b87bbd3 --- /dev/null +++ b/test-snapshots/query/70fc7e96bbc2f5bf/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Electronica/Dance" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/710af9c48932f93/expected.json b/test-snapshots/query/710af9c48932f93/expected.json new file mode 100644 index 0000000..154283e --- /dev/null +++ b/test-snapshots/query/710af9c48932f93/expected.json @@ -0,0 +1,226 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 11170334, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 343719, + "Name_2595": "For Those About To Rock (We Salute You)", + "TrackId_7406": 1, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 6599424, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 203102, + "Name_2595": "Snowballed", + "TrackId_7406": 9, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 6599424, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 203102, + "Name_2595": "Snowballed", + "TrackId_7406": 9, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 6706347, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 205688, + "Name_2595": "Night Of The Long Knives", + "TrackId_7406": 13, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 6713451, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 205662, + "Name_2595": "Put The Finger On You", + "TrackId_7406": 6, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 6852860, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 210834, + "Name_2595": "Inject The Venom", + "TrackId_7406": 8, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 6852860, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 210834, + "Name_2595": "Inject The Venom", + "TrackId_7406": 8, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 8596840, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 263288, + "Name_2595": "Breaking The Rules", + "TrackId_7406": 12, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 8611245, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 263497, + "Name_2595": "Evil Walks", + "TrackId_7406": 10, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_5381": 1, + "Bytes_1707": 8817038, + "Composer_2693": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4421": 1, + "MediaTypeId_3142": 1, + "Milliseconds_8545": 270863, + "Name_2595": "Spellbound", + "TrackId_7406": 14, + "UnitPrice_5237": 0.99 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/710af9c48932f93/request.json b/test-snapshots/query/710af9c48932f93/request.json new file mode 100644 index 0000000..da9f3b3 --- /dev/null +++ b/test-snapshots/query/710af9c48932f93/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_5381": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_1707": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_2693": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_4421": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_3142": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_8545": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_2595": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_7406": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_5237": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/711d410da6ab158e/expected.json b/test-snapshots/query/711d410da6ab158e/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/711d410da6ab158e/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/711d410da6ab158e/request.json b/test-snapshots/query/711d410da6ab158e/request.json new file mode 100644 index 0000000..6fe9f66 --- /dev/null +++ b/test-snapshots/query/711d410da6ab158e/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/712bb4ac31288f0a/expected.json b/test-snapshots/query/712bb4ac31288f0a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/712bb4ac31288f0a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/712bb4ac31288f0a/request.json b/test-snapshots/query/712bb4ac31288f0a/request.json new file mode 100644 index 0000000..7d858f1 --- /dev/null +++ b/test-snapshots/query/712bb4ac31288f0a/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Staff" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/713e8d44f069027d/expected.json b/test-snapshots/query/713e8d44f069027d/expected.json new file mode 100644 index 0000000..25b5793 --- /dev/null +++ b/test-snapshots/query/713e8d44f069027d/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_1714": 347, + "ArtistId_8032": 275, + "Title_0968": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_1714": 346, + "ArtistId_8032": 274, + "Title_0968": "Mozart: Chamber Music" + }, + { + "AlbumId_1714": 345, + "ArtistId_8032": 273, + "Title_0968": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_1714": 344, + "ArtistId_8032": 272, + "Title_0968": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_1714": 343, + "ArtistId_8032": 226, + "Title_0968": "Respighi:Pines of Rome" + }, + { + "AlbumId_1714": 342, + "ArtistId_8032": 271, + "Title_0968": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_1714": 341, + "ArtistId_8032": 270, + "Title_0968": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_1714": 340, + "ArtistId_8032": 269, + "Title_0968": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_1714": 339, + "ArtistId_8032": 268, + "Title_0968": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_1714": 338, + "ArtistId_8032": 267, + "Title_0968": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/713e8d44f069027d/request.json b/test-snapshots/query/713e8d44f069027d/request.json new file mode 100644 index 0000000..3e7972d --- /dev/null +++ b/test-snapshots/query/713e8d44f069027d/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_1714": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_8032": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_0968": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/71888a9b2662e87e/expected.json b/test-snapshots/query/71888a9b2662e87e/expected.json new file mode 100644 index 0000000..60e328d --- /dev/null +++ b/test-snapshots/query/71888a9b2662e87e/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_5112": 1, + "ArtistId_2416": 1, + "Title_2725": "For Those About To Rock We Salute You" + }, + { + "AlbumId_5112": 2, + "ArtistId_2416": 2, + "Title_2725": "Balls to the Wall" + }, + { + "AlbumId_5112": 3, + "ArtistId_2416": 2, + "Title_2725": "Restless and Wild" + }, + { + "AlbumId_5112": 4, + "ArtistId_2416": 1, + "Title_2725": "Let There Be Rock" + }, + { + "AlbumId_5112": 5, + "ArtistId_2416": 3, + "Title_2725": "Big Ones" + }, + { + "AlbumId_5112": 6, + "ArtistId_2416": 4, + "Title_2725": "Jagged Little Pill" + }, + { + "AlbumId_5112": 7, + "ArtistId_2416": 5, + "Title_2725": "Facelift" + }, + { + "AlbumId_5112": 8, + "ArtistId_2416": 6, + "Title_2725": "Warner 25 Anos" + }, + { + "AlbumId_5112": 9, + "ArtistId_2416": 7, + "Title_2725": "Plays Metallica By Four Cellos" + }, + { + "AlbumId_5112": 10, + "ArtistId_2416": 8, + "Title_2725": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/71888a9b2662e87e/request.json b/test-snapshots/query/71888a9b2662e87e/request.json new file mode 100644 index 0000000..8d38566 --- /dev/null +++ b/test-snapshots/query/71888a9b2662e87e/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_5112": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_2416": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_2725": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/71905d5d6fb32484/expected.json b/test-snapshots/query/71905d5d6fb32484/expected.json new file mode 100644 index 0000000..9ff8902 --- /dev/null +++ b/test-snapshots/query/71905d5d6fb32484/expected.json @@ -0,0 +1,194 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 579, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 1729, + "Quantity_2433": 1 + }, + { + "InvoiceLineId_8889": 581, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 582, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 3, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 1155, + "Quantity_2433": 1 + }, + { + "InvoiceLineId_8889": 4, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 6, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 5, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceLineId_8889": 1156, + "Quantity_2433": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/71905d5d6fb32484/request.json b/test-snapshots/query/71905d5d6fb32484/request.json new file mode 100644 index 0000000..cf9c5af --- /dev/null +++ b/test-snapshots/query/71905d5d6fb32484/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "Quantity_2433": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "InvoiceLineId_8889": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/71da46347a261f52/expected.json b/test-snapshots/query/71da46347a261f52/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/71da46347a261f52/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/71da46347a261f52/request.json b/test-snapshots/query/71da46347a261f52/request.json new file mode 100644 index 0000000..c3e1ac8 --- /dev/null +++ b/test-snapshots/query/71da46347a261f52/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/71de31eee3073a00/expected.json b/test-snapshots/query/71de31eee3073a00/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/71de31eee3073a00/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/71de31eee3073a00/request.json b/test-snapshots/query/71de31eee3073a00/request.json new file mode 100644 index 0000000..67d74a8 --- /dev/null +++ b/test-snapshots/query/71de31eee3073a00/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-08-14" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/72129b241893dcd7/expected.json b/test-snapshots/query/72129b241893dcd7/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/72129b241893dcd7/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/72129b241893dcd7/request.json b/test-snapshots/query/72129b241893dcd7/request.json new file mode 100644 index 0000000..c14f3df --- /dev/null +++ b/test-snapshots/query/72129b241893dcd7/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7230c677aebac384/expected.json b/test-snapshots/query/7230c677aebac384/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7230c677aebac384/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7230c677aebac384/request.json b/test-snapshots/query/7230c677aebac384/request.json new file mode 100644 index 0000000..335eb5a --- /dev/null +++ b/test-snapshots/query/7230c677aebac384/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "hleacock@gmail.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7237eac6f23c1f49/expected.json b/test-snapshots/query/7237eac6f23c1f49/expected.json new file mode 100644 index 0000000..b5b8f06 --- /dev/null +++ b/test-snapshots/query/7237eac6f23c1f49/expected.json @@ -0,0 +1,515 @@ +[ + { + "rows": [ + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [] + }, + "HireDate_3739": "2002-05-01" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [] + }, + "HireDate_3739": "2002-08-14" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [] + }, + "HireDate_3739": "2003-10-17" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [] + }, + "HireDate_3739": "2004-01-02" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [] + }, + "HireDate_3739": "2004-03-04" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + }, + "HireDate_3739": "2002-04-01" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + }, + "HireDate_3739": "2003-10-17" + }, + { + "Country_7875": "Canada", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + }, + "HireDate_3739": "2003-05-03" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7237eac6f23c1f49/request.json b/test-snapshots/query/7237eac6f23c1f49/request.json new file mode 100644 index 0000000..e837e59 --- /dev/null +++ b/test-snapshots/query/7237eac6f23c1f49/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "HireDate_3739": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Country_7875": { + "type": "column", + "column": "Country", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7286ac7e0b1e55d7/expected.json b/test-snapshots/query/7286ac7e0b1e55d7/expected.json new file mode 100644 index 0000000..a8d9a61 --- /dev/null +++ b/test-snapshots/query/7286ac7e0b1e55d7/expected.json @@ -0,0 +1,13 @@ +[ + { + "aggregates": { + "InvoiceId_min_0398": 1, + "InvoiceId_sum_4456": 463386, + "InvoiceLineId_count_7813": 2240, + "InvoiceLineId_min_1787": 1, + "Quantity_count_3055": 2240, + "TrackId_avg_2920": 1717.734375, + "TrackId_min_7327": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/7286ac7e0b1e55d7/request.json b/test-snapshots/query/7286ac7e0b1e55d7/request.json new file mode 100644 index 0000000..9e83922 --- /dev/null +++ b/test-snapshots/query/7286ac7e0b1e55d7/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "InvoiceId_sum_4456": { + "type": "single_column", + "column": "InvoiceId", + "function": "sum" + }, + "Quantity_count_3055": { + "type": "single_column", + "column": "Quantity", + "function": "count" + }, + "InvoiceLineId_min_1787": { + "type": "single_column", + "column": "InvoiceLineId", + "function": "min" + }, + "InvoiceLineId_count_7813": { + "type": "single_column", + "column": "InvoiceLineId", + "function": "count" + }, + "InvoiceId_min_0398": { + "type": "single_column", + "column": "InvoiceId", + "function": "min" + }, + "TrackId_avg_2920": { + "type": "single_column", + "column": "TrackId", + "function": "avg" + }, + "TrackId_min_7327": { + "type": "single_column", + "column": "TrackId", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7297b6396af9a6fd/expected.json b/test-snapshots/query/7297b6396af9a6fd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7297b6396af9a6fd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7297b6396af9a6fd/request.json b/test-snapshots/query/7297b6396af9a6fd/request.json new file mode 100644 index 0000000..de9d6a6 --- /dev/null +++ b/test-snapshots/query/7297b6396af9a6fd/request.json @@ -0,0 +1,61 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/72ba0a4374fb1591/expected.json b/test-snapshots/query/72ba0a4374fb1591/expected.json new file mode 100644 index 0000000..cc80953 --- /dev/null +++ b/test-snapshots/query/72ba0a4374fb1591/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "GenreId_count_2765": 25, + "GenreId_max_7205": 25, + "GenreId_median_6521": 13, + "GenreId_sum_0802": 325, + "Name_min_5209": "Alternative" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/72ba0a4374fb1591/request.json b/test-snapshots/query/72ba0a4374fb1591/request.json new file mode 100644 index 0000000..4a463af --- /dev/null +++ b/test-snapshots/query/72ba0a4374fb1591/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "aggregates": { + "Name_min_5209": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "GenreId_count_2765": { + "type": "single_column", + "column": "GenreId", + "function": "count" + }, + "GenreId_max_7205": { + "type": "single_column", + "column": "GenreId", + "function": "max" + }, + "GenreId_median_6521": { + "type": "single_column", + "column": "GenreId", + "function": "median" + }, + "GenreId_sum_0802": { + "type": "single_column", + "column": "GenreId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/72bc45bdb3834c13/expected.json b/test-snapshots/query/72bc45bdb3834c13/expected.json new file mode 100644 index 0000000..3b0b6fb --- /dev/null +++ b/test-snapshots/query/72bc45bdb3834c13/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 8715 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/72bc45bdb3834c13/request.json b/test-snapshots/query/72bc45bdb3834c13/request.json new file mode 100644 index 0000000..ed0362c --- /dev/null +++ b/test-snapshots/query/72bc45bdb3834c13/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/72e44706d20305e1/expected.json b/test-snapshots/query/72e44706d20305e1/expected.json new file mode 100644 index 0000000..515e377 --- /dev/null +++ b/test-snapshots/query/72e44706d20305e1/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/72e44706d20305e1/request.json b/test-snapshots/query/72e44706d20305e1/request.json new file mode 100644 index 0000000..ed0fa04 --- /dev/null +++ b/test-snapshots/query/72e44706d20305e1/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (514) 721-4711" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/72f9e7688aa2428c/expected.json b/test-snapshots/query/72f9e7688aa2428c/expected.json new file mode 100644 index 0000000..65a47aa --- /dev/null +++ b/test-snapshots/query/72f9e7688aa2428c/expected.json @@ -0,0 +1,187 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + }, + { + "MediaTypeId_5748": 1 + } + ] + }, + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + }, + { + "MediaTypeId_5748": 2 + } + ] + }, + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + }, + { + "MediaTypeId_5748": 3 + } + ] + }, + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_5748": 4 + }, + { + "MediaTypeId_5748": 4 + }, + { + "MediaTypeId_5748": 4 + }, + { + "MediaTypeId_5748": 4 + }, + { + "MediaTypeId_5748": 4 + }, + { + "MediaTypeId_5748": 4 + }, + { + "MediaTypeId_5748": 4 + } + ] + }, + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + }, + { + "MediaTypeId_5748": 5 + } + ] + }, + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/72f9e7688aa2428c/request.json b/test-snapshots/query/72f9e7688aa2428c/request.json new file mode 100644 index 0000000..3a5a818 --- /dev/null +++ b/test-snapshots/query/72f9e7688aa2428c/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId_5748": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/730ef6cf7283ddc1/expected.json b/test-snapshots/query/730ef6cf7283ddc1/expected.json new file mode 100644 index 0000000..2a5ce9b --- /dev/null +++ b/test-snapshots/query/730ef6cf7283ddc1/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 4448025, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 274644, + "Name": "Give Peace a Chance", + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/730ef6cf7283ddc1/request.json b/test-snapshots/query/730ef6cf7283ddc1/request.json new file mode 100644 index 0000000..1f684b0 --- /dev/null +++ b/test-snapshots/query/730ef6cf7283ddc1/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7319c1d0dd769a36/expected.json b/test-snapshots/query/7319c1d0dd769a36/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7319c1d0dd769a36/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7319c1d0dd769a36/request.json b/test-snapshots/query/7319c1d0dd769a36/request.json new file mode 100644 index 0000000..ba0b7de --- /dev/null +++ b/test-snapshots/query/7319c1d0dd769a36/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7334a54336fe3db1/expected.json b/test-snapshots/query/7334a54336fe3db1/expected.json new file mode 100644 index 0000000..6a6148e --- /dev/null +++ b/test-snapshots/query/7334a54336fe3db1/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_9290": 275 + }, + { + "ArtistId_9290": 274 + }, + { + "ArtistId_9290": 273 + }, + { + "ArtistId_9290": 272 + }, + { + "ArtistId_9290": 271 + }, + { + "ArtistId_9290": 270 + }, + { + "ArtistId_9290": 269 + }, + { + "ArtistId_9290": 268 + }, + { + "ArtistId_9290": 267 + }, + { + "ArtistId_9290": 266 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7334a54336fe3db1/request.json b/test-snapshots/query/7334a54336fe3db1/request.json new file mode 100644 index 0000000..9621ddd --- /dev/null +++ b/test-snapshots/query/7334a54336fe3db1/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_9290": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/73478c73cfcaa3c0/expected.json b/test-snapshots/query/73478c73cfcaa3c0/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/73478c73cfcaa3c0/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/73478c73cfcaa3c0/request.json b/test-snapshots/query/73478c73cfcaa3c0/request.json new file mode 100644 index 0000000..0978030 --- /dev/null +++ b/test-snapshots/query/73478c73cfcaa3c0/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/734b9f38bfac3b17/expected.json b/test-snapshots/query/734b9f38bfac3b17/expected.json new file mode 100644 index 0000000..19baf56 --- /dev/null +++ b/test-snapshots/query/734b9f38bfac3b17/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "Composer_0154": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 3, + "Name": "Metal" + } + ] + } + }, + { + "Composer_0154": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 3, + "Name": "Metal" + } + ] + } + }, + { + "Composer_0154": "A. F. Iommi, W. Ward, T. Butler, J. Osbourne", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 3, + "Name": "Metal" + } + ] + } + }, + { + "Composer_0154": "A. Jamal", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 2, + "Name": "Jazz" + } + ] + } + }, + { + "Composer_0154": "A.Bouchard/J.Bouchard/S.Pearlman", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 3, + "Name": "Metal" + } + ] + } + }, + { + "Composer_0154": "A.Isbell/A.Jones/O.Redding", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 6, + "Name": "Blues" + } + ] + } + }, + { + "Composer_0154": "AC/DC", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } + }, + { + "Composer_0154": "AC/DC", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } + }, + { + "Composer_0154": "AC/DC", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } + }, + { + "Composer_0154": "AC/DC", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/734b9f38bfac3b17/request.json b/test-snapshots/query/734b9f38bfac3b17/request.json new file mode 100644 index 0000000..af2a87c --- /dev/null +++ b/test-snapshots/query/734b9f38bfac3b17/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Composer_0154": { + "type": "column", + "column": "Composer", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/73592ef48a96e35e/expected.json b/test-snapshots/query/73592ef48a96e35e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/73592ef48a96e35e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/73592ef48a96e35e/request.json b/test-snapshots/query/73592ef48a96e35e/request.json new file mode 100644 index 0000000..0445857 --- /dev/null +++ b/test-snapshots/query/73592ef48a96e35e/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/73644496dce3fb21/expected.json b/test-snapshots/query/73644496dce3fb21/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/73644496dce3fb21/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/73644496dce3fb21/request.json b/test-snapshots/query/73644496dce3fb21/request.json new file mode 100644 index 0000000..0f94c93 --- /dev/null +++ b/test-snapshots/query/73644496dce3fb21/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/73918a12972afded/expected.json b/test-snapshots/query/73918a12972afded/expected.json new file mode 100644 index 0000000..3435657 --- /dev/null +++ b/test-snapshots/query/73918a12972afded/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "GenreId": 11, + "Name": "Bossa Nova" + }, + { + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "GenreId": 18, + "Name": "Science Fiction" + }, + { + "GenreId": 19, + "Name": "TV Shows" + }, + { + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/73918a12972afded/request.json b/test-snapshots/query/73918a12972afded/request.json new file mode 100644 index 0000000..4f9bf5a --- /dev/null +++ b/test-snapshots/query/73918a12972afded/request.json @@ -0,0 +1,46 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/73a436fcdd7d4716/expected.json b/test-snapshots/query/73a436fcdd7d4716/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/73a436fcdd7d4716/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/73a436fcdd7d4716/request.json b/test-snapshots/query/73a436fcdd7d4716/request.json new file mode 100644 index 0000000..38d3475 --- /dev/null +++ b/test-snapshots/query/73a436fcdd7d4716/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jack" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Montréal" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/73d8cc620c46a5e3/expected.json b/test-snapshots/query/73d8cc620c46a5e3/expected.json new file mode 100644 index 0000000..8d42a5d --- /dev/null +++ b/test-snapshots/query/73d8cc620c46a5e3/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "InvoiceLineId_7036": 1000 + }, + { + "InvoiceLineId_7036": 1001 + }, + { + "InvoiceLineId_7036": 1002 + }, + { + "InvoiceLineId_7036": 1003 + }, + { + "InvoiceLineId_7036": 1004 + }, + { + "InvoiceLineId_7036": 1005 + }, + { + "InvoiceLineId_7036": 1006 + }, + { + "InvoiceLineId_7036": 1007 + }, + { + "InvoiceLineId_7036": 1008 + }, + { + "InvoiceLineId_7036": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/73d8cc620c46a5e3/request.json b/test-snapshots/query/73d8cc620c46a5e3/request.json new file mode 100644 index 0000000..7b4d6d4 --- /dev/null +++ b/test-snapshots/query/73d8cc620c46a5e3/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceLineId_7036": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/741ec9c34c5517c7/expected.json b/test-snapshots/query/741ec9c34c5517c7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/741ec9c34c5517c7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/741ec9c34c5517c7/request.json b/test-snapshots/query/741ec9c34c5517c7/request.json new file mode 100644 index 0000000..fc36daa --- /dev/null +++ b/test-snapshots/query/741ec9c34c5517c7/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "11120 Jasper Ave NW" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/742046a6a0beedba/expected.json b/test-snapshots/query/742046a6a0beedba/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/742046a6a0beedba/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/742046a6a0beedba/request.json b/test-snapshots/query/742046a6a0beedba/request.json new file mode 100644 index 0000000..24df3d3 --- /dev/null +++ b/test-snapshots/query/742046a6a0beedba/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/74212e1464f3704b/expected.json b/test-snapshots/query/74212e1464f3704b/expected.json new file mode 100644 index 0000000..cd68f38 --- /dev/null +++ b/test-snapshots/query/74212e1464f3704b/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_2199": 5, + "Name_8725": "AAC audio file" + }, + { + "MediaTypeId_2199": 4, + "Name_8725": "Purchased AAC audio file" + }, + { + "MediaTypeId_2199": 3, + "Name_8725": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_2199": 2, + "Name_8725": "Protected AAC audio file" + }, + { + "MediaTypeId_2199": 1, + "Name_8725": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74212e1464f3704b/request.json b/test-snapshots/query/74212e1464f3704b/request.json new file mode 100644 index 0000000..c5fd326 --- /dev/null +++ b/test-snapshots/query/74212e1464f3704b/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_2199": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_8725": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/744dcfa6c89d92cf/expected.json b/test-snapshots/query/744dcfa6c89d92cf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/744dcfa6c89d92cf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/744dcfa6c89d92cf/request.json b/test-snapshots/query/744dcfa6c89d92cf/request.json new file mode 100644 index 0000000..055bfa6 --- /dev/null +++ b/test-snapshots/query/744dcfa6c89d92cf/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/74a887d8fc18a89e/expected.json b/test-snapshots/query/74a887d8fc18a89e/expected.json new file mode 100644 index 0000000..a192b15 --- /dev/null +++ b/test-snapshots/query/74a887d8fc18a89e/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_6559": 1 + }, + { + "ArtistId_6559": 2 + }, + { + "ArtistId_6559": 2 + }, + { + "ArtistId_6559": 1 + }, + { + "ArtistId_6559": 3 + }, + { + "ArtistId_6559": 4 + }, + { + "ArtistId_6559": 5 + }, + { + "ArtistId_6559": 6 + }, + { + "ArtistId_6559": 7 + }, + { + "ArtistId_6559": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74a887d8fc18a89e/request.json b/test-snapshots/query/74a887d8fc18a89e/request.json new file mode 100644 index 0000000..a9cbb53 --- /dev/null +++ b/test-snapshots/query/74a887d8fc18a89e/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "ArtistId_6559": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/74aa42f4c462af05/expected.json b/test-snapshots/query/74aa42f4c462af05/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/74aa42f4c462af05/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74aa42f4c462af05/request.json b/test-snapshots/query/74aa42f4c462af05/request.json new file mode 100644 index 0000000..d1bf4af --- /dev/null +++ b/test-snapshots/query/74aa42f4c462af05/request.json @@ -0,0 +1,46 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/74bcfede959a358d/expected.json b/test-snapshots/query/74bcfede959a358d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/74bcfede959a358d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74bcfede959a358d/request.json b/test-snapshots/query/74bcfede959a358d/request.json new file mode 100644 index 0000000..20c1a4e --- /dev/null +++ b/test-snapshots/query/74bcfede959a358d/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/74d01668f576714b/expected.json b/test-snapshots/query/74d01668f576714b/expected.json new file mode 100644 index 0000000..7fb72ba --- /dev/null +++ b/test-snapshots/query/74d01668f576714b/expected.json @@ -0,0 +1,110 @@ +[ + { + "rows": [ + { + "Address_5017": "825 8 Ave SW", + "BirthDate_3800": "1958-12-08", + "City_9384": "Calgary", + "Email_7671": "nancy@chinookcorp.com", + "EmployeeId_1886": 2, + "FirstName_3812": "Nancy", + "HireDate_8711": "2002-05-01", + "LastName_6794": "Edwards", + "ReportsTo_3982": 1, + "State_5542": "AB", + "Title_0542": "Sales Manager" + }, + { + "Address_5017": "1111 6 Ave SW", + "BirthDate_3800": "1973-08-29", + "City_9384": "Calgary", + "Email_7671": "jane@chinookcorp.com", + "EmployeeId_1886": 3, + "FirstName_3812": "Jane", + "HireDate_8711": "2002-04-01", + "LastName_6794": "Peacock", + "ReportsTo_3982": 2, + "State_5542": "AB", + "Title_0542": "Sales Support Agent" + }, + { + "Address_5017": "683 10 Street SW", + "BirthDate_3800": "1947-09-19", + "City_9384": "Calgary", + "Email_7671": "margaret@chinookcorp.com", + "EmployeeId_1886": 4, + "FirstName_3812": "Margaret", + "HireDate_8711": "2003-05-03", + "LastName_6794": "Park", + "ReportsTo_3982": 2, + "State_5542": "AB", + "Title_0542": "Sales Support Agent" + }, + { + "Address_5017": "7727B 41 Ave", + "BirthDate_3800": "1965-03-03", + "City_9384": "Calgary", + "Email_7671": "steve@chinookcorp.com", + "EmployeeId_1886": 5, + "FirstName_3812": "Steve", + "HireDate_8711": "2003-10-17", + "LastName_6794": "Johnson", + "ReportsTo_3982": 2, + "State_5542": "AB", + "Title_0542": "Sales Support Agent" + }, + { + "Address_5017": "5827 Bowness Road NW", + "BirthDate_3800": "1973-07-01", + "City_9384": "Calgary", + "Email_7671": "michael@chinookcorp.com", + "EmployeeId_1886": 6, + "FirstName_3812": "Michael", + "HireDate_8711": "2003-10-17", + "LastName_6794": "Mitchell", + "ReportsTo_3982": 1, + "State_5542": "AB", + "Title_0542": "IT Manager" + }, + { + "Address_5017": "11120 Jasper Ave NW", + "BirthDate_3800": "1962-02-18", + "City_9384": "Edmonton", + "Email_7671": "andrew@chinookcorp.com", + "EmployeeId_1886": 1, + "FirstName_3812": "Andrew", + "HireDate_8711": "2002-08-14", + "LastName_6794": "Adams", + "ReportsTo_3982": null, + "State_5542": "AB", + "Title_0542": "General Manager" + }, + { + "Address_5017": "590 Columbia Boulevard West", + "BirthDate_3800": "1970-05-29", + "City_9384": "Lethbridge", + "Email_7671": "robert@chinookcorp.com", + "EmployeeId_1886": 7, + "FirstName_3812": "Robert", + "HireDate_8711": "2004-01-02", + "LastName_6794": "King", + "ReportsTo_3982": 6, + "State_5542": "AB", + "Title_0542": "IT Staff" + }, + { + "Address_5017": "923 7 ST NW", + "BirthDate_3800": "1968-01-09", + "City_9384": "Lethbridge", + "Email_7671": "laura@chinookcorp.com", + "EmployeeId_1886": 8, + "FirstName_3812": "Laura", + "HireDate_8711": "2004-03-04", + "LastName_6794": "Callahan", + "ReportsTo_3982": 6, + "State_5542": "AB", + "Title_0542": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74d01668f576714b/request.json b/test-snapshots/query/74d01668f576714b/request.json new file mode 100644 index 0000000..dcc8650 --- /dev/null +++ b/test-snapshots/query/74d01668f576714b/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_5017": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_3800": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_9384": { + "type": "column", + "column": "City", + "fields": null + }, + "Title_0542": { + "type": "column", + "column": "Title", + "fields": null + }, + "Email_7671": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_1886": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "State_5542": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_3812": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_8711": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6794": { + "type": "column", + "column": "LastName", + "fields": null + }, + "ReportsTo_3982": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/74efd432f48bc03b/expected.json b/test-snapshots/query/74efd432f48bc03b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/74efd432f48bc03b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74efd432f48bc03b/request.json b/test-snapshots/query/74efd432f48bc03b/request.json new file mode 100644 index 0000000..7a9e123 --- /dev/null +++ b/test-snapshots/query/74efd432f48bc03b/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/74f5012f6ec8b567/expected.json b/test-snapshots/query/74f5012f6ec8b567/expected.json new file mode 100644 index 0000000..fc0a316 --- /dev/null +++ b/test-snapshots/query/74f5012f6ec8b567/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_0378": 1 + }, + { + "MediaTypeId_0378": 2 + }, + { + "MediaTypeId_0378": 3 + }, + { + "MediaTypeId_0378": 4 + }, + { + "MediaTypeId_0378": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/74f5012f6ec8b567/request.json b/test-snapshots/query/74f5012f6ec8b567/request.json new file mode 100644 index 0000000..4b4b7bb --- /dev/null +++ b/test-snapshots/query/74f5012f6ec8b567/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_0378": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7508455ded5e756c/expected.json b/test-snapshots/query/7508455ded5e756c/expected.json new file mode 100644 index 0000000..cdc76dc --- /dev/null +++ b/test-snapshots/query/7508455ded5e756c/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo": { + "rows": [] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7508455ded5e756c/request.json b/test-snapshots/query/7508455ded5e756c/request.json new file mode 100644 index 0000000..2be1295 --- /dev/null +++ b/test-snapshots/query/7508455ded5e756c/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/750c67ef4c3985e5/expected.json b/test-snapshots/query/750c67ef4c3985e5/expected.json new file mode 100644 index 0000000..8406713 --- /dev/null +++ b/test-snapshots/query/750c67ef4c3985e5/expected.json @@ -0,0 +1,419 @@ +[ + { + "rows": [ + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2009-03-04", + "InvoiceId_7956": 15, + "Total_7017": 1.98 + }, + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2011-07-20", + "InvoiceId_7956": 210, + "Total_7017": 1.98 + }, + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2011-10-22", + "InvoiceId_7956": 233, + "Total_7017": 3.96 + }, + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1377, + "Quantity": 1, + "TrackId": 1370, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1378, + "Quantity": 1, + "TrackId": 1374, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1379, + "Quantity": 1, + "TrackId": 1378, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1380, + "Quantity": 1, + "TrackId": 1382, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2012-01-24", + "InvoiceId_7956": 255, + "Total_7017": 5.94 + }, + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 144, + "Quantity": 1, + "TrackId": 867, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 145, + "Quantity": 1, + "TrackId": 876, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2009-04-14", + "InvoiceId_7956": 26, + "Total_7017": 13.86 + }, + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 307, + "InvoiceLineId": 1670, + "Quantity": 1, + "TrackId": 3200, + "UnitPrice": 1.99 + } + ] + }, + "InvoiceDate_8557": "2012-09-13", + "InvoiceId_7956": 307, + "Total_7017": 1.99 + }, + { + "BillingAddress_3753": "1 Infinite Loop", + "BillingCity_8138": "Cupertino", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "95014", + "CustomerId_1147": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 81, + "InvoiceLineId": 431, + "Quantity": 1, + "TrackId": 2594, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 432, + "Quantity": 1, + "TrackId": 2600, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 433, + "Quantity": 1, + "TrackId": 2606, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 434, + "Quantity": 1, + "TrackId": 2612, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 435, + "Quantity": 1, + "TrackId": 2618, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 436, + "Quantity": 1, + "TrackId": 2624, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 437, + "Quantity": 1, + "TrackId": 2630, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 438, + "Quantity": 1, + "TrackId": 2636, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 439, + "Quantity": 1, + "TrackId": 2642, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2009-12-13", + "InvoiceId_7956": 81, + "Total_7017": 8.91 + }, + { + "BillingAddress_3753": "1 Microsoft Way", + "BillingCity_8138": "Redmond", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "98052-8300", + "CustomerId_1147": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2010-04-29", + "InvoiceId_7956": 111, + "Total_7017": 0.99 + }, + { + "BillingAddress_3753": "1 Microsoft Way", + "BillingCity_8138": "Redmond", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "98052-8300", + "CustomerId_1147": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2009-03-04", + "InvoiceId_7956": 14, + "Total_7017": 1.98 + }, + { + "BillingAddress_3753": "1 Microsoft Way", + "BillingCity_8138": "Redmond", + "BillingCountry_5773": "USA", + "BillingPostalCode_2949": "98052-8300", + "CustomerId_1147": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8557": "2011-10-21", + "InvoiceId_7956": 232, + "Total_7017": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/750c67ef4c3985e5/request.json b/test-snapshots/query/750c67ef4c3985e5/request.json new file mode 100644 index 0000000..2aa0dd8 --- /dev/null +++ b/test-snapshots/query/750c67ef4c3985e5/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_3753": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_8138": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_5773": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_2949": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "Total_7017": { + "type": "column", + "column": "Total", + "fields": null + }, + "CustomerId_1147": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_8557": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_7956": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/752fb3632c206619/expected.json b/test-snapshots/query/752fb3632c206619/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/752fb3632c206619/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/752fb3632c206619/request.json b/test-snapshots/query/752fb3632c206619/request.json new file mode 100644 index 0000000..ab58b5b --- /dev/null +++ b/test-snapshots/query/752fb3632c206619/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7532549f517faf7d/expected.json b/test-snapshots/query/7532549f517faf7d/expected.json new file mode 100644 index 0000000..921a29f --- /dev/null +++ b/test-snapshots/query/7532549f517faf7d/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1020 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1021 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1022 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1023 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1024 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1025 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1026 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1027 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1028 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_3412": "90’s Music", + "PlaylistId_3379": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7532549f517faf7d/request.json b/test-snapshots/query/7532549f517faf7d/request.json new file mode 100644 index 0000000..662fd0a --- /dev/null +++ b/test-snapshots/query/7532549f517faf7d/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name_3412": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_3379": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/753cdca0eecd28bf/expected.json b/test-snapshots/query/753cdca0eecd28bf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/753cdca0eecd28bf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/753cdca0eecd28bf/request.json b/test-snapshots/query/753cdca0eecd28bf/request.json new file mode 100644 index 0000000..864378f --- /dev/null +++ b/test-snapshots/query/753cdca0eecd28bf/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Hip Hop/Rap" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/75512863659ff112/expected.json b/test-snapshots/query/75512863659ff112/expected.json new file mode 100644 index 0000000..ab517a9 --- /dev/null +++ b/test-snapshots/query/75512863659ff112/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 347 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/75512863659ff112/request.json b/test-snapshots/query/75512863659ff112/request.json new file mode 100644 index 0000000..43ebbbb --- /dev/null +++ b/test-snapshots/query/75512863659ff112/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/75547886de845c77/expected.json b/test-snapshots/query/75547886de845c77/expected.json new file mode 100644 index 0000000..81471a0 --- /dev/null +++ b/test-snapshots/query/75547886de845c77/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_3386": 275, + "Name_0744": "Philip Glass Ensemble" + }, + { + "ArtistId_3386": 274, + "Name_0744": "Nash Ensemble" + }, + { + "ArtistId_3386": 273, + "Name_0744": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "ArtistId_3386": 272, + "Name_0744": "Emerson String Quartet" + }, + { + "ArtistId_3386": 271, + "Name_0744": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "ArtistId_3386": 270, + "Name_0744": "Gerald Moore" + }, + { + "ArtistId_3386": 269, + "Name_0744": "Michele Campanella" + }, + { + "ArtistId_3386": 268, + "Name_0744": "Itzhak Perlman" + }, + { + "ArtistId_3386": 267, + "Name_0744": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "ArtistId_3386": 266, + "Name_0744": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/75547886de845c77/request.json b/test-snapshots/query/75547886de845c77/request.json new file mode 100644 index 0000000..7b695f4 --- /dev/null +++ b/test-snapshots/query/75547886de845c77/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_3386": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_0744": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7554e68287e7a49/expected.json b/test-snapshots/query/7554e68287e7a49/expected.json new file mode 100644 index 0000000..f940431 --- /dev/null +++ b/test-snapshots/query/7554e68287e7a49/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7554e68287e7a49/request.json b/test-snapshots/query/7554e68287e7a49/request.json new file mode 100644 index 0000000..594b4cd --- /dev/null +++ b/test-snapshots/query/7554e68287e7a49/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7558294988046de6/expected.json b/test-snapshots/query/7558294988046de6/expected.json new file mode 100644 index 0000000..27e6010 --- /dev/null +++ b/test-snapshots/query/7558294988046de6/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7558294988046de6/request.json b/test-snapshots/query/7558294988046de6/request.json new file mode 100644 index 0000000..97d5383 --- /dev/null +++ b/test-snapshots/query/7558294988046de6/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/756362f0817bd36/expected.json b/test-snapshots/query/756362f0817bd36/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/756362f0817bd36/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/756362f0817bd36/request.json b/test-snapshots/query/756362f0817bd36/request.json new file mode 100644 index 0000000..b95ef23 --- /dev/null +++ b/test-snapshots/query/756362f0817bd36/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/757b042287d8b4b4/expected.json b/test-snapshots/query/757b042287d8b4b4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/757b042287d8b4b4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/757b042287d8b4b4/request.json b/test-snapshots/query/757b042287d8b4b4/request.json new file mode 100644 index 0000000..a55f7a1 --- /dev/null +++ b/test-snapshots/query/757b042287d8b4b4/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Put The Finger On You" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/758443677f5c5d81/expected.json b/test-snapshots/query/758443677f5c5d81/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/758443677f5c5d81/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/758443677f5c5d81/request.json b/test-snapshots/query/758443677f5c5d81/request.json new file mode 100644 index 0000000..3649c99 --- /dev/null +++ b/test-snapshots/query/758443677f5c5d81/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/758b3dfe207aaf81/expected.json b/test-snapshots/query/758b3dfe207aaf81/expected.json new file mode 100644 index 0000000..372fdd0 --- /dev/null +++ b/test-snapshots/query/758b3dfe207aaf81/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/758b3dfe207aaf81/request.json b/test-snapshots/query/758b3dfe207aaf81/request.json new file mode 100644 index 0000000..444d906 --- /dev/null +++ b/test-snapshots/query/758b3dfe207aaf81/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/759127443cf18bef/expected.json b/test-snapshots/query/759127443cf18bef/expected.json new file mode 100644 index 0000000..9027e8a --- /dev/null +++ b/test-snapshots/query/759127443cf18bef/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 3503 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/759127443cf18bef/request.json b/test-snapshots/query/759127443cf18bef/request.json new file mode 100644 index 0000000..ceff338 --- /dev/null +++ b/test-snapshots/query/759127443cf18bef/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Track", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/763c19ad7c219eed/expected.json b/test-snapshots/query/763c19ad7c219eed/expected.json new file mode 100644 index 0000000..80c178f --- /dev/null +++ b/test-snapshots/query/763c19ad7c219eed/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_5094": 347, + "ArtistId_9729": 275, + "Title_4545": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_5094": 346, + "ArtistId_9729": 274, + "Title_4545": "Mozart: Chamber Music" + }, + { + "AlbumId_5094": 345, + "ArtistId_9729": 273, + "Title_4545": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_5094": 344, + "ArtistId_9729": 272, + "Title_4545": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_5094": 343, + "ArtistId_9729": 226, + "Title_4545": "Respighi:Pines of Rome" + }, + { + "AlbumId_5094": 342, + "ArtistId_9729": 271, + "Title_4545": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_5094": 341, + "ArtistId_9729": 270, + "Title_4545": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_5094": 340, + "ArtistId_9729": 269, + "Title_4545": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_5094": 339, + "ArtistId_9729": 268, + "Title_4545": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_5094": 338, + "ArtistId_9729": 267, + "Title_4545": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/763c19ad7c219eed/request.json b/test-snapshots/query/763c19ad7c219eed/request.json new file mode 100644 index 0000000..0fb4e92 --- /dev/null +++ b/test-snapshots/query/763c19ad7c219eed/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_5094": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_9729": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_4545": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/765b9d2c68d57c1d/expected.json b/test-snapshots/query/765b9d2c68d57c1d/expected.json new file mode 100644 index 0000000..39e4909 --- /dev/null +++ b/test-snapshots/query/765b9d2c68d57c1d/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/765b9d2c68d57c1d/request.json b/test-snapshots/query/765b9d2c68d57c1d/request.json new file mode 100644 index 0000000..7dfc689 --- /dev/null +++ b/test-snapshots/query/765b9d2c68d57c1d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Put The Finger On You" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7699fbdb47bfb18d/expected.json b/test-snapshots/query/7699fbdb47bfb18d/expected.json new file mode 100644 index 0000000..081019e --- /dev/null +++ b/test-snapshots/query/7699fbdb47bfb18d/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_4880": 275 + }, + { + "ArtistId_4880": 274 + }, + { + "ArtistId_4880": 273 + }, + { + "ArtistId_4880": 272 + }, + { + "ArtistId_4880": 271 + }, + { + "ArtistId_4880": 270 + }, + { + "ArtistId_4880": 269 + }, + { + "ArtistId_4880": 268 + }, + { + "ArtistId_4880": 267 + }, + { + "ArtistId_4880": 266 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7699fbdb47bfb18d/request.json b/test-snapshots/query/7699fbdb47bfb18d/request.json new file mode 100644 index 0000000..cfac4a2 --- /dev/null +++ b/test-snapshots/query/7699fbdb47bfb18d/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_4880": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/76afcee59f476943/expected.json b/test-snapshots/query/76afcee59f476943/expected.json new file mode 100644 index 0000000..bf07c5e --- /dev/null +++ b/test-snapshots/query/76afcee59f476943/expected.json @@ -0,0 +1,206 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_5783": 1, + "ArtistId_5360": 1, + "Title_8799": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/76afcee59f476943/request.json b/test-snapshots/query/76afcee59f476943/request.json new file mode 100644 index 0000000..a91ffe3 --- /dev/null +++ b/test-snapshots/query/76afcee59f476943/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_5783": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_5360": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_8799": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/76d61f0475e6f4f2/expected.json b/test-snapshots/query/76d61f0475e6f4f2/expected.json new file mode 100644 index 0000000..b02523f --- /dev/null +++ b/test-snapshots/query/76d61f0475e6f4f2/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "Email_max_9221": "steve@chinookcorp.com" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/76d61f0475e6f4f2/request.json b/test-snapshots/query/76d61f0475e6f4f2/request.json new file mode 100644 index 0000000..c407192 --- /dev/null +++ b/test-snapshots/query/76d61f0475e6f4f2/request.json @@ -0,0 +1,15 @@ +{ + "collection": "chinook.Employee", + "query": { + "aggregates": { + "Email_max_9221": { + "type": "single_column", + "column": "Email", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/77275fdab0d74f3c/expected.json b/test-snapshots/query/77275fdab0d74f3c/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/77275fdab0d74f3c/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/77275fdab0d74f3c/request.json b/test-snapshots/query/77275fdab0d74f3c/request.json new file mode 100644 index 0000000..67a6772 --- /dev/null +++ b/test-snapshots/query/77275fdab0d74f3c/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/772beeec4832bd21/expected.json b/test-snapshots/query/772beeec4832bd21/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/772beeec4832bd21/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/772beeec4832bd21/request.json b/test-snapshots/query/772beeec4832bd21/request.json new file mode 100644 index 0000000..607da06 --- /dev/null +++ b/test-snapshots/query/772beeec4832bd21/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/77661d4b8b1f31c3/expected.json b/test-snapshots/query/77661d4b8b1f31c3/expected.json new file mode 100644 index 0000000..78feff2 --- /dev/null +++ b/test-snapshots/query/77661d4b8b1f31c3/expected.json @@ -0,0 +1,262 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 6 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 2 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 7 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8567": 1000 + }, + { + "TrackId_8567": 1001 + }, + { + "TrackId_8567": 1002 + }, + { + "TrackId_8567": 1003 + }, + { + "TrackId_8567": 1004 + }, + { + "TrackId_8567": 1005 + }, + { + "TrackId_8567": 1006 + }, + { + "TrackId_8567": 1007 + }, + { + "TrackId_8567": 1008 + }, + { + "TrackId_8567": 1009 + } + ] + }, + "Name": "Music", + "PlaylistId": 1 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8567": 1000 + }, + { + "TrackId_8567": 1001 + }, + { + "TrackId_8567": 1002 + }, + { + "TrackId_8567": 1003 + }, + { + "TrackId_8567": 1004 + }, + { + "TrackId_8567": 1005 + }, + { + "TrackId_8567": 1006 + }, + { + "TrackId_8567": 1007 + }, + { + "TrackId_8567": 1008 + }, + { + "TrackId_8567": 1009 + } + ] + }, + "Name": "Music", + "PlaylistId": 8 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8567": 1020 + }, + { + "TrackId_8567": 1021 + }, + { + "TrackId_8567": 1022 + }, + { + "TrackId_8567": 1023 + }, + { + "TrackId_8567": 1024 + }, + { + "TrackId_8567": 1025 + }, + { + "TrackId_8567": 1026 + }, + { + "TrackId_8567": 1027 + }, + { + "TrackId_8567": 1028 + }, + { + "TrackId_8567": 1029 + } + ] + }, + "Name": "90’s Music", + "PlaylistId": 5 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8567": 1088 + }, + { + "TrackId_8567": 1093 + }, + { + "TrackId_8567": 1099 + }, + { + "TrackId_8567": 1105 + }, + { + "TrackId_8567": 1514 + }, + { + "TrackId_8567": 1518 + }, + { + "TrackId_8567": 1519 + }, + { + "TrackId_8567": 1916 + }, + { + "TrackId_8567": 1921 + }, + { + "TrackId_8567": 1928 + } + ] + }, + "Name": "Brazilian Music", + "PlaylistId": 11 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8567": 1278 + }, + { + "TrackId_8567": 1283 + }, + { + "TrackId_8567": 1335 + }, + { + "TrackId_8567": 1345 + }, + { + "TrackId_8567": 1380 + }, + { + "TrackId_8567": 1392 + }, + { + "TrackId_8567": 152 + }, + { + "TrackId_8567": 160 + }, + { + "TrackId_8567": 1801 + }, + { + "TrackId_8567": 1830 + } + ] + }, + "Name": "Heavy Metal Classic", + "PlaylistId": 17 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8567": 2003 + }, + { + "TrackId_8567": 2004 + }, + { + "TrackId_8567": 2005 + }, + { + "TrackId_8567": 2007 + }, + { + "TrackId_8567": 2010 + }, + { + "TrackId_8567": 2013 + }, + { + "TrackId_8567": 2194 + }, + { + "TrackId_8567": 2195 + }, + { + "TrackId_8567": 2198 + }, + { + "TrackId_8567": 2206 + } + ] + }, + "Name": "Grunge", + "PlaylistId": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/77661d4b8b1f31c3/request.json b/test-snapshots/query/77661d4b8b1f31c3/request.json new file mode 100644 index 0000000..4eae26d --- /dev/null +++ b/test-snapshots/query/77661d4b8b1f31c3/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "TrackId_8567": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7786e7fe16b8239a/expected.json b/test-snapshots/query/7786e7fe16b8239a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7786e7fe16b8239a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7786e7fe16b8239a/request.json b/test-snapshots/query/7786e7fe16b8239a/request.json new file mode 100644 index 0000000..906aeeb --- /dev/null +++ b/test-snapshots/query/7786e7fe16b8239a/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/77a9070a92f47577/expected.json b/test-snapshots/query/77a9070a92f47577/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/77a9070a92f47577/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/77a9070a92f47577/request.json b/test-snapshots/query/77a9070a92f47577/request.json new file mode 100644 index 0000000..1bb31d7 --- /dev/null +++ b/test-snapshots/query/77a9070a92f47577/request.json @@ -0,0 +1,91 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 307 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/77afebe6a35c9a48/expected.json b/test-snapshots/query/77afebe6a35c9a48/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/77afebe6a35c9a48/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/77afebe6a35c9a48/request.json b/test-snapshots/query/77afebe6a35c9a48/request.json new file mode 100644 index 0000000..5505a30 --- /dev/null +++ b/test-snapshots/query/77afebe6a35c9a48/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/77ffe85e25974abe/expected.json b/test-snapshots/query/77ffe85e25974abe/expected.json new file mode 100644 index 0000000..0c398fb --- /dev/null +++ b/test-snapshots/query/77ffe85e25974abe/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + }, + { + "BillingAddress": "Praça Pio X, 119", + "BillingCity": "Rio de Janeiro", + "BillingCountry": "Brazil", + "BillingPostalCode": "20040-020", + "BillingState": "RJ", + "CustomerId": 12, + "InvoiceDate": "2011-08-25", + "InvoiceId": 221, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/77ffe85e25974abe/request.json b/test-snapshots/query/77ffe85e25974abe/request.json new file mode 100644 index 0000000..74154fe --- /dev/null +++ b/test-snapshots/query/77ffe85e25974abe/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 264 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/780aa9d45a7fc2a1/expected.json b/test-snapshots/query/780aa9d45a7fc2a1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/780aa9d45a7fc2a1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/780aa9d45a7fc2a1/request.json b/test-snapshots/query/780aa9d45a7fc2a1/request.json new file mode 100644 index 0000000..c623e64 --- /dev/null +++ b/test-snapshots/query/780aa9d45a7fc2a1/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/782700762a4b5a31/expected.json b/test-snapshots/query/782700762a4b5a31/expected.json new file mode 100644 index 0000000..3324a1c --- /dev/null +++ b/test-snapshots/query/782700762a4b5a31/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingAddress_2884": "Theodor-Heuss-Straße 34", + "BillingCountry_4964": "Germany", + "BillingPostalCode_7122": "70174", + "CustomerId_2202": 2, + "InvoiceDate_5665": "2009-01-01", + "InvoiceId_0515": 1, + "Total_6751": 1.98 + }, + { + "BillingAddress_2884": "Ullevålsveien 14", + "BillingCountry_4964": "Norway", + "BillingPostalCode_7122": "0171", + "CustomerId_2202": 4, + "InvoiceDate_5665": "2009-01-02", + "InvoiceId_0515": 2, + "Total_6751": 3.96 + }, + { + "BillingAddress_2884": "Grétrystraat 63", + "BillingCountry_4964": "Belgium", + "BillingPostalCode_7122": "1000", + "CustomerId_2202": 8, + "InvoiceDate_5665": "2009-01-03", + "InvoiceId_0515": 3, + "Total_6751": 5.94 + }, + { + "BillingAddress_2884": "Berger Straße 10", + "BillingCountry_4964": "Germany", + "BillingPostalCode_7122": "60316", + "CustomerId_2202": 37, + "InvoiceDate_5665": "2009-01-19", + "InvoiceId_0515": 6, + "Total_6751": 0.99 + }, + { + "BillingAddress_2884": "Barbarossastraße 19", + "BillingCountry_4964": "Germany", + "BillingPostalCode_7122": "10779", + "CustomerId_2202": 38, + "InvoiceDate_5665": "2009-02-01", + "InvoiceId_0515": 7, + "Total_6751": 1.98 + }, + { + "BillingAddress_2884": "8, Rue Hanovre", + "BillingCountry_4964": "France", + "BillingPostalCode_7122": "75002", + "CustomerId_2202": 40, + "InvoiceDate_5665": "2009-02-01", + "InvoiceId_0515": 8, + "Total_6751": 1.98 + }, + { + "BillingAddress_2884": "9, Place Louis Barthou", + "BillingCountry_4964": "France", + "BillingPostalCode_7122": "33000", + "CustomerId_2202": 42, + "InvoiceDate_5665": "2009-02-02", + "InvoiceId_0515": 9, + "Total_6751": 3.96 + }, + { + "BillingAddress_2884": "202 Hoxton Street", + "BillingCountry_4964": "United Kingdom", + "BillingPostalCode_7122": "N1 5LH", + "CustomerId_2202": 52, + "InvoiceDate_5665": "2009-02-06", + "InvoiceId_0515": 11, + "Total_6751": 8.91 + }, + { + "BillingAddress_2884": "Theodor-Heuss-Straße 34", + "BillingCountry_4964": "Germany", + "BillingPostalCode_7122": "70174", + "CustomerId_2202": 2, + "InvoiceDate_5665": "2009-02-11", + "InvoiceId_0515": 12, + "Total_6751": 13.86 + }, + { + "BillingAddress_2884": "8, Rue Hanovre", + "BillingCountry_4964": "France", + "BillingPostalCode_7122": "75002", + "CustomerId_2202": 40, + "InvoiceDate_5665": "2009-03-14", + "InvoiceId_0515": 19, + "Total_6751": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/782700762a4b5a31/request.json b/test-snapshots/query/782700762a4b5a31/request.json new file mode 100644 index 0000000..aa0737c --- /dev/null +++ b/test-snapshots/query/782700762a4b5a31/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_2884": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "Total_6751": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCountry_4964": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_7122": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "InvoiceId_0515": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "CustomerId_2202": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_5665": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/784bda3cb3438291/expected.json b/test-snapshots/query/784bda3cb3438291/expected.json new file mode 100644 index 0000000..7a40d97 --- /dev/null +++ b/test-snapshots/query/784bda3cb3438291/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 11170334, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 343719, + "Name_0189": "For Those About To Rock (We Salute You)", + "TrackId_7128": 1, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 11170334, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 343719, + "Name_0189": "For Those About To Rock (We Salute You)", + "TrackId_7128": 1, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 17, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 11170334, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 343719, + "Name_0189": "For Those About To Rock (We Salute You)", + "TrackId_7128": 1, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6566314, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 199836, + "Name_0189": "C.O.D.", + "TrackId_7128": 11, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6566314, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 199836, + "Name_0189": "C.O.D.", + "TrackId_7128": 11, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6599424, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 203102, + "Name_0189": "Snowballed", + "TrackId_7128": 9, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6599424, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 203102, + "Name_0189": "Snowballed", + "TrackId_7128": 9, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6706347, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 205688, + "Name_0189": "Night Of The Long Knives", + "TrackId_7128": 13, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6706347, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 205688, + "Name_0189": "Night Of The Long Knives", + "TrackId_7128": 13, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId_0621": 1, + "Bytes_6357": 6713451, + "Composer_0519": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7114": 1, + "MediaTypeId_4264": 1, + "Milliseconds_0948": 205662, + "Name_0189": "Put The Finger On You", + "TrackId_7128": 6, + "UnitPrice_8825": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/784bda3cb3438291/request.json b/test-snapshots/query/784bda3cb3438291/request.json new file mode 100644 index 0000000..2738fe2 --- /dev/null +++ b/test-snapshots/query/784bda3cb3438291/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_0621": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6357": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_0519": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_7114": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4264": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_0948": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_0189": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_7128": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_8825": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/78663a0a74a714aa/expected.json b/test-snapshots/query/78663a0a74a714aa/expected.json new file mode 100644 index 0000000..8375c71 --- /dev/null +++ b/test-snapshots/query/78663a0a74a714aa/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_5380": 5, + "Name_8003": "AAC audio file" + }, + { + "MediaTypeId_5380": 4, + "Name_8003": "Purchased AAC audio file" + }, + { + "MediaTypeId_5380": 3, + "Name_8003": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_5380": 2, + "Name_8003": "Protected AAC audio file" + }, + { + "MediaTypeId_5380": 1, + "Name_8003": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78663a0a74a714aa/request.json b/test-snapshots/query/78663a0a74a714aa/request.json new file mode 100644 index 0000000..6a8c2b8 --- /dev/null +++ b/test-snapshots/query/78663a0a74a714aa/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_5380": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_8003": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7882c4e8d0b83621/expected.json b/test-snapshots/query/7882c4e8d0b83621/expected.json new file mode 100644 index 0000000..80a6178 --- /dev/null +++ b/test-snapshots/query/7882c4e8d0b83621/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "PostalCode_min_2853": "T1H 1Y8" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/7882c4e8d0b83621/request.json b/test-snapshots/query/7882c4e8d0b83621/request.json new file mode 100644 index 0000000..8a865c5 --- /dev/null +++ b/test-snapshots/query/7882c4e8d0b83621/request.json @@ -0,0 +1,15 @@ +{ + "collection": "chinook.Employee", + "query": { + "aggregates": { + "PostalCode_min_2853": { + "type": "single_column", + "column": "PostalCode", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/78a9b5394f62cfb1/expected.json b/test-snapshots/query/78a9b5394f62cfb1/expected.json new file mode 100644 index 0000000..f65180d --- /dev/null +++ b/test-snapshots/query/78a9b5394f62cfb1/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2009-03-06", + "Total_5192": 5.94 + }, + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2009-10-25", + "Total_5192": 0.99 + }, + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2011-04-18", + "Total_5192": 1.98 + }, + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2011-05-29", + "Total_5192": 18.86 + }, + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2012-01-27", + "Total_5192": 8.91 + }, + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2013-09-02", + "Total_5192": 1.98 + }, + { + "BillingAddress_4761": "319 N. Frances Street", + "BillingCity_6207": "Madison", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "53703", + "BillingState_9380": "WI", + "CustomerId_5019": 25, + "InvoiceDate_7260": "2013-12-05", + "Total_5192": 3.96 + }, + { + "BillingAddress_4761": "1 Microsoft Way", + "BillingCity_6207": "Redmond", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "98052-8300", + "BillingState_9380": "WA", + "CustomerId_5019": 17, + "InvoiceDate_7260": "2009-03-04", + "Total_5192": 1.98 + }, + { + "BillingAddress_4761": "1 Microsoft Way", + "BillingCity_6207": "Redmond", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "98052-8300", + "BillingState_9380": "WA", + "CustomerId_5019": 17, + "InvoiceDate_7260": "2009-06-06", + "Total_5192": 3.96 + }, + { + "BillingAddress_4761": "1 Microsoft Way", + "BillingCity_6207": "Redmond", + "BillingCountry_2458": "USA", + "BillingPostalCode_0825": "98052-8300", + "BillingState_9380": "WA", + "CustomerId_5019": 17, + "InvoiceDate_7260": "2009-09-08", + "Total_5192": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78a9b5394f62cfb1/request.json b/test-snapshots/query/78a9b5394f62cfb1/request.json new file mode 100644 index 0000000..551061f --- /dev/null +++ b/test-snapshots/query/78a9b5394f62cfb1/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_4761": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_6207": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_2458": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_0825": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_9380": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_5019": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_7260": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "Total_5192": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/78b2eca44fdada2b/expected.json b/test-snapshots/query/78b2eca44fdada2b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/78b2eca44fdada2b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78b2eca44fdada2b/request.json b/test-snapshots/query/78b2eca44fdada2b/request.json new file mode 100644 index 0000000..600c839 --- /dev/null +++ b/test-snapshots/query/78b2eca44fdada2b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/78c4f533826f63cd/expected.json b/test-snapshots/query/78c4f533826f63cd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/78c4f533826f63cd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78c4f533826f63cd/request.json b/test-snapshots/query/78c4f533826f63cd/request.json new file mode 100644 index 0000000..b4fd5a7 --- /dev/null +++ b/test-snapshots/query/78c4f533826f63cd/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/78cc541b1ab96b60/expected.json b/test-snapshots/query/78cc541b1ab96b60/expected.json new file mode 100644 index 0000000..85962b7 --- /dev/null +++ b/test-snapshots/query/78cc541b1ab96b60/expected.json @@ -0,0 +1,466 @@ +[ + { + "rows": [ + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 161, + "InvoiceLineId": 873, + "Quantity": 1, + "TrackId": 1832, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 161, + "InvoiceLineId": 874, + "Quantity": 1, + "TrackId": 1833, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2010-12-15", + "InvoiceId_8101": 161 + }, + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 184, + "InvoiceLineId": 991, + "Quantity": 1, + "TrackId": 2535, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 184, + "InvoiceLineId": 992, + "Quantity": 1, + "TrackId": 2537, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 184, + "InvoiceLineId": 993, + "Quantity": 1, + "TrackId": 2539, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 184, + "InvoiceLineId": 994, + "Quantity": 1, + "TrackId": 2541, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2011-03-19", + "InvoiceId_8101": 184 + }, + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 206, + "InvoiceLineId": 1109, + "Quantity": 1, + "TrackId": 3241, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1110, + "Quantity": 1, + "TrackId": 3245, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1111, + "Quantity": 1, + "TrackId": 3249, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1112, + "Quantity": 1, + "TrackId": 3253, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1113, + "Quantity": 1, + "TrackId": 3257, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1114, + "Quantity": 1, + "TrackId": 3261, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2011-06-21", + "InvoiceId_8101": 206 + }, + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 258, + "InvoiceLineId": 1404, + "Quantity": 1, + "TrackId": 1576, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2012-02-09", + "InvoiceId_8101": 258 + }, + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 32, + "InvoiceLineId": 165, + "Quantity": 1, + "TrackId": 970, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 166, + "Quantity": 1, + "TrackId": 976, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 167, + "Quantity": 1, + "TrackId": 982, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 168, + "Quantity": 1, + "TrackId": 988, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 169, + "Quantity": 1, + "TrackId": 994, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 170, + "Quantity": 1, + "TrackId": 1000, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 171, + "Quantity": 1, + "TrackId": 1006, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 172, + "Quantity": 1, + "TrackId": 1012, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 173, + "Quantity": 1, + "TrackId": 1018, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2009-05-10", + "InvoiceId_8101": 32 + }, + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 379, + "InvoiceLineId": 2053, + "Quantity": 1, + "TrackId": 2021, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 379, + "InvoiceLineId": 2054, + "Quantity": 1, + "TrackId": 2023, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2013-08-02", + "InvoiceId_8101": 379 + }, + { + "BillingCity_4704": "Amsterdam", + "BillingPostalCode_0557": "1016", + "BillingState_6016": "VV", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 390, + "InvoiceLineId": 2112, + "Quantity": 1, + "TrackId": 2350, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2113, + "Quantity": 1, + "TrackId": 2359, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2114, + "Quantity": 1, + "TrackId": 2368, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2115, + "Quantity": 1, + "TrackId": 2377, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2116, + "Quantity": 1, + "TrackId": 2386, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2117, + "Quantity": 1, + "TrackId": 2395, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2118, + "Quantity": 1, + "TrackId": 2404, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2119, + "Quantity": 1, + "TrackId": 2413, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2120, + "Quantity": 1, + "TrackId": 2422, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2121, + "Quantity": 1, + "TrackId": 2431, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2013-09-12", + "InvoiceId_8101": 390 + }, + { + "BillingCity_4704": "Bangalore", + "BillingPostalCode_0557": "560001", + "BillingState_6016": null, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 218, + "InvoiceLineId": 1179, + "Quantity": 1, + "TrackId": 188, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 218, + "InvoiceLineId": 1180, + "Quantity": 1, + "TrackId": 190, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2011-08-20", + "InvoiceId_8101": 218 + }, + { + "BillingCity_4704": "Bangalore", + "BillingPostalCode_0557": "560001", + "BillingState_6016": null, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 229, + "InvoiceLineId": 1238, + "Quantity": 1, + "TrackId": 517, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1239, + "Quantity": 1, + "TrackId": 526, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1240, + "Quantity": 1, + "TrackId": 535, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1241, + "Quantity": 1, + "TrackId": 544, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1242, + "Quantity": 1, + "TrackId": 553, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1243, + "Quantity": 1, + "TrackId": 562, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1244, + "Quantity": 1, + "TrackId": 571, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1245, + "Quantity": 1, + "TrackId": 580, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1246, + "Quantity": 1, + "TrackId": 589, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1247, + "Quantity": 1, + "TrackId": 598, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2011-09-30", + "InvoiceId_8101": 229 + }, + { + "BillingCity_4704": "Bangalore", + "BillingPostalCode_0557": "560001", + "BillingState_6016": null, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 23, + "InvoiceLineId": 117, + "Quantity": 1, + "TrackId": 702, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 23, + "InvoiceLineId": 118, + "Quantity": 1, + "TrackId": 704, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 23, + "InvoiceLineId": 119, + "Quantity": 1, + "TrackId": 706, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 23, + "InvoiceLineId": 120, + "Quantity": 1, + "TrackId": 708, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_8942": "2009-04-05", + "InvoiceId_8101": 23 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78cc541b1ab96b60/request.json b/test-snapshots/query/78cc541b1ab96b60/request.json new file mode 100644 index 0000000..755be96 --- /dev/null +++ b/test-snapshots/query/78cc541b1ab96b60/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceDate_8942": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "BillingCity_4704": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "InvoiceId_8101": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingPostalCode_0557": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_6016": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/78d7a1e9646851d1/expected.json b/test-snapshots/query/78d7a1e9646851d1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/78d7a1e9646851d1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78d7a1e9646851d1/request.json b/test-snapshots/query/78d7a1e9646851d1/request.json new file mode 100644 index 0000000..9b9bc82 --- /dev/null +++ b/test-snapshots/query/78d7a1e9646851d1/request.json @@ -0,0 +1,127 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/78f3dc9419f67bef/expected.json b/test-snapshots/query/78f3dc9419f67bef/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/78f3dc9419f67bef/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/78f3dc9419f67bef/request.json b/test-snapshots/query/78f3dc9419f67bef/request.json new file mode 100644 index 0000000..5d2695a --- /dev/null +++ b/test-snapshots/query/78f3dc9419f67bef/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 252 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 48 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/79293dbdfe129afb/expected.json b/test-snapshots/query/79293dbdfe129afb/expected.json new file mode 100644 index 0000000..cf57ede --- /dev/null +++ b/test-snapshots/query/79293dbdfe129afb/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/79293dbdfe129afb/request.json b/test-snapshots/query/79293dbdfe129afb/request.json new file mode 100644 index 0000000..cf2aaba --- /dev/null +++ b/test-snapshots/query/79293dbdfe129afb/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7947bf6649c83a46/expected.json b/test-snapshots/query/7947bf6649c83a46/expected.json new file mode 100644 index 0000000..34b9627 --- /dev/null +++ b/test-snapshots/query/7947bf6649c83a46/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "AlbumId_7565": 239, + "GenreId_0078": 1, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 157962, + "Name_0323": "\"40\"", + "TrackId_5238": 3027, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 231, + "GenreId_0078": 19, + "MediaTypeId_2747": 3, + "Milliseconds_6636": 2782333, + "Name_0323": "\"?\"", + "TrackId_5238": 2918, + "UnitPrice_4543": 1.99 + }, + { + "AlbumId_7565": 281, + "GenreId_0078": 24, + "MediaTypeId_2747": 2, + "Milliseconds_6636": 348971, + "Name_0323": "\"Eine Kleine Nachtmusik\" Serenade In G, K. 525: I. Allegro", + "TrackId_5238": 3412, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 11, + "GenreId_0078": 4, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 299102, + "Name_0323": "#1 Zero", + "TrackId_5238": 109, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 255, + "GenreId_0078": 9, + "MediaTypeId_2747": 2, + "Milliseconds_6636": 278312, + "Name_0323": "#9 Dream", + "TrackId_5238": 3254, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 48, + "GenreId_0078": 2, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 357459, + "Name_0323": "'Round Midnight", + "TrackId_5238": 602, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 150, + "GenreId_0078": 3, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 254955, + "Name_0323": "(Anesthesia) Pulling Teeth", + "TrackId_5238": 1833, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 46, + "GenreId_0078": 1, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 353488, + "Name_0323": "(Da Le) Yaleo", + "TrackId_5238": 570, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 241, + "GenreId_0078": 8, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 207568, + "Name_0323": "(I Can't Help) Falling In Love With You", + "TrackId_5238": 3045, + "UnitPrice_4543": 0.99 + }, + { + "AlbumId_7565": 242, + "GenreId_0078": 1, + "MediaTypeId_2747": 1, + "Milliseconds_6636": 174680, + "Name_0323": "(Oh) Pretty Woman", + "TrackId_5238": 3057, + "UnitPrice_4543": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7947bf6649c83a46/request.json b/test-snapshots/query/7947bf6649c83a46/request.json new file mode 100644 index 0000000..4fa96c3 --- /dev/null +++ b/test-snapshots/query/7947bf6649c83a46/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_7565": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "TrackId_5238": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_4543": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "GenreId_0078": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_2747": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_6636": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_0323": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7970712e16240f97/expected.json b/test-snapshots/query/7970712e16240f97/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/7970712e16240f97/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7970712e16240f97/request.json b/test-snapshots/query/7970712e16240f97/request.json new file mode 100644 index 0000000..4e7953f --- /dev/null +++ b/test-snapshots/query/7970712e16240f97/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tucson" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "patrick.gray@aol.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/79788dafe2e6d308/expected.json b/test-snapshots/query/79788dafe2e6d308/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/79788dafe2e6d308/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/79788dafe2e6d308/request.json b/test-snapshots/query/79788dafe2e6d308/request.json new file mode 100644 index 0000000..fc7b3e5 --- /dev/null +++ b/test-snapshots/query/79788dafe2e6d308/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/79bd7c4a99c9721a/expected.json b/test-snapshots/query/79bd7c4a99c9721a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/79bd7c4a99c9721a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/79bd7c4a99c9721a/request.json b/test-snapshots/query/79bd7c4a99c9721a/request.json new file mode 100644 index 0000000..84b09f7 --- /dev/null +++ b/test-snapshots/query/79bd7c4a99c9721a/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/79c1912604a942ca/expected.json b/test-snapshots/query/79c1912604a942ca/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/79c1912604a942ca/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/79c1912604a942ca/request.json b/test-snapshots/query/79c1912604a942ca/request.json new file mode 100644 index 0000000..8733e8b --- /dev/null +++ b/test-snapshots/query/79c1912604a942ca/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/79cec7274c708e64/expected.json b/test-snapshots/query/79cec7274c708e64/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/79cec7274c708e64/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/79cec7274c708e64/request.json b/test-snapshots/query/79cec7274c708e64/request.json new file mode 100644 index 0000000..ea360b7 --- /dev/null +++ b/test-snapshots/query/79cec7274c708e64/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/79e308d02fa98b66/expected.json b/test-snapshots/query/79e308d02fa98b66/expected.json new file mode 100644 index 0000000..3e58765 --- /dev/null +++ b/test-snapshots/query/79e308d02fa98b66/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_0927": 347, + "ArtistId_3126": 275, + "Title_4322": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_0927": 346, + "ArtistId_3126": 274, + "Title_4322": "Mozart: Chamber Music" + }, + { + "AlbumId_0927": 345, + "ArtistId_3126": 273, + "Title_4322": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_0927": 344, + "ArtistId_3126": 272, + "Title_4322": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_0927": 343, + "ArtistId_3126": 226, + "Title_4322": "Respighi:Pines of Rome" + }, + { + "AlbumId_0927": 342, + "ArtistId_3126": 271, + "Title_4322": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_0927": 341, + "ArtistId_3126": 270, + "Title_4322": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_0927": 340, + "ArtistId_3126": 269, + "Title_4322": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_0927": 339, + "ArtistId_3126": 268, + "Title_4322": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_0927": 338, + "ArtistId_3126": 267, + "Title_4322": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/79e308d02fa98b66/request.json b/test-snapshots/query/79e308d02fa98b66/request.json new file mode 100644 index 0000000..6495e65 --- /dev/null +++ b/test-snapshots/query/79e308d02fa98b66/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_0927": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_3126": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_4322": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7a2332346f0e9a1f/expected.json b/test-snapshots/query/7a2332346f0e9a1f/expected.json new file mode 100644 index 0000000..485222c --- /dev/null +++ b/test-snapshots/query/7a2332346f0e9a1f/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7a2332346f0e9a1f/request.json b/test-snapshots/query/7a2332346f0e9a1f/request.json new file mode 100644 index 0000000..50d0b59 --- /dev/null +++ b/test-snapshots/query/7a2332346f0e9a1f/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-05-01" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Manager" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7a73dc3f0e764191/expected.json b/test-snapshots/query/7a73dc3f0e764191/expected.json new file mode 100644 index 0000000..04a1df9 --- /dev/null +++ b/test-snapshots/query/7a73dc3f0e764191/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7a73dc3f0e764191/request.json b/test-snapshots/query/7a73dc3f0e764191/request.json new file mode 100644 index 0000000..42e5887 --- /dev/null +++ b/test-snapshots/query/7a73dc3f0e764191/request.json @@ -0,0 +1,127 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7aa6ee4dae29242c/expected.json b/test-snapshots/query/7aa6ee4dae29242c/expected.json new file mode 100644 index 0000000..f9bb2ea --- /dev/null +++ b/test-snapshots/query/7aa6ee4dae29242c/expected.json @@ -0,0 +1,14 @@ +[ + { + "aggregates": { + "Name_count_2777": 18, + "Name_max_8454": "TV Shows", + "Name_min_4359": "90’s Music", + "PlaylistId_avg_0141": 9.5, + "PlaylistId_count_6420": 18, + "PlaylistId_median_2083": 9.5, + "PlaylistId_min_2862": 1, + "PlaylistId_sum_4356": 171 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/7aa6ee4dae29242c/request.json b/test-snapshots/query/7aa6ee4dae29242c/request.json new file mode 100644 index 0000000..4f3de7c --- /dev/null +++ b/test-snapshots/query/7aa6ee4dae29242c/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "aggregates": { + "PlaylistId_sum_4356": { + "type": "single_column", + "column": "PlaylistId", + "function": "sum" + }, + "Name_count_2777": { + "type": "single_column", + "column": "Name", + "function": "count" + }, + "Name_max_8454": { + "type": "single_column", + "column": "Name", + "function": "max" + }, + "Name_min_4359": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "PlaylistId_avg_0141": { + "type": "single_column", + "column": "PlaylistId", + "function": "avg" + }, + "PlaylistId_count_6420": { + "type": "single_column", + "column": "PlaylistId", + "function": "count" + }, + "PlaylistId_median_2083": { + "type": "single_column", + "column": "PlaylistId", + "function": "median" + }, + "PlaylistId_min_2862": { + "type": "single_column", + "column": "PlaylistId", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7abef36b4a166ffc/expected.json b/test-snapshots/query/7abef36b4a166ffc/expected.json new file mode 100644 index 0000000..058f427 --- /dev/null +++ b/test-snapshots/query/7abef36b4a166ffc/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "GenreId": 11, + "Name": "Bossa Nova" + }, + { + "GenreId": 12, + "Name": "Easy Listening" + }, + { + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "GenreId": 16, + "Name": "World" + }, + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7abef36b4a166ffc/request.json b/test-snapshots/query/7abef36b4a166ffc/request.json new file mode 100644 index 0000000..ec2d614 --- /dev/null +++ b/test-snapshots/query/7abef36b4a166ffc/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7ac4d9d01231e40d/expected.json b/test-snapshots/query/7ac4d9d01231e40d/expected.json new file mode 100644 index 0000000..d206b20 --- /dev/null +++ b/test-snapshots/query/7ac4d9d01231e40d/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1007 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7ac4d9d01231e40d/request.json b/test-snapshots/query/7ac4d9d01231e40d/request.json new file mode 100644 index 0000000..2a7dbab --- /dev/null +++ b/test-snapshots/query/7ac4d9d01231e40d/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1007 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7b27401dc35e1bca/expected.json b/test-snapshots/query/7b27401dc35e1bca/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7b27401dc35e1bca/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7b27401dc35e1bca/request.json b/test-snapshots/query/7b27401dc35e1bca/request.json new file mode 100644 index 0000000..bd891ea --- /dev/null +++ b/test-snapshots/query/7b27401dc35e1bca/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7b5293f2628551c4/expected.json b/test-snapshots/query/7b5293f2628551c4/expected.json new file mode 100644 index 0000000..485222c --- /dev/null +++ b/test-snapshots/query/7b5293f2628551c4/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7b5293f2628551c4/request.json b/test-snapshots/query/7b5293f2628551c4/request.json new file mode 100644 index 0000000..a7da81b --- /dev/null +++ b/test-snapshots/query/7b5293f2628551c4/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 262-3322" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7b88716ef7dcae24/expected.json b/test-snapshots/query/7b88716ef7dcae24/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7b88716ef7dcae24/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7b88716ef7dcae24/request.json b/test-snapshots/query/7b88716ef7dcae24/request.json new file mode 100644 index 0000000..3b594d3 --- /dev/null +++ b/test-snapshots/query/7b88716ef7dcae24/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7ba83d73d0aa9e1e/expected.json b/test-snapshots/query/7ba83d73d0aa9e1e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7ba83d73d0aa9e1e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7ba83d73d0aa9e1e/request.json b/test-snapshots/query/7ba83d73d0aa9e1e/request.json new file mode 100644 index 0000000..e7191b4 --- /dev/null +++ b/test-snapshots/query/7ba83d73d0aa9e1e/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7bd03ad179d124df/expected.json b/test-snapshots/query/7bd03ad179d124df/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7bd03ad179d124df/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7bd03ad179d124df/request.json b/test-snapshots/query/7bd03ad179d124df/request.json new file mode 100644 index 0000000..35b73b9 --- /dev/null +++ b/test-snapshots/query/7bd03ad179d124df/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7be048bc03d6db3a/expected.json b/test-snapshots/query/7be048bc03d6db3a/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/7be048bc03d6db3a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7be048bc03d6db3a/request.json b/test-snapshots/query/7be048bc03d6db3a/request.json new file mode 100644 index 0000000..0529c75 --- /dev/null +++ b/test-snapshots/query/7be048bc03d6db3a/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7be669824180f817/expected.json b/test-snapshots/query/7be669824180f817/expected.json new file mode 100644 index 0000000..60369b6 --- /dev/null +++ b/test-snapshots/query/7be669824180f817/expected.json @@ -0,0 +1,78 @@ +[ + { + "rows": [ + { + "City_9488": "Calgary", + "Fax_5077": "1 (780) 836-9543", + "FirstName_4161": "Steve", + "HireDate_4256": "2003-10-17", + "LastName_9791": "Johnson", + "ReportsTo_3298": 2, + "Title_1117": "Sales Support Agent" + }, + { + "City_9488": "Edmonton", + "Fax_5077": "+1 (780) 428-3457", + "FirstName_4161": "Andrew", + "HireDate_4256": "2002-08-14", + "LastName_9791": "Adams", + "ReportsTo_3298": null, + "Title_1117": "General Manager" + }, + { + "City_9488": "Lethbridge", + "Fax_5077": "+1 (403) 467-8772", + "FirstName_4161": "Laura", + "HireDate_4256": "2004-03-04", + "LastName_9791": "Callahan", + "ReportsTo_3298": 6, + "Title_1117": "IT Staff" + }, + { + "City_9488": "Lethbridge", + "Fax_5077": "+1 (403) 456-8485", + "FirstName_4161": "Robert", + "HireDate_4256": "2004-01-02", + "LastName_9791": "King", + "ReportsTo_3298": 6, + "Title_1117": "IT Staff" + }, + { + "City_9488": "Calgary", + "Fax_5077": "+1 (403) 263-4289", + "FirstName_4161": "Margaret", + "HireDate_4256": "2003-05-03", + "LastName_9791": "Park", + "ReportsTo_3298": 2, + "Title_1117": "Sales Support Agent" + }, + { + "City_9488": "Calgary", + "Fax_5077": "+1 (403) 262-3322", + "FirstName_4161": "Nancy", + "HireDate_4256": "2002-05-01", + "LastName_9791": "Edwards", + "ReportsTo_3298": 1, + "Title_1117": "Sales Manager" + }, + { + "City_9488": "Calgary", + "Fax_5077": "+1 (403) 262-6712", + "FirstName_4161": "Jane", + "HireDate_4256": "2002-04-01", + "LastName_9791": "Peacock", + "ReportsTo_3298": 2, + "Title_1117": "Sales Support Agent" + }, + { + "City_9488": "Calgary", + "Fax_5077": "+1 (403) 246-9899", + "FirstName_4161": "Michael", + "HireDate_4256": "2003-10-17", + "LastName_9791": "Mitchell", + "ReportsTo_3298": 1, + "Title_1117": "IT Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7be669824180f817/request.json b/test-snapshots/query/7be669824180f817/request.json new file mode 100644 index 0000000..f974d82 --- /dev/null +++ b/test-snapshots/query/7be669824180f817/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "HireDate_4256": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_9791": { + "type": "column", + "column": "LastName", + "fields": null + }, + "City_9488": { + "type": "column", + "column": "City", + "fields": null + }, + "ReportsTo_3298": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Title_1117": { + "type": "column", + "column": "Title", + "fields": null + }, + "FirstName_4161": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Fax_5077": { + "type": "column", + "column": "Fax", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7be860fa10f2b716/expected.json b/test-snapshots/query/7be860fa10f2b716/expected.json new file mode 100644 index 0000000..22a1202 --- /dev/null +++ b/test-snapshots/query/7be860fa10f2b716/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7be860fa10f2b716/request.json b/test-snapshots/query/7be860fa10f2b716/request.json new file mode 100644 index 0000000..a927f58 --- /dev/null +++ b/test-snapshots/query/7be860fa10f2b716/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7bf8934b7c129ab3/expected.json b/test-snapshots/query/7bf8934b7c129ab3/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/7bf8934b7c129ab3/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7bf8934b7c129ab3/request.json b/test-snapshots/query/7bf8934b7c129ab3/request.json new file mode 100644 index 0000000..b41972d --- /dev/null +++ b/test-snapshots/query/7bf8934b7c129ab3/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7c03d78e47979b33/expected.json b/test-snapshots/query/7c03d78e47979b33/expected.json new file mode 100644 index 0000000..abc500d --- /dev/null +++ b/test-snapshots/query/7c03d78e47979b33/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "Address_6391": "1 Infinite Loop", + "City_7858": "Cupertino", + "Email_4965": "tgoyer@apple.com", + "FirstName_7376": "Tim", + "PostalCode_8518": "95014" + }, + { + "Address_6391": "1 Microsoft Way", + "City_7858": "Redmond", + "Email_4965": "jacksmith@microsoft.com", + "FirstName_7376": "Jack", + "PostalCode_8518": "98052-8300" + }, + { + "Address_6391": "1033 N Park Ave", + "City_7858": "Tucson", + "Email_4965": "patrick.gray@aol.com", + "FirstName_7376": "Patrick", + "PostalCode_8518": "85719" + }, + { + "Address_6391": "11, Place Bellecour", + "City_7858": "Lyon", + "Email_4965": "marc.dubois@hotmail.com", + "FirstName_7376": "Marc", + "PostalCode_8518": "69002" + }, + { + "Address_6391": "110 Raeburn Pl", + "City_7858": "Edinburgh ", + "Email_4965": "steve.murray@yahoo.uk", + "FirstName_7376": "Steve", + "PostalCode_8518": "EH4 1HH" + }, + { + "Address_6391": "113 Lupus St", + "City_7858": "London", + "Email_4965": "phil.hughes@gmail.com", + "FirstName_7376": "Phil", + "PostalCode_8518": "SW1V 3EN" + }, + { + "Address_6391": "12,Community Centre", + "City_7858": "Delhi", + "Email_4965": "manoj.pareek@rediff.com", + "FirstName_7376": "Manoj", + "PostalCode_8518": "110017" + }, + { + "Address_6391": "120 S Orange Ave", + "City_7858": "Orlando", + "Email_4965": "hleacock@gmail.com", + "FirstName_7376": "Heather", + "PostalCode_8518": "32801" + }, + { + "Address_6391": "1498 rue Bélanger", + "City_7858": "Montréal", + "Email_4965": "ftremblay@gmail.com", + "FirstName_7376": "François", + "PostalCode_8518": "H2G 1A7" + }, + { + "Address_6391": "1600 Amphitheatre Parkway", + "City_7858": "Mountain View", + "Email_4965": "fharris@google.com", + "FirstName_7376": "Frank", + "PostalCode_8518": "94043-1351" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7c03d78e47979b33/request.json b/test-snapshots/query/7c03d78e47979b33/request.json new file mode 100644 index 0000000..1a9194b --- /dev/null +++ b/test-snapshots/query/7c03d78e47979b33/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_6391": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_7858": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_8518": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Email_4965": { + "type": "column", + "column": "Email", + "fields": null + }, + "FirstName_7376": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7c47841a19ac2b1/expected.json b/test-snapshots/query/7c47841a19ac2b1/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/7c47841a19ac2b1/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7c47841a19ac2b1/request.json b/test-snapshots/query/7c47841a19ac2b1/request.json new file mode 100644 index 0000000..9b1f0ad --- /dev/null +++ b/test-snapshots/query/7c47841a19ac2b1/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7c5ae14ee470d804/expected.json b/test-snapshots/query/7c5ae14ee470d804/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7c5ae14ee470d804/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7c5ae14ee470d804/request.json b/test-snapshots/query/7c5ae14ee470d804/request.json new file mode 100644 index 0000000..bb2b642 --- /dev/null +++ b/test-snapshots/query/7c5ae14ee470d804/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7c9017297d4ca053/expected.json b/test-snapshots/query/7c9017297d4ca053/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7c9017297d4ca053/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7c9017297d4ca053/request.json b/test-snapshots/query/7c9017297d4ca053/request.json new file mode 100644 index 0000000..761a7a2 --- /dev/null +++ b/test-snapshots/query/7c9017297d4ca053/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7c97685e41150996/expected.json b/test-snapshots/query/7c97685e41150996/expected.json new file mode 100644 index 0000000..f181218 --- /dev/null +++ b/test-snapshots/query/7c97685e41150996/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + }, + { + "AlbumId_4533": 1, + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_2743": 1, + "MediaTypeId_2333": 1, + "UnitPrice_5948": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7c97685e41150996/request.json b/test-snapshots/query/7c97685e41150996/request.json new file mode 100644 index 0000000..1086d2e --- /dev/null +++ b/test-snapshots/query/7c97685e41150996/request.json @@ -0,0 +1,59 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_4533": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "UnitPrice_5948": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "MediaTypeId_2333": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "GenreId_2743": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7ce290ecf0833b23/expected.json b/test-snapshots/query/7ce290ecf0833b23/expected.json new file mode 100644 index 0000000..b69b72b --- /dev/null +++ b/test-snapshots/query/7ce290ecf0833b23/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2010-03-11", + "InvoiceId_4836": 98, + "Total_4781": 3.98 + }, + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2010-06-13", + "InvoiceId_4836": 121, + "Total_4781": 3.96 + }, + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2010-09-15", + "InvoiceId_4836": 143, + "Total_4781": 5.94 + }, + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2011-05-06", + "InvoiceId_4836": 195, + "Total_4781": 0.99 + }, + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2012-10-27", + "InvoiceId_4836": 316, + "Total_4781": 1.98 + }, + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2012-12-07", + "InvoiceId_4836": 327, + "Total_4781": 13.86 + }, + { + "BillingAddress_2611": "Av. Brigadeiro Faria Lima, 2170", + "BillingCity_5552": "São José dos Campos", + "BillingCountry_4668": "Brazil", + "BillingState_5458": "SP", + "InvoiceDate_0201": "2013-08-07", + "InvoiceId_4836": 382, + "Total_4781": 8.91 + }, + { + "BillingAddress_2611": "Theodor-Heuss-Straße 34", + "BillingCity_5552": "Stuttgart", + "BillingCountry_4668": "Germany", + "BillingState_5458": null, + "InvoiceDate_0201": "2009-01-01", + "InvoiceId_4836": 1, + "Total_4781": 1.98 + }, + { + "BillingAddress_2611": "Theodor-Heuss-Straße 34", + "BillingCity_5552": "Stuttgart", + "BillingCountry_4668": "Germany", + "BillingState_5458": null, + "InvoiceDate_0201": "2009-02-11", + "InvoiceId_4836": 12, + "Total_4781": 13.86 + }, + { + "BillingAddress_2611": "Theodor-Heuss-Straße 34", + "BillingCity_5552": "Stuttgart", + "BillingCountry_4668": "Germany", + "BillingState_5458": null, + "InvoiceDate_0201": "2009-10-12", + "InvoiceId_4836": 67, + "Total_4781": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7ce290ecf0833b23/request.json b/test-snapshots/query/7ce290ecf0833b23/request.json new file mode 100644 index 0000000..567c5fd --- /dev/null +++ b/test-snapshots/query/7ce290ecf0833b23/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_2611": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_5552": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_4668": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "InvoiceId_4836": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingState_5458": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "Total_4781": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceDate_0201": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7cec5b095bc1ec05/expected.json b/test-snapshots/query/7cec5b095bc1ec05/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7cec5b095bc1ec05/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7cec5b095bc1ec05/request.json b/test-snapshots/query/7cec5b095bc1ec05/request.json new file mode 100644 index 0000000..7d9970b --- /dev/null +++ b/test-snapshots/query/7cec5b095bc1ec05/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7d1b1b60439b302f/expected.json b/test-snapshots/query/7d1b1b60439b302f/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/7d1b1b60439b302f/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7d1b1b60439b302f/request.json b/test-snapshots/query/7d1b1b60439b302f/request.json new file mode 100644 index 0000000..b80d67d --- /dev/null +++ b/test-snapshots/query/7d1b1b60439b302f/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7d4d7bbf3094b24b/expected.json b/test-snapshots/query/7d4d7bbf3094b24b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7d4d7bbf3094b24b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7d4d7bbf3094b24b/request.json b/test-snapshots/query/7d4d7bbf3094b24b/request.json new file mode 100644 index 0000000..3f803f3 --- /dev/null +++ b/test-snapshots/query/7d4d7bbf3094b24b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marisa Monte" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7d54b164437ad687/expected.json b/test-snapshots/query/7d54b164437ad687/expected.json new file mode 100644 index 0000000..0bbffd3 --- /dev/null +++ b/test-snapshots/query/7d54b164437ad687/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7d54b164437ad687/request.json b/test-snapshots/query/7d54b164437ad687/request.json new file mode 100644 index 0000000..af2798f --- /dev/null +++ b/test-snapshots/query/7d54b164437ad687/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-04-14" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7d92c13230f9d635/expected.json b/test-snapshots/query/7d92c13230f9d635/expected.json new file mode 100644 index 0000000..9c02cef --- /dev/null +++ b/test-snapshots/query/7d92c13230f9d635/expected.json @@ -0,0 +1,1186 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 1, + "Name_7880": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + }, + { + "AlbumId": 20, + "Bytes": 14184984, + "Composer": "Buddy Guy", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 433397, + "Name": "Stone Crazy", + "TrackId": 196, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 6, + "Name_7880": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 13, + "Name_7880": "Heavy Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6455255, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 268878, + "Name": "The Trooper", + "TrackId": 1290, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6605094, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275121, + "Name": "The Number Of The Beast", + "TrackId": 1295, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 8799380, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366550, + "Name": "2 Minutes To Midnight", + "TrackId": 1289, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 3, + "Name_7880": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 11, + "Bytes": 10029406, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 309786, + "Name": "The Curse", + "TrackId": 110, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7542942, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233195, + "Name": "Man Or Animal", + "TrackId": 106, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7609178, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233691, + "Name": "Drown Me Slowly", + "TrackId": 103, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7710800, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 237714, + "Name": "The Worm", + "TrackId": 105, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8273592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255529, + "Name": "Your Time Has Come", + "TrackId": 99, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8357387, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255869, + "Name": "Doesn't Remind Me", + "TrackId": 102, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8944205, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 273763, + "Name": "Yesterday To Tomorrow", + "TrackId": 107, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9003592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 278125, + "Name": "Dandelion", + "TrackId": 108, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9006158, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 276688, + "Name": "Heaven's Dead", + "TrackId": 104, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9106160, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 279484, + "Name": "Be Yourself", + "TrackId": 101, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 4, + "Name_7880": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 115, + "Bytes": 10498031, + "Composer": "Bobby Byrd/James Brown/Ron Lenhoff", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 316551, + "Name": "Get Up (I Feel Like Being A) Sex Machine", + "TrackId": 1423, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 11183457, + "Composer": "Full Force/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 334236, + "Name": "I'm Real", + "TrackId": 1431, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4174420, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 127399, + "Name": "Papa's Got A Brand New Bag Pt.1", + "TrackId": 1418, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4711323, + "Composer": "Ted Wright", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 143725, + "Name": "Out Of Sight", + "TrackId": 1417, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5394585, + "Composer": "James Brown/Johnny Terry", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 165067, + "Name": "Please Please Please", + "TrackId": 1414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5468472, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "I Got You (I Feel Good)", + "TrackId": 1419, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5478117, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "Say It Loud, I'm Black And I'm Proud Pt.1", + "TrackId": 1422, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5513208, + "Composer": "Lowman Pauling", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 166739, + "Name": "Think", + "TrackId": 1415, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5541611, + "Composer": "Betty Newsome/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 168228, + "Name": "It's A Man's Man's Man's World", + "TrackId": 1420, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5643213, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 172408, + "Name": "Cold Sweat", + "TrackId": 1421, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 14, + "Name_7880": "R&B/Soul" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 118, + "Bytes": 10334529, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 309995, + "Name": "The Kids", + "TrackId": 1460, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 10843832, + "Composer": "Toby Smith/Wallis Buchanan", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 322455, + "Name": "Journey To Arnhemland", + "TrackId": 1463, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11043559, + "Composer": "Stuard Zender/Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 329534, + "Name": "Mr. Moon", + "TrackId": 1461, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11796244, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 354560, + "Name": "Light Years", + "TrackId": 1458, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12676962, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 382197, + "Name": "Manifest Destiny", + "TrackId": 1459, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12777210, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 384130, + "Name": "Morning Glory", + "TrackId": 1464, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12906520, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 385697, + "Name": "Space Cowboy", + "TrackId": 1465, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 14019705, + "Composer": "Stuart Zender", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 422321, + "Name": "Scam", + "TrackId": 1462, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 17582818, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 529684, + "Name": "Just Another Story", + "TrackId": 1455, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 8644290, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 257097, + "Name": "Stillness In Time", + "TrackId": 1456, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 15, + "Name_7880": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 12, + "Bytes": 1299960, + "Composer": "Ned Fairchild", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 107807, + "Name": "20 Flight Rock", + "TrackId": 122, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1704918, + "Composer": "Little Richard", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106266, + "Name": "Good Golly Miss Molly", + "TrackId": 121, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1707084, + "Composer": "Enotris Johnson/Little Richard/Robert \"Bumps\" Blackwell", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106396, + "Name": "Long Tall Sally", + "TrackId": 112, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1862126, + "Composer": "Larry Williams", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 116088, + "Name": "Bad Boy", + "TrackId": 113, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2206986, + "Composer": "Brian Holland/Freddie Gorman/Georgia Dobbins/Robert Bateman/William Garrett", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 137639, + "Name": "Please Mr. Postman", + "TrackId": 115, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2247846, + "Composer": "Eddie Cochran/Jerry Capehart", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 140199, + "Name": "C'Mon Everybody", + "TrackId": 116, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2276788, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 141923, + "Name": "Rock 'N' Roll Music", + "TrackId": 117, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2301989, + "Composer": "Bo Diddley", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143595, + "Name": "Roadrunner", + "TrackId": 119, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2306019, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143830, + "Name": "Carol", + "TrackId": 120, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2365897, + "Composer": "Berry Gordy, Jr./Janie Bradford", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 147591, + "Name": "Money", + "TrackId": 111, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 5, + "Name_7880": "Rock And Roll" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 122, + "Bytes": 10211473, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 310073, + "Name": "Engenho De Dentro", + "TrackId": 1506, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10599953, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 317100, + "Name": "W/Brasil (Chama O Síndico)", + "TrackId": 1510, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10724982, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 326321, + "Name": "Selassiê", + "TrackId": 1514, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10996656, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 338076, + "Name": "Que Maravilha", + "TrackId": 1516, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 11314756, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 343484, + "Name": "Salve Simpatia", + "TrackId": 1509, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12010478, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 355239, + "Name": "Alcohol", + "TrackId": 1507, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12304520, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 367281, + "Name": "Os Alquimistas Estão Chegando", + "TrackId": 1512, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12524725, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 380081, + "Name": "Santa Clara Clareou", + "TrackId": 1517, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 13022833, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 389276, + "Name": "Charles Anjo 45", + "TrackId": 1513, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 14946972, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 452519, + "Name": "País Tropical", + "TrackId": 1511, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 7, + "Name_7880": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 124, + "Bytes": 3948371, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 118804, + "Name": "Cuando Eu For Pro Ceu", + "TrackId": 1541, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6031174, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 180924, + "Name": "Cafezinho", + "TrackId": 1544, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6056200, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 182308, + "Name": "No Futuro", + "TrackId": 1535, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6400532, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 190484, + "Name": "Choramingando", + "TrackId": 1533, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6774566, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 203415, + "Name": "Do Nosso Amor", + "TrackId": 1542, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7104588, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 208457, + "Name": "Borogodo", + "TrackId": 1543, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7248336, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 220891, + "Name": "Enquanto O Dia Não Vem", + "TrackId": 1545, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7257390, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 213263, + "Name": "Papelão", + "TrackId": 1540, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7764601, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 230582, + "Name": "Por Merecer", + "TrackId": 1534, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 8077282, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 241084, + "Name": "Voce Inteira", + "TrackId": 1536, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_1123": 16, + "Name_7880": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7d92c13230f9d635/request.json b/test-snapshots/query/7d92c13230f9d635/request.json new file mode 100644 index 0000000..f8738ed --- /dev/null +++ b/test-snapshots/query/7d92c13230f9d635/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_1123": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_7880": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7dc38489883f81cc/expected.json b/test-snapshots/query/7dc38489883f81cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7dc38489883f81cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7dc38489883f81cc/request.json b/test-snapshots/query/7dc38489883f81cc/request.json new file mode 100644 index 0000000..52d162a --- /dev/null +++ b/test-snapshots/query/7dc38489883f81cc/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Hip Hop/Rap" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7dc6e7e34d9c8a70/expected.json b/test-snapshots/query/7dc6e7e34d9c8a70/expected.json new file mode 100644 index 0000000..8726d6e --- /dev/null +++ b/test-snapshots/query/7dc6e7e34d9c8a70/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Classical", + "PlaylistId": 12 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7dc6e7e34d9c8a70/request.json b/test-snapshots/query/7dc6e7e34d9c8a70/request.json new file mode 100644 index 0000000..e200a38 --- /dev/null +++ b/test-snapshots/query/7dc6e7e34d9c8a70/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7deccd6045e7b873/expected.json b/test-snapshots/query/7deccd6045e7b873/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/7deccd6045e7b873/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7deccd6045e7b873/request.json b/test-snapshots/query/7deccd6045e7b873/request.json new file mode 100644 index 0000000..c18c9b5 --- /dev/null +++ b/test-snapshots/query/7deccd6045e7b873/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7e2c92f3d105ab62/expected.json b/test-snapshots/query/7e2c92f3d105ab62/expected.json new file mode 100644 index 0000000..b4fc892 --- /dev/null +++ b/test-snapshots/query/7e2c92f3d105ab62/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "Country_count_4323": 8, + "Phone_count_7548": 8, + "ReportsTo_min_5898": 1, + "State_max_6589": "AB" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e2c92f3d105ab62/request.json b/test-snapshots/query/7e2c92f3d105ab62/request.json new file mode 100644 index 0000000..922ef14 --- /dev/null +++ b/test-snapshots/query/7e2c92f3d105ab62/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Employee", + "query": { + "aggregates": { + "State_max_6589": { + "type": "single_column", + "column": "State", + "function": "max" + }, + "Phone_count_7548": { + "type": "single_column", + "column": "Phone", + "function": "count" + }, + "Country_count_4323": { + "type": "single_column", + "column": "Country", + "function": "count" + }, + "ReportsTo_min_5898": { + "type": "single_column", + "column": "ReportsTo", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7e391fff25bdad0c/expected.json b/test-snapshots/query/7e391fff25bdad0c/expected.json new file mode 100644 index 0000000..9ba7956 --- /dev/null +++ b/test-snapshots/query/7e391fff25bdad0c/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e391fff25bdad0c/request.json b/test-snapshots/query/7e391fff25bdad0c/request.json new file mode 100644 index 0000000..5a91d5c --- /dev/null +++ b/test-snapshots/query/7e391fff25bdad0c/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6599424 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7e39833a3e30f1dd/expected.json b/test-snapshots/query/7e39833a3e30f1dd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7e39833a3e30f1dd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e39833a3e30f1dd/request.json b/test-snapshots/query/7e39833a3e30f1dd/request.json new file mode 100644 index 0000000..451d71f --- /dev/null +++ b/test-snapshots/query/7e39833a3e30f1dd/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7e509a093d8e5dc6/expected.json b/test-snapshots/query/7e509a093d8e5dc6/expected.json new file mode 100644 index 0000000..dd7fac7 --- /dev/null +++ b/test-snapshots/query/7e509a093d8e5dc6/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceLineId_0473": 1, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 2, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 3, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 4, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 5, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 6, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 7, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 8, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 9, + "Quantity_8629": 1 + }, + { + "InvoiceLineId_0473": 10, + "Quantity_8629": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e509a093d8e5dc6/request.json b/test-snapshots/query/7e509a093d8e5dc6/request.json new file mode 100644 index 0000000..1db64be --- /dev/null +++ b/test-snapshots/query/7e509a093d8e5dc6/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_8629": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "InvoiceLineId_0473": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7e5d4e5e0620c1e8/expected.json b/test-snapshots/query/7e5d4e5e0620c1e8/expected.json new file mode 100644 index 0000000..c8adc0d --- /dev/null +++ b/test-snapshots/query/7e5d4e5e0620c1e8/expected.json @@ -0,0 +1,129 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 1, + "Title_8793": "For Those About To Rock We Salute You" + }, + { + "AlbumId_2531": 4, + "Title_8793": "Let There Be Rock" + } + ] + }, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 13, + "Title_8793": "The Best Of Billy Cobham" + } + ] + }, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 141, + "Title_8793": "Greatest Hits" + } + ] + }, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 142, + "Title_8793": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId_2531": 143, + "Title_8793": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + }, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 144, + "Title_8793": "Misplaced Childhood" + } + ] + }, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 145, + "Title_8793": "Barulhinho Bom" + } + ] + }, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 146, + "Title_8793": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + }, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 147, + "Title_8793": "The Best Of Men At Work" + } + ] + }, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_2531": 160, + "Title_8793": "Ace Of Spades" + } + ] + }, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e5d4e5e0620c1e8/request.json b/test-snapshots/query/7e5d4e5e0620c1e8/request.json new file mode 100644 index 0000000..fb26e77 --- /dev/null +++ b/test-snapshots/query/7e5d4e5e0620c1e8/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_2531": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_8793": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7e62a4d3eec97643/expected.json b/test-snapshots/query/7e62a4d3eec97643/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/7e62a4d3eec97643/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e62a4d3eec97643/request.json b/test-snapshots/query/7e62a4d3eec97643/request.json new file mode 100644 index 0000000..df2ea66 --- /dev/null +++ b/test-snapshots/query/7e62a4d3eec97643/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7e6a0f2a9306ea74/expected.json b/test-snapshots/query/7e6a0f2a9306ea74/expected.json new file mode 100644 index 0000000..cc4f410 --- /dev/null +++ b/test-snapshots/query/7e6a0f2a9306ea74/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "BillingCity_6170": "Madison", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-12-05" + }, + { + "BillingCity_6170": "Boston", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-12-04" + }, + { + "BillingCity_6170": "Reno", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-12-04" + }, + { + "BillingCity_6170": "Mountain View", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-11-21" + }, + { + "BillingCity_6170": "Tucson", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-10-13" + }, + { + "BillingCity_6170": "New York", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-10-08" + }, + { + "BillingCity_6170": "Madison", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-09-02" + }, + { + "BillingCity_6170": "Tucson", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-09-02" + }, + { + "BillingCity_6170": "Chicago", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-08-20" + }, + { + "BillingCity_6170": "Orlando", + "BillingCountry_1337": "USA", + "InvoiceDate_3750": "2013-07-07" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e6a0f2a9306ea74/request.json b/test-snapshots/query/7e6a0f2a9306ea74/request.json new file mode 100644 index 0000000..11e25ea --- /dev/null +++ b/test-snapshots/query/7e6a0f2a9306ea74/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceDate_3750": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "BillingCity_6170": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_1337": { + "type": "column", + "column": "BillingCountry", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7e6cc95b3c55d93c/expected.json b/test-snapshots/query/7e6cc95b3c55d93c/expected.json new file mode 100644 index 0000000..d2a61df --- /dev/null +++ b/test-snapshots/query/7e6cc95b3c55d93c/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1314, + "Quantity": 1, + "TrackId": 981, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1315, + "Quantity": 1, + "TrackId": 990, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1316, + "Quantity": 1, + "TrackId": 999, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1317, + "Quantity": 1, + "TrackId": 1008, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1318, + "Quantity": 1, + "TrackId": 1017, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7e6cc95b3c55d93c/request.json b/test-snapshots/query/7e6cc95b3c55d93c/request.json new file mode 100644 index 0000000..34d9c16 --- /dev/null +++ b/test-snapshots/query/7e6cc95b3c55d93c/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7ea56e4721b29cb7/expected.json b/test-snapshots/query/7ea56e4721b29cb7/expected.json new file mode 100644 index 0000000..a6c0766 --- /dev/null +++ b/test-snapshots/query/7ea56e4721b29cb7/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2009-04-22", + "InvoiceId_9739": 27 + }, + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2010-10-14", + "InvoiceId_9739": 148 + }, + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2010-11-24", + "InvoiceId_9739": 159 + }, + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2011-07-25", + "InvoiceId_9739": 214 + }, + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2013-02-28", + "InvoiceId_9739": 343 + }, + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2013-06-02", + "InvoiceId_9739": 366 + }, + { + "BillingCity_7794": "Yellowknife", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 33, + "InvoiceDate_5143": "2013-09-04", + "InvoiceId_9739": 388 + }, + { + "BillingCity_7794": "Vancouver", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 15, + "InvoiceDate_5143": "2009-06-05", + "InvoiceId_9739": 36 + }, + { + "BillingCity_7794": "Vancouver", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 15, + "InvoiceDate_5143": "2009-07-16", + "InvoiceId_9739": 47 + }, + { + "BillingCity_7794": "Vancouver", + "BillingCountry_9677": "Canada", + "CustomerId_9515": 15, + "InvoiceDate_5143": "2010-03-16", + "InvoiceId_9739": 102 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7ea56e4721b29cb7/request.json b/test-snapshots/query/7ea56e4721b29cb7/request.json new file mode 100644 index 0000000..71f90df --- /dev/null +++ b/test-snapshots/query/7ea56e4721b29cb7/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "CustomerId_9515": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "BillingCity_7794": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_9677": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "InvoiceId_9739": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceDate_5143": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7eb69c2f9cf277c2/expected.json b/test-snapshots/query/7eb69c2f9cf277c2/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/7eb69c2f9cf277c2/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7eb69c2f9cf277c2/request.json b/test-snapshots/query/7eb69c2f9cf277c2/request.json new file mode 100644 index 0000000..dfeb792 --- /dev/null +++ b/test-snapshots/query/7eb69c2f9cf277c2/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 41 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Dubois" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7ef61f955693e516/expected.json b/test-snapshots/query/7ef61f955693e516/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7ef61f955693e516/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7ef61f955693e516/request.json b/test-snapshots/query/7ef61f955693e516/request.json new file mode 100644 index 0000000..48c7fab --- /dev/null +++ b/test-snapshots/query/7ef61f955693e516/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7f01d4bbc845d163/expected.json b/test-snapshots/query/7f01d4bbc845d163/expected.json new file mode 100644 index 0000000..392b4a3 --- /dev/null +++ b/test-snapshots/query/7f01d4bbc845d163/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f01d4bbc845d163/request.json b/test-snapshots/query/7f01d4bbc845d163/request.json new file mode 100644 index 0000000..6e3e1c3 --- /dev/null +++ b/test-snapshots/query/7f01d4bbc845d163/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7f157f20dbab5b2b/expected.json b/test-snapshots/query/7f157f20dbab5b2b/expected.json new file mode 100644 index 0000000..fef8a52 --- /dev/null +++ b/test-snapshots/query/7f157f20dbab5b2b/expected.json @@ -0,0 +1,256 @@ +[ + { + "rows": [ + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 15, + "Total_5225": 1.98 + }, + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 210, + "Total_5225": 1.98 + }, + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 233, + "Total_5225": 3.96 + }, + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 255, + "Total_5225": 5.94 + }, + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 26, + "Total_5225": 13.86 + }, + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 307, + "Total_5225": 1.99 + }, + { + "BillingAddress_9641": "1 Infinite Loop", + "BillingCity_9909": "Cupertino", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + }, + "InvoiceId_3915": 81, + "Total_5225": 8.91 + }, + { + "BillingAddress_9641": "1 Microsoft Way", + "BillingCity_9909": "Redmond", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_3915": 111, + "Total_5225": 0.99 + }, + { + "BillingAddress_9641": "1 Microsoft Way", + "BillingCity_9909": "Redmond", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_3915": 14, + "Total_5225": 1.98 + }, + { + "BillingAddress_9641": "1 Microsoft Way", + "BillingCity_9909": "Redmond", + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + }, + "InvoiceId_3915": 232, + "Total_5225": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f157f20dbab5b2b/request.json b/test-snapshots/query/7f157f20dbab5b2b/request.json new file mode 100644 index 0000000..7e8e1c8 --- /dev/null +++ b/test-snapshots/query/7f157f20dbab5b2b/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_9641": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_9909": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "Total_5225": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceId_3915": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7f16f95bab7d3a84/expected.json b/test-snapshots/query/7f16f95bab7d3a84/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7f16f95bab7d3a84/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f16f95bab7d3a84/request.json b/test-snapshots/query/7f16f95bab7d3a84/request.json new file mode 100644 index 0000000..e7011b3 --- /dev/null +++ b/test-snapshots/query/7f16f95bab7d3a84/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Smith" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7f17568004b4e593/expected.json b/test-snapshots/query/7f17568004b4e593/expected.json new file mode 100644 index 0000000..ee93e94 --- /dev/null +++ b/test-snapshots/query/7f17568004b4e593/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "EmployeeId_8651": 1, + "HireDate_0044": "2002-08-14", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 2, + "HireDate_0044": "2002-05-01", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 3, + "HireDate_0044": "2002-04-01", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 4, + "HireDate_0044": "2003-05-03", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 5, + "HireDate_0044": "2003-10-17", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 6, + "HireDate_0044": "2003-10-17", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 7, + "HireDate_0044": "2004-01-02", + "State_9570": "AB" + }, + { + "EmployeeId_8651": 8, + "HireDate_0044": "2004-03-04", + "State_9570": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f17568004b4e593/request.json b/test-snapshots/query/7f17568004b4e593/request.json new file mode 100644 index 0000000..7744f9d --- /dev/null +++ b/test-snapshots/query/7f17568004b4e593/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "HireDate_0044": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "State_9570": { + "type": "column", + "column": "State", + "fields": null + }, + "EmployeeId_8651": { + "type": "column", + "column": "EmployeeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7f45929491448979/expected.json b/test-snapshots/query/7f45929491448979/expected.json new file mode 100644 index 0000000..8e88bc0 --- /dev/null +++ b/test-snapshots/query/7f45929491448979/expected.json @@ -0,0 +1,48 @@ +[ + { + "rows": [ + { + "InvoiceId": 59, + "InvoiceLineId": 311, + "Quantity": 1, + "TrackId": 1872, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 59, + "InvoiceLineId": 312, + "Quantity": 1, + "TrackId": 1876, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 59, + "InvoiceLineId": 313, + "Quantity": 1, + "TrackId": 1880, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 59, + "InvoiceLineId": 314, + "Quantity": 1, + "TrackId": 1884, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 59, + "InvoiceLineId": 315, + "Quantity": 1, + "TrackId": 1888, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 59, + "InvoiceLineId": 316, + "Quantity": 1, + "TrackId": 1892, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f45929491448979/request.json b/test-snapshots/query/7f45929491448979/request.json new file mode 100644 index 0000000..11b1fb3 --- /dev/null +++ b/test-snapshots/query/7f45929491448979/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-09-08" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7f479b8f140f8004/expected.json b/test-snapshots/query/7f479b8f140f8004/expected.json new file mode 100644 index 0000000..1f4040c --- /dev/null +++ b/test-snapshots/query/7f479b8f140f8004/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f479b8f140f8004/request.json b/test-snapshots/query/7f479b8f140f8004/request.json new file mode 100644 index 0000000..4a5d271 --- /dev/null +++ b/test-snapshots/query/7f479b8f140f8004/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7f522605a52cbe2c/expected.json b/test-snapshots/query/7f522605a52cbe2c/expected.json new file mode 100644 index 0000000..063844e --- /dev/null +++ b/test-snapshots/query/7f522605a52cbe2c/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 6355088, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 193280, + "Name": "Friend Of A Friend", + "TrackId": 1003, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f522605a52cbe2c/request.json b/test-snapshots/query/7f522605a52cbe2c/request.json new file mode 100644 index 0000000..0de2500 --- /dev/null +++ b/test-snapshots/query/7f522605a52cbe2c/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7f566b84cbbec431/expected.json b/test-snapshots/query/7f566b84cbbec431/expected.json new file mode 100644 index 0000000..e881554 --- /dev/null +++ b/test-snapshots/query/7f566b84cbbec431/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 6877994, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 209684, + "Name": "Miracle", + "TrackId": 1001, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f566b84cbbec431/request.json b/test-snapshots/query/7f566b84cbbec431/request.json new file mode 100644 index 0000000..7bdc355 --- /dev/null +++ b/test-snapshots/query/7f566b84cbbec431/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7f7832fbf9a5738d/expected.json b/test-snapshots/query/7f7832fbf9a5738d/expected.json new file mode 100644 index 0000000..fc9707f --- /dev/null +++ b/test-snapshots/query/7f7832fbf9a5738d/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f7832fbf9a5738d/request.json b/test-snapshots/query/7f7832fbf9a5738d/request.json new file mode 100644 index 0000000..227f660 --- /dev/null +++ b/test-snapshots/query/7f7832fbf9a5738d/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Frank" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7f938a566899984b/expected.json b/test-snapshots/query/7f938a566899984b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7f938a566899984b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7f938a566899984b/request.json b/test-snapshots/query/7f938a566899984b/request.json new file mode 100644 index 0000000..c917760 --- /dev/null +++ b/test-snapshots/query/7f938a566899984b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7fad82f0c2556f7d/expected.json b/test-snapshots/query/7fad82f0c2556f7d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/7fad82f0c2556f7d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7fad82f0c2556f7d/request.json b/test-snapshots/query/7fad82f0c2556f7d/request.json new file mode 100644 index 0000000..e4fec73 --- /dev/null +++ b/test-snapshots/query/7fad82f0c2556f7d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7fb144ff0f5db7b8/expected.json b/test-snapshots/query/7fb144ff0f5db7b8/expected.json new file mode 100644 index 0000000..522b783 --- /dev/null +++ b/test-snapshots/query/7fb144ff0f5db7b8/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "Bytes_7192": 9147563, + "GenreId_0021": 1, + "MediaTypeId_4032": 1, + "Milliseconds_7776": 284055, + "Name_8457": "The Great Gig In The Sky", + "TrackId_5490": 2232, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 5760129, + "GenreId_0021": 24, + "MediaTypeId_4032": 2, + "Milliseconds_7776": 348971, + "Name_8457": "\"Eine Kleine Nachtmusik\" Serenade In G, K. 525: I. Allegro", + "TrackId_5490": 3412, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 6474980, + "GenreId_0021": 24, + "MediaTypeId_4032": 2, + "Milliseconds_7776": 394482, + "Name_8457": "Concerto for Clarinet in A Major, K. 622: II. Adagio", + "TrackId_5490": 3413, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 2861468, + "GenreId_0021": 25, + "MediaTypeId_4032": 2, + "Milliseconds_7776": 174813, + "Name_8457": "Die Zauberflöte, K.620: \"Der Hölle Rache Kocht in Meinem Herze\"", + "TrackId_5490": 3451, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 3665114, + "GenreId_0021": 24, + "MediaTypeId_4032": 2, + "Milliseconds_7776": 221331, + "Name_8457": "Quintet for Horn, Violin, 2 Violas, and Cello in E Flat Major, K. 407/386c: III. Allegro", + "TrackId_5490": 3502, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 6173269, + "GenreId_0021": 24, + "MediaTypeId_4032": 2, + "Milliseconds_7776": 362933, + "Name_8457": "Symphony No. 41 in C Major, K. 551, \"Jupiter\": IV. Molto allegro", + "TrackId_5490": 3454, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 7035636, + "GenreId_0021": 1, + "MediaTypeId_4032": 1, + "Milliseconds_7776": 214360, + "Name_8457": "Back Door Man", + "TrackId_5490": 2645, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 8437098, + "GenreId_0021": 1, + "MediaTypeId_4032": 1, + "Milliseconds_7776": 258168, + "Name_8457": "I Can't Quit You Baby", + "TrackId_5490": 1589, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 8581414, + "GenreId_0021": 1, + "MediaTypeId_4032": 1, + "Milliseconds_7776": 263836, + "Name_8457": "I Can't Quit You Baby", + "TrackId_5490": 338, + "UnitPrice_7123": 0.99 + }, + { + "Bytes_7192": 9252733, + "GenreId_0021": 1, + "MediaTypeId_4032": 1, + "Milliseconds_7776": 282671, + "Name_8457": "I Can't Quit You Baby", + "TrackId_5490": 1625, + "UnitPrice_7123": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7fb144ff0f5db7b8/request.json b/test-snapshots/query/7fb144ff0f5db7b8/request.json new file mode 100644 index 0000000..ae1c376 --- /dev/null +++ b/test-snapshots/query/7fb144ff0f5db7b8/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "TrackId_5490": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Bytes_7192": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "UnitPrice_7123": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "GenreId_0021": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4032": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_7776": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_8457": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/7fbdead5a2b44014/expected.json b/test-snapshots/query/7fbdead5a2b44014/expected.json new file mode 100644 index 0000000..dd5205c --- /dev/null +++ b/test-snapshots/query/7fbdead5a2b44014/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "Title": "Audioslave" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 109, + "ArtistId": 90, + "Title": "Rock In Rio [CD2]" + }, + { + "AlbumId": 112, + "ArtistId": 90, + "Title": "The Number of The Beast" + }, + { + "AlbumId": 113, + "ArtistId": 90, + "Title": "The X Factor" + }, + { + "AlbumId": 114, + "ArtistId": 90, + "Title": "Virtual XI" + }, + { + "AlbumId": 116, + "ArtistId": 92, + "Title": "Emergency On Planet Earth" + }, + { + "AlbumId": 120, + "ArtistId": 94, + "Title": "Are You Experienced?" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7fbdead5a2b44014/request.json b/test-snapshots/query/7fbdead5a2b44014/request.json new file mode 100644 index 0000000..27d88c6 --- /dev/null +++ b/test-snapshots/query/7fbdead5a2b44014/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/7fc32462a99e232f/expected.json b/test-snapshots/query/7fc32462a99e232f/expected.json new file mode 100644 index 0000000..e40860c --- /dev/null +++ b/test-snapshots/query/7fc32462a99e232f/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Rome" + }, + { + "BillingCity_5824": "Oslo" + }, + { + "BillingCity_5824": "Oslo" + }, + { + "BillingCity_5824": "Oslo" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/7fc32462a99e232f/request.json b/test-snapshots/query/7fc32462a99e232f/request.json new file mode 100644 index 0000000..931d94c --- /dev/null +++ b/test-snapshots/query/7fc32462a99e232f/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingCity_5824": { + "type": "column", + "column": "BillingCity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8025d3444cbf9602/expected.json b/test-snapshots/query/8025d3444cbf9602/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8025d3444cbf9602/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8025d3444cbf9602/request.json b/test-snapshots/query/8025d3444cbf9602/request.json new file mode 100644 index 0000000..32909ea --- /dev/null +++ b/test-snapshots/query/8025d3444cbf9602/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13.86 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/802fc8af179b4644/expected.json b/test-snapshots/query/802fc8af179b4644/expected.json new file mode 100644 index 0000000..68456d4 --- /dev/null +++ b/test-snapshots/query/802fc8af179b4644/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 1, + "TrackId_4768": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 17, + "TrackId_4768": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 8, + "TrackId_4768": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 1, + "TrackId_4768": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 8, + "TrackId_4768": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 1, + "TrackId_4768": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 8, + "TrackId_4768": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 1, + "TrackId_4768": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 8, + "TrackId_4768": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_0589": 1, + "TrackId_4768": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/802fc8af179b4644/request.json b/test-snapshots/query/802fc8af179b4644/request.json new file mode 100644 index 0000000..9f1296b --- /dev/null +++ b/test-snapshots/query/802fc8af179b4644/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_0589": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_4768": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8035626b3ac86c5a/expected.json b/test-snapshots/query/8035626b3ac86c5a/expected.json new file mode 100644 index 0000000..69b7688 --- /dev/null +++ b/test-snapshots/query/8035626b3ac86c5a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_1444": "Rock" + }, + { + "Name_1444": "Jazz" + }, + { + "Name_1444": "Metal" + }, + { + "Name_1444": "Alternative & Punk" + }, + { + "Name_1444": "Rock And Roll" + }, + { + "Name_1444": "Blues" + }, + { + "Name_1444": "Latin" + }, + { + "Name_1444": "Reggae" + }, + { + "Name_1444": "Pop" + }, + { + "Name_1444": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8035626b3ac86c5a/request.json b/test-snapshots/query/8035626b3ac86c5a/request.json new file mode 100644 index 0000000..6cdde54 --- /dev/null +++ b/test-snapshots/query/8035626b3ac86c5a/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_1444": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8035fb29e2887cd6/expected.json b/test-snapshots/query/8035fb29e2887cd6/expected.json new file mode 100644 index 0000000..61abe3c --- /dev/null +++ b/test-snapshots/query/8035fb29e2887cd6/expected.json @@ -0,0 +1,1142 @@ +[ + { + "rows": [ + { + "AlbumId_6913": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "For Those About To Rock We Salute You" + }, + { + "AlbumId_6913": 10, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5339931, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 222380, + "Name": "Cochise", + "TrackId": 85, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5988186, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 249391, + "Name": "What You Are", + "TrackId": 88, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6321091, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263262, + "Name": "Set It Off", + "TrackId": 90, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6672176, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 277890, + "Name": "Show Me How to Live", + "TrackId": 86, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6709793, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 279457, + "Name": "Gasoline", + "TrackId": 87, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7059624, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294034, + "Name": "Like a Stone", + "TrackId": 89, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7193162, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 299598, + "Name": "Getaway Car", + "TrackId": 97, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7289084, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 303595, + "Name": "Light My Way", + "TrackId": 96, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Audioslave" + }, + { + "AlbumId_6913": 100, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Iron Maiden" + }, + { + "AlbumId_6913": 101, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Killers" + }, + { + "AlbumId_6913": 102, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10589917, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 441155, + "Name": "Phantom Of The Opera", + "TrackId": 1304, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 1154488, + "Composer": null, + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 48013, + "Name": "Intro- Churchill S Speech", + "TrackId": 1287, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4410181, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 183666, + "Name": "Wrathchild", + "TrackId": 1300, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Live After Death" + }, + { + "AlbumId_6913": 103, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId_6913": 104, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 104, + "Bytes": 10577743, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 440555, + "Name": "Heaven Can Wait", + "TrackId": 1317, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 10751410, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 447791, + "Name": "Hallowed Be Thy Name", + "TrackId": 1321, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11380851, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 474017, + "Name": "Running Free", + "TrackId": 1324, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11874875, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 494602, + "Name": "Iron Maiden", + "TrackId": 1320, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5588560, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 232672, + "Name": "The Trooper", + "TrackId": 1322, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5665052, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 235859, + "Name": "Run To The Hills", + "TrackId": 1318, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 6302648, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 262426, + "Name": "The Clairvoyant", + "TrackId": 1316, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 7648679, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 318511, + "Name": "Sanctuary", + "TrackId": 1323, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 8122030, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 338233, + "Name": "2 Minutes To Midnight", + "TrackId": 1319, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 9045532, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 376711, + "Name": "Bring Your Daughter... To The Slaughter...", + "TrackId": 1315, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId_6913": 105, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 105, + "Bytes": 3672064, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229459, + "Name": "Holy Smoke", + "TrackId": 1326, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 3960832, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 247510, + "Name": "Hooks In You", + "TrackId": 1332, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4018088, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 250853, + "Name": "Fates Warning", + "TrackId": 1329, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4071587, + "Composer": "Bruce Dickinson/David Murray", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 254197, + "Name": "Public Enema Number One", + "TrackId": 1328, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4089856, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 255582, + "Name": "Tailgunner", + "TrackId": 1325, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4141056, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 258768, + "Name": "The Assassin", + "TrackId": 1330, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4225024, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 263941, + "Name": "No Prayer For The Dying", + "TrackId": 1327, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4407296, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275408, + "Name": "Run Silent Run Deep", + "TrackId": 1331, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4548608, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 284238, + "Name": "Bring Your Daughter... ...To The Slaughter", + "TrackId": 1333, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 5322752, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 332617, + "Name": "Mother Russia", + "TrackId": 1334, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "No Prayer For The Dying" + }, + { + "AlbumId_6913": 106, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 106, + "Bytes": 3306324, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 206367, + "Name": "Sun And Steel", + "TrackId": 1342, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3543040, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 221309, + "Name": "Quest For Fire", + "TrackId": 1341, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3686400, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 230269, + "Name": "Flight Of The Icarus", + "TrackId": 1337, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4024320, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 251454, + "Name": "The Trooper", + "TrackId": 1339, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4710400, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 294347, + "Name": "Still Life", + "TrackId": 1340, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5212160, + "Composer": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 325694, + "Name": "Die With Your Boots On", + "TrackId": 1338, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5914624, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 369554, + "Name": "Where Eagles Dare", + "TrackId": 1335, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 6539264, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 408607, + "Name": "Revelations", + "TrackId": 1336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 7129264, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 445283, + "Name": "To Tame A Land", + "TrackId": 1343, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Piece Of Mind" + }, + { + "AlbumId_6913": 107, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + }, + "Title_9135": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8035fb29e2887cd6/request.json b/test-snapshots/query/8035fb29e2887cd6/request.json new file mode 100644 index 0000000..0c18a7a --- /dev/null +++ b/test-snapshots/query/8035fb29e2887cd6/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_6913": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_9135": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/807d08cb1c544d94/expected.json b/test-snapshots/query/807d08cb1c544d94/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/807d08cb1c544d94/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/807d08cb1c544d94/request.json b/test-snapshots/query/807d08cb1c544d94/request.json new file mode 100644 index 0000000..e1aeb65 --- /dev/null +++ b/test-snapshots/query/807d08cb1c544d94/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-07-20" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 59 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8086b88dfbdda433/expected.json b/test-snapshots/query/8086b88dfbdda433/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/8086b88dfbdda433/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8086b88dfbdda433/request.json b/test-snapshots/query/8086b88dfbdda433/request.json new file mode 100644 index 0000000..59f3b98 --- /dev/null +++ b/test-snapshots/query/8086b88dfbdda433/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/80913c39cecff9ba/expected.json b/test-snapshots/query/80913c39cecff9ba/expected.json new file mode 100644 index 0000000..da5393c --- /dev/null +++ b/test-snapshots/query/80913c39cecff9ba/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 17 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 8 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 8 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 8 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 8 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_3895": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/80913c39cecff9ba/request.json b/test-snapshots/query/80913c39cecff9ba/request.json new file mode 100644 index 0000000..20b89fa --- /dev/null +++ b/test-snapshots/query/80913c39cecff9ba/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_3895": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/80b3897609b81213/expected.json b/test-snapshots/query/80b3897609b81213/expected.json new file mode 100644 index 0000000..f273a15 --- /dev/null +++ b/test-snapshots/query/80b3897609b81213/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_5463": 275, + "Name_2281": "Philip Glass Ensemble" + }, + { + "ArtistId_5463": 274, + "Name_2281": "Nash Ensemble" + }, + { + "ArtistId_5463": 273, + "Name_2281": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "ArtistId_5463": 272, + "Name_2281": "Emerson String Quartet" + }, + { + "ArtistId_5463": 271, + "Name_2281": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "ArtistId_5463": 270, + "Name_2281": "Gerald Moore" + }, + { + "ArtistId_5463": 269, + "Name_2281": "Michele Campanella" + }, + { + "ArtistId_5463": 268, + "Name_2281": "Itzhak Perlman" + }, + { + "ArtistId_5463": 267, + "Name_2281": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "ArtistId_5463": 266, + "Name_2281": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/80b3897609b81213/request.json b/test-snapshots/query/80b3897609b81213/request.json new file mode 100644 index 0000000..1f852e8 --- /dev/null +++ b/test-snapshots/query/80b3897609b81213/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_5463": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_2281": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/80c641e48f89f59d/expected.json b/test-snapshots/query/80c641e48f89f59d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/80c641e48f89f59d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/80c641e48f89f59d/request.json b/test-snapshots/query/80c641e48f89f59d/request.json new file mode 100644 index 0000000..204834d --- /dev/null +++ b/test-snapshots/query/80c641e48f89f59d/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/80d1b0cfe5ac9e53/expected.json b/test-snapshots/query/80d1b0cfe5ac9e53/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/80d1b0cfe5ac9e53/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/80d1b0cfe5ac9e53/request.json b/test-snapshots/query/80d1b0cfe5ac9e53/request.json new file mode 100644 index 0000000..15b6c18 --- /dev/null +++ b/test-snapshots/query/80d1b0cfe5ac9e53/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "SW1V 3EN" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "marc.dubois@hotmail.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lyon" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/80d48f61f5e9c3c0/expected.json b/test-snapshots/query/80d48f61f5e9c3c0/expected.json new file mode 100644 index 0000000..cbb4710 --- /dev/null +++ b/test-snapshots/query/80d48f61f5e9c3c0/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "PlaylistId_avg_6374": 4.917039586, + "PlaylistId_min_8134": 1, + "TrackId_count_3745": 8715, + "TrackId_max_1020": 3503, + "TrackId_min_0547": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/80d48f61f5e9c3c0/request.json b/test-snapshots/query/80d48f61f5e9c3c0/request.json new file mode 100644 index 0000000..6c5c630 --- /dev/null +++ b/test-snapshots/query/80d48f61f5e9c3c0/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "PlaylistId_avg_6374": { + "type": "single_column", + "column": "PlaylistId", + "function": "avg" + }, + "TrackId_min_0547": { + "type": "single_column", + "column": "TrackId", + "function": "min" + }, + "TrackId_max_1020": { + "type": "single_column", + "column": "TrackId", + "function": "max" + }, + "PlaylistId_min_8134": { + "type": "single_column", + "column": "PlaylistId", + "function": "min" + }, + "TrackId_count_3745": { + "type": "single_column", + "column": "TrackId", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/80de2050adba77aa/expected.json b/test-snapshots/query/80de2050adba77aa/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/80de2050adba77aa/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/80de2050adba77aa/request.json b/test-snapshots/query/80de2050adba77aa/request.json new file mode 100644 index 0000000..c37f7fb --- /dev/null +++ b/test-snapshots/query/80de2050adba77aa/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/80e5b65b9dc56c44/expected.json b/test-snapshots/query/80e5b65b9dc56c44/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/80e5b65b9dc56c44/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/80e5b65b9dc56c44/request.json b/test-snapshots/query/80e5b65b9dc56c44/request.json new file mode 100644 index 0000000..1a314c6 --- /dev/null +++ b/test-snapshots/query/80e5b65b9dc56c44/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-07-20" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/812ff5258b3682a2/expected.json b/test-snapshots/query/812ff5258b3682a2/expected.json new file mode 100644 index 0000000..5a7931c --- /dev/null +++ b/test-snapshots/query/812ff5258b3682a2/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingAddress_8491": "Rilská 3174/6", + "BillingCity_7795": "Prague", + "BillingCountry_8190": "Czech Republic", + "BillingPostalCode_5836": "14300", + "CustomerId_5573": 6, + "Total_3533": 25.86 + }, + { + "BillingAddress_8491": "2211 W Berry Street", + "BillingCity_7795": "Fort Worth", + "BillingCountry_8190": "USA", + "BillingPostalCode_5836": "76110", + "CustomerId_5573": 26, + "Total_3533": 23.86 + }, + { + "BillingAddress_8491": "3 Chatham Street", + "BillingCity_7795": "Dublin", + "BillingCountry_8190": "Ireland", + "BillingPostalCode_5836": null, + "CustomerId_5573": 46, + "Total_3533": 21.86 + }, + { + "BillingAddress_8491": "Erzsébet krt. 58.", + "BillingCity_7795": "Budapest", + "BillingCountry_8190": "Hungary", + "BillingPostalCode_5836": "H-1073", + "CustomerId_5573": 45, + "Total_3533": 21.86 + }, + { + "BillingAddress_8491": "Rotenturmstraße 4, 1010 Innere Stadt", + "BillingCity_7795": "Vienne", + "BillingCountry_8190": "Austria", + "BillingPostalCode_5836": "1010", + "CustomerId_5573": 7, + "Total_3533": 18.86 + }, + { + "BillingAddress_8491": "319 N. Frances Street", + "BillingCity_7795": "Madison", + "BillingCountry_8190": "USA", + "BillingPostalCode_5836": "53703", + "CustomerId_5573": 25, + "Total_3533": 18.86 + }, + { + "BillingAddress_8491": "Calle Lira, 198", + "BillingCity_7795": "Santiago", + "BillingCountry_8190": "Chile", + "BillingPostalCode_5836": null, + "CustomerId_5573": 57, + "Total_3533": 17.91 + }, + { + "BillingAddress_8491": "Klanova 9/506", + "BillingCity_7795": "Prague", + "BillingCountry_8190": "Czech Republic", + "BillingPostalCode_5836": "14700", + "CustomerId_5573": 5, + "Total_3533": 16.86 + }, + { + "BillingAddress_8491": "68, Rue Jouvence", + "BillingCity_7795": "Dijon", + "BillingCountry_8190": "France", + "BillingPostalCode_5836": "21000", + "CustomerId_5573": 43, + "Total_3533": 16.86 + }, + { + "BillingAddress_8491": "Ullevålsveien 14", + "BillingCity_7795": "Oslo", + "BillingCountry_8190": "Norway", + "BillingPostalCode_5836": "0171", + "CustomerId_5573": 4, + "Total_3533": 15.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/812ff5258b3682a2/request.json b/test-snapshots/query/812ff5258b3682a2/request.json new file mode 100644 index 0000000..ac827d4 --- /dev/null +++ b/test-snapshots/query/812ff5258b3682a2/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_8491": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_7795": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_8190": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_5836": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "Total_3533": { + "type": "column", + "column": "Total", + "fields": null + }, + "CustomerId_5573": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/813d28bb0f4a9546/expected.json b/test-snapshots/query/813d28bb0f4a9546/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/813d28bb0f4a9546/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/813d28bb0f4a9546/request.json b/test-snapshots/query/813d28bb0f4a9546/request.json new file mode 100644 index 0000000..d0748cf --- /dev/null +++ b/test-snapshots/query/813d28bb0f4a9546/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+91 0124 39883988" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8158e336ebce64fd/expected.json b/test-snapshots/query/8158e336ebce64fd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8158e336ebce64fd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8158e336ebce64fd/request.json b/test-snapshots/query/8158e336ebce64fd/request.json new file mode 100644 index 0000000..95ddc5b --- /dev/null +++ b/test-snapshots/query/8158e336ebce64fd/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/815a23b703cbefaf/expected.json b/test-snapshots/query/815a23b703cbefaf/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/815a23b703cbefaf/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/815a23b703cbefaf/request.json b/test-snapshots/query/815a23b703cbefaf/request.json new file mode 100644 index 0000000..0d1f097 --- /dev/null +++ b/test-snapshots/query/815a23b703cbefaf/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/81a89bed6bb735f4/expected.json b/test-snapshots/query/81a89bed6bb735f4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/81a89bed6bb735f4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/81a89bed6bb735f4/request.json b/test-snapshots/query/81a89bed6bb735f4/request.json new file mode 100644 index 0000000..f34a750 --- /dev/null +++ b/test-snapshots/query/81a89bed6bb735f4/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Soundtrack" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/81b8fb8e85cf8a06/expected.json b/test-snapshots/query/81b8fb8e85cf8a06/expected.json new file mode 100644 index 0000000..f28f56e --- /dev/null +++ b/test-snapshots/query/81b8fb8e85cf8a06/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/81b8fb8e85cf8a06/request.json b/test-snapshots/query/81b8fb8e85cf8a06/request.json new file mode 100644 index 0000000..2d46a19 --- /dev/null +++ b/test-snapshots/query/81b8fb8e85cf8a06/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/81d155c440f4c6b1/expected.json b/test-snapshots/query/81d155c440f4c6b1/expected.json new file mode 100644 index 0000000..6388317 --- /dev/null +++ b/test-snapshots/query/81d155c440f4c6b1/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Grunge", + "PlaylistId": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/81d155c440f4c6b1/request.json b/test-snapshots/query/81d155c440f4c6b1/request.json new file mode 100644 index 0000000..20605cb --- /dev/null +++ b/test-snapshots/query/81d155c440f4c6b1/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/81e5de7338d65aa6/expected.json b/test-snapshots/query/81e5de7338d65aa6/expected.json new file mode 100644 index 0000000..0df1641 --- /dev/null +++ b/test-snapshots/query/81e5de7338d65aa6/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 537, + "Quantity": 1, + "TrackId": 3258, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 538, + "Quantity": 1, + "TrackId": 3260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 539, + "Quantity": 1, + "TrackId": 3264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 540, + "Quantity": 1, + "TrackId": 3268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 541, + "Quantity": 1, + "TrackId": 3272, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 542, + "Quantity": 1, + "TrackId": 3276, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/81e5de7338d65aa6/request.json b/test-snapshots/query/81e5de7338d65aa6/request.json new file mode 100644 index 0000000..3a933a5 --- /dev/null +++ b/test-snapshots/query/81e5de7338d65aa6/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/820c2c62f52f42a6/expected.json b/test-snapshots/query/820c2c62f52f42a6/expected.json new file mode 100644 index 0000000..89abd26 --- /dev/null +++ b/test-snapshots/query/820c2c62f52f42a6/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "Email_min_6726": "andrew@chinookcorp.com", + "Fax_min_4383": "+1 (403) 246-9899", + "PostalCode_min_0005": "T1H 1Y8", + "ReportsTo_avg_1199": 2.857142857 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/820c2c62f52f42a6/request.json b/test-snapshots/query/820c2c62f52f42a6/request.json new file mode 100644 index 0000000..c3a18f3 --- /dev/null +++ b/test-snapshots/query/820c2c62f52f42a6/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Employee", + "query": { + "aggregates": { + "Fax_min_4383": { + "type": "single_column", + "column": "Fax", + "function": "min" + }, + "ReportsTo_avg_1199": { + "type": "single_column", + "column": "ReportsTo", + "function": "avg" + }, + "Email_min_6726": { + "type": "single_column", + "column": "Email", + "function": "min" + }, + "PostalCode_min_0005": { + "type": "single_column", + "column": "PostalCode", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/823d89d736184eb4/expected.json b/test-snapshots/query/823d89d736184eb4/expected.json new file mode 100644 index 0000000..b9abf85 --- /dev/null +++ b/test-snapshots/query/823d89d736184eb4/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_3925": 1, + "InvoiceLineId_4046": 1, + "Quantity_8970": 1, + "TrackId_8567": 2, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 1, + "InvoiceLineId_4046": 2, + "Quantity_8970": 1, + "TrackId_8567": 4, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 2, + "InvoiceLineId_4046": 3, + "Quantity_8970": 1, + "TrackId_8567": 6, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 2, + "InvoiceLineId_4046": 4, + "Quantity_8970": 1, + "TrackId_8567": 8, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 2, + "InvoiceLineId_4046": 5, + "Quantity_8970": 1, + "TrackId_8567": 10, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 2, + "InvoiceLineId_4046": 6, + "Quantity_8970": 1, + "TrackId_8567": 12, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 3, + "InvoiceLineId_4046": 7, + "Quantity_8970": 1, + "TrackId_8567": 16, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 3, + "InvoiceLineId_4046": 8, + "Quantity_8970": 1, + "TrackId_8567": 20, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 3, + "InvoiceLineId_4046": 9, + "Quantity_8970": 1, + "TrackId_8567": 24, + "UnitPrice_9190": 0.99 + }, + { + "InvoiceId_3925": 3, + "InvoiceLineId_4046": 10, + "Quantity_8970": 1, + "TrackId_8567": 28, + "UnitPrice_9190": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/823d89d736184eb4/request.json b/test-snapshots/query/823d89d736184eb4/request.json new file mode 100644 index 0000000..6d7cc6c --- /dev/null +++ b/test-snapshots/query/823d89d736184eb4/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_3925": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_4046": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_8970": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_8567": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_9190": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/824876f2528259ae/expected.json b/test-snapshots/query/824876f2528259ae/expected.json new file mode 100644 index 0000000..fca5914 --- /dev/null +++ b/test-snapshots/query/824876f2528259ae/expected.json @@ -0,0 +1,916 @@ +[ + { + "rows": [ + { + "Address_8386": "1 Infinite Loop", + "City_2110": "Cupertino", + "Country_8238": "USA", + "CustomerId_8954": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + }, + "FirstName_9138": "Tim", + "LastName_4801": "Goyer", + "State_8745": "CA", + "SupportRepId_9096": 3 + }, + { + "Address_8386": "1 Microsoft Way", + "City_2110": "Redmond", + "Country_8238": "USA", + "CustomerId_8954": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + } + ] + }, + "FirstName_9138": "Jack", + "LastName_4801": "Smith", + "State_8745": "WA", + "SupportRepId_9096": 5 + }, + { + "Address_8386": "1033 N Park Ave", + "City_2110": "Tucson", + "Country_8238": "USA", + "CustomerId_8954": 27, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + } + ] + }, + "FirstName_9138": "Patrick", + "LastName_4801": "Gray", + "State_8745": "AZ", + "SupportRepId_9096": 4 + }, + { + "Address_8386": "11, Place Bellecour", + "City_2110": "Lyon", + "Country_8238": "France", + "CustomerId_8954": 41, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + } + ] + }, + "FirstName_9138": "Marc", + "LastName_4801": "Dubois", + "State_8745": null, + "SupportRepId_9096": 5 + }, + { + "Address_8386": "110 Raeburn Pl", + "City_2110": "Edinburgh ", + "Country_8238": "United Kingdom", + "CustomerId_8954": 54, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2011-06-24", + "InvoiceId": 207, + "Total": 8.91 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-01-28", + "InvoiceId": 336, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-08-04", + "InvoiceId": 381, + "Total": 5.94 + } + ] + }, + "FirstName_9138": "Steve", + "LastName_4801": "Murray", + "State_8745": null, + "SupportRepId_9096": 5 + }, + { + "Address_8386": "113 Lupus St", + "City_2110": "London", + "Country_8238": "United Kingdom", + "CustomerId_8954": 53, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + } + ] + }, + "FirstName_9138": "Phil", + "LastName_4801": "Hughes", + "State_8745": null, + "SupportRepId_9096": 3 + }, + { + "Address_8386": "12,Community Centre", + "City_2110": "Delhi", + "Country_8238": "India", + "CustomerId_8954": 58, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2010-06-12", + "InvoiceId": 120, + "Total": 1.98 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2010-07-23", + "InvoiceId": 131, + "Total": 13.86 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2011-03-23", + "InvoiceId": 186, + "Total": 8.91 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2012-10-27", + "InvoiceId": 315, + "Total": 1.98 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-01-29", + "InvoiceId": 338, + "Total": 3.96 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-05-03", + "InvoiceId": 360, + "Total": 5.94 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-12-22", + "InvoiceId": 412, + "Total": 1.99 + } + ] + }, + "FirstName_9138": "Manoj", + "LastName_4801": "Pareek", + "State_8745": null, + "SupportRepId_9096": 3 + }, + { + "Address_8386": "120 S Orange Ave", + "City_2110": "Orlando", + "Country_8238": "USA", + "CustomerId_8954": 22, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + }, + "FirstName_9138": "Heather", + "LastName_4801": "Leacock", + "State_8745": "FL", + "SupportRepId_9096": 4 + }, + { + "Address_8386": "1498 rue Bélanger", + "City_2110": "Montréal", + "Country_8238": "Canada", + "CustomerId_8954": 3, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + } + ] + }, + "FirstName_9138": "François", + "LastName_4801": "Tremblay", + "State_8745": "QC", + "SupportRepId_9096": 3 + }, + { + "Address_8386": "1600 Amphitheatre Parkway", + "City_2110": "Mountain View", + "Country_8238": "USA", + "CustomerId_8954": 16, + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + }, + "FirstName_9138": "Frank", + "LastName_4801": "Harris", + "State_8745": "CA", + "SupportRepId_9096": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/824876f2528259ae/request.json b/test-snapshots/query/824876f2528259ae/request.json new file mode 100644 index 0000000..aac22b7 --- /dev/null +++ b/test-snapshots/query/824876f2528259ae/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_8386": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_2110": { + "type": "column", + "column": "City", + "fields": null + }, + "State_8745": { + "type": "column", + "column": "State", + "fields": null + }, + "Country_8238": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_8954": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "SupportRepId_9096": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "LastName_4801": { + "type": "column", + "column": "LastName", + "fields": null + }, + "FirstName_9138": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/825a51843a1ecf9a/expected.json b/test-snapshots/query/825a51843a1ecf9a/expected.json new file mode 100644 index 0000000..3fe6524 --- /dev/null +++ b/test-snapshots/query/825a51843a1ecf9a/expected.json @@ -0,0 +1,603 @@ +[ + { + "rows": [ + { + "BirthDate_8791": "1947-09-19", + "City_0767": "Calgary", + "Country_6883": "Canada", + "EmployeeId_3075": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + }, + "Fax_6623": "+1 (403) 263-4289", + "FirstName_0476": "Margaret", + "HireDate_2667": "2003-05-03", + "LastName_2337": "Park", + "Phone_8875": "+1 (403) 263-4423", + "PostalCode_7297": "T2P 5G3", + "ReportsTo_5912": 2, + "State_1009": "AB", + "Title_3790": "Sales Support Agent" + }, + { + "BirthDate_8791": "1958-12-08", + "City_0767": "Calgary", + "Country_6883": "Canada", + "EmployeeId_3075": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_6623": "+1 (403) 262-3322", + "FirstName_0476": "Nancy", + "HireDate_2667": "2002-05-01", + "LastName_2337": "Edwards", + "Phone_8875": "+1 (403) 262-3443", + "PostalCode_7297": "T2P 2T3", + "ReportsTo_5912": 1, + "State_1009": "AB", + "Title_3790": "Sales Manager" + }, + { + "BirthDate_8791": "1962-02-18", + "City_0767": "Edmonton", + "Country_6883": "Canada", + "EmployeeId_3075": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_6623": "+1 (780) 428-3457", + "FirstName_0476": "Andrew", + "HireDate_2667": "2002-08-14", + "LastName_2337": "Adams", + "Phone_8875": "+1 (780) 428-9482", + "PostalCode_7297": "T5K 2N1", + "ReportsTo_5912": null, + "State_1009": "AB", + "Title_3790": "General Manager" + }, + { + "BirthDate_8791": "1965-03-03", + "City_0767": "Calgary", + "Country_6883": "Canada", + "EmployeeId_3075": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + }, + "Fax_6623": "1 (780) 836-9543", + "FirstName_0476": "Steve", + "HireDate_2667": "2003-10-17", + "LastName_2337": "Johnson", + "Phone_8875": "1 (780) 836-9987", + "PostalCode_7297": "T3B 1Y7", + "ReportsTo_5912": 2, + "State_1009": "AB", + "Title_3790": "Sales Support Agent" + }, + { + "BirthDate_8791": "1968-01-09", + "City_0767": "Lethbridge", + "Country_6883": "Canada", + "EmployeeId_3075": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_6623": "+1 (403) 467-8772", + "FirstName_0476": "Laura", + "HireDate_2667": "2004-03-04", + "LastName_2337": "Callahan", + "Phone_8875": "+1 (403) 467-3351", + "PostalCode_7297": "T1H 1Y8", + "ReportsTo_5912": 6, + "State_1009": "AB", + "Title_3790": "IT Staff" + }, + { + "BirthDate_8791": "1970-05-29", + "City_0767": "Lethbridge", + "Country_6883": "Canada", + "EmployeeId_3075": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_6623": "+1 (403) 456-8485", + "FirstName_0476": "Robert", + "HireDate_2667": "2004-01-02", + "LastName_2337": "King", + "Phone_8875": "+1 (403) 456-9986", + "PostalCode_7297": "T1K 5N8", + "ReportsTo_5912": 6, + "State_1009": "AB", + "Title_3790": "IT Staff" + }, + { + "BirthDate_8791": "1973-07-01", + "City_0767": "Calgary", + "Country_6883": "Canada", + "EmployeeId_3075": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_6623": "+1 (403) 246-9899", + "FirstName_0476": "Michael", + "HireDate_2667": "2003-10-17", + "LastName_2337": "Mitchell", + "Phone_8875": "+1 (403) 246-9887", + "PostalCode_7297": "T3B 0C5", + "ReportsTo_5912": 1, + "State_1009": "AB", + "Title_3790": "IT Manager" + }, + { + "BirthDate_8791": "1973-08-29", + "City_0767": "Calgary", + "Country_6883": "Canada", + "EmployeeId_3075": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + }, + "Fax_6623": "+1 (403) 262-6712", + "FirstName_0476": "Jane", + "HireDate_2667": "2002-04-01", + "LastName_2337": "Peacock", + "Phone_8875": "+1 (403) 262-3443", + "PostalCode_7297": "T2P 5M5", + "ReportsTo_5912": 2, + "State_1009": "AB", + "Title_3790": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/825a51843a1ecf9a/request.json b/test-snapshots/query/825a51843a1ecf9a/request.json new file mode 100644 index 0000000..455b0d6 --- /dev/null +++ b/test-snapshots/query/825a51843a1ecf9a/request.json @@ -0,0 +1,159 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "State_1009": { + "type": "column", + "column": "State", + "fields": null + }, + "BirthDate_8791": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_0767": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_6883": { + "type": "column", + "column": "Country", + "fields": null + }, + "Title_3790": { + "type": "column", + "column": "Title", + "fields": null + }, + "EmployeeId_3075": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_6623": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_0476": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_2667": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_2337": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_8875": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_7297": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_5912": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/82bde5c4919b8b98/expected.json b/test-snapshots/query/82bde5c4919b8b98/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/82bde5c4919b8b98/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/82bde5c4919b8b98/request.json b/test-snapshots/query/82bde5c4919b8b98/request.json new file mode 100644 index 0000000..72dc9d5 --- /dev/null +++ b/test-snapshots/query/82bde5c4919b8b98/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/82f184a392173efb/expected.json b/test-snapshots/query/82f184a392173efb/expected.json new file mode 100644 index 0000000..7337a87 --- /dev/null +++ b/test-snapshots/query/82f184a392173efb/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/82f184a392173efb/request.json b/test-snapshots/query/82f184a392173efb/request.json new file mode 100644 index 0000000..a783b62 --- /dev/null +++ b/test-snapshots/query/82f184a392173efb/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Park" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/831171eec37bb2f7/expected.json b/test-snapshots/query/831171eec37bb2f7/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/831171eec37bb2f7/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/831171eec37bb2f7/request.json b/test-snapshots/query/831171eec37bb2f7/request.json new file mode 100644 index 0000000..56524db --- /dev/null +++ b/test-snapshots/query/831171eec37bb2f7/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/834ac955e28fae87/expected.json b/test-snapshots/query/834ac955e28fae87/expected.json new file mode 100644 index 0000000..569e6ea --- /dev/null +++ b/test-snapshots/query/834ac955e28fae87/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1009 + }, + { + "PlaylistId": 8, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/834ac955e28fae87/request.json b/test-snapshots/query/834ac955e28fae87/request.json new file mode 100644 index 0000000..727dadf --- /dev/null +++ b/test-snapshots/query/834ac955e28fae87/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1009 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/835ba47f27aae1e0/expected.json b/test-snapshots/query/835ba47f27aae1e0/expected.json new file mode 100644 index 0000000..d0311c8 --- /dev/null +++ b/test-snapshots/query/835ba47f27aae1e0/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_3342": 5 + }, + { + "PlaylistId_3342": 6 + }, + { + "PlaylistId_3342": 4 + }, + { + "PlaylistId_3342": 11 + }, + { + "PlaylistId_3342": 12 + }, + { + "PlaylistId_3342": 13 + }, + { + "PlaylistId_3342": 14 + }, + { + "PlaylistId_3342": 15 + }, + { + "PlaylistId_3342": 16 + }, + { + "PlaylistId_3342": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/835ba47f27aae1e0/request.json b/test-snapshots/query/835ba47f27aae1e0/request.json new file mode 100644 index 0000000..0a72dc6 --- /dev/null +++ b/test-snapshots/query/835ba47f27aae1e0/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "PlaylistId_3342": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8362c524ea975558/expected.json b/test-snapshots/query/8362c524ea975558/expected.json new file mode 100644 index 0000000..bcf0cf7 --- /dev/null +++ b/test-snapshots/query/8362c524ea975558/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8362c524ea975558/request.json b/test-snapshots/query/8362c524ea975558/request.json new file mode 100644 index 0000000..b81d3e0 --- /dev/null +++ b/test-snapshots/query/8362c524ea975558/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/83727a70e20ed3cd/expected.json b/test-snapshots/query/83727a70e20ed3cd/expected.json new file mode 100644 index 0000000..002b575 --- /dev/null +++ b/test-snapshots/query/83727a70e20ed3cd/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_6790": 5 + }, + { + "MediaTypeId_6790": 4 + }, + { + "MediaTypeId_6790": 3 + }, + { + "MediaTypeId_6790": 2 + }, + { + "MediaTypeId_6790": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/83727a70e20ed3cd/request.json b/test-snapshots/query/83727a70e20ed3cd/request.json new file mode 100644 index 0000000..b102a05 --- /dev/null +++ b/test-snapshots/query/83727a70e20ed3cd/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_6790": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/838dcbb141a373fa/expected.json b/test-snapshots/query/838dcbb141a373fa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/838dcbb141a373fa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/838dcbb141a373fa/request.json b/test-snapshots/query/838dcbb141a373fa/request.json new file mode 100644 index 0000000..91c0267 --- /dev/null +++ b/test-snapshots/query/838dcbb141a373fa/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 020 7976 5722" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "12,Community Centre" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/84084f5306673cb6/expected.json b/test-snapshots/query/84084f5306673cb6/expected.json new file mode 100644 index 0000000..fd85c3c --- /dev/null +++ b/test-snapshots/query/84084f5306673cb6/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "Address_1680": "Via Degli Scipioni, 43", + "City_7156": "Rome", + "Company_4711": null, + "Country_3806": "Italy", + "Email_8704": "lucas.mancini@yahoo.it", + "Fax_7845": null, + "LastName_8501": "Mancini", + "Phone_5608": "+39 06 39733434", + "PostalCode_2473": "00192" + }, + { + "Address_1680": "Ullevålsveien 14", + "City_7156": "Oslo", + "Company_4711": null, + "Country_3806": "Norway", + "Email_8704": "bjorn.hansen@yahoo.no", + "Fax_7845": null, + "LastName_8501": "Hansen", + "Phone_5608": "+47 22 44 22 22", + "PostalCode_2473": "0171" + }, + { + "Address_1680": "Theodor-Heuss-Straße 34", + "City_7156": "Stuttgart", + "Company_4711": null, + "Country_3806": "Germany", + "Email_8704": "leonekohler@surfeu.de", + "Fax_7845": null, + "LastName_8501": "Köhler", + "Phone_5608": "+49 0711 2842222", + "PostalCode_2473": "70174" + }, + { + "Address_1680": "Tauentzienstraße 8", + "City_7156": "Berlin", + "Company_4711": null, + "Country_3806": "Germany", + "Email_8704": "hannah.schneider@yahoo.de", + "Fax_7845": null, + "LastName_8501": "Schneider", + "Phone_5608": "+49 030 26550280", + "PostalCode_2473": "10789" + }, + { + "Address_1680": "Sønder Boulevard 51", + "City_7156": "Copenhagen", + "Company_4711": null, + "Country_3806": "Denmark", + "Email_8704": "kara.nielsen@jubii.dk", + "Fax_7845": null, + "LastName_8501": "Nielsen", + "Phone_5608": "+453 3331 9991", + "PostalCode_2473": "1720" + }, + { + "Address_1680": "Rua Dr. Falcão Filho, 155", + "City_7156": "São Paulo", + "Company_4711": "Woodstock Discos", + "Country_3806": "Brazil", + "Email_8704": "eduardo@woodstock.com.br", + "Fax_7845": "+55 (11) 3033-4564", + "LastName_8501": "Martins", + "Phone_5608": "+55 (11) 3033-5446", + "PostalCode_2473": "01007-010" + }, + { + "Address_1680": "Rua dos Campeões Europeus de Viena, 4350", + "City_7156": "Porto", + "Company_4711": null, + "Country_3806": "Portugal", + "Email_8704": "masampaio@sapo.pt", + "Fax_7845": null, + "LastName_8501": "Sampaio", + "Phone_5608": "+351 (225) 022-448", + "PostalCode_2473": null + }, + { + "Address_1680": "Rua da Assunção 53", + "City_7156": "Lisbon", + "Company_4711": null, + "Country_3806": "Portugal", + "Email_8704": "jfernandes@yahoo.pt", + "Fax_7845": null, + "LastName_8501": "Fernandes", + "Phone_5608": "+351 (213) 466-111", + "PostalCode_2473": null + }, + { + "Address_1680": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_7156": "Vienne", + "Company_4711": null, + "Country_3806": "Austria", + "Email_8704": "astrid.gruber@apple.at", + "Fax_7845": null, + "LastName_8501": "Gruber", + "Phone_5608": "+43 01 5134505", + "PostalCode_2473": "1010" + }, + { + "Address_1680": "Rilská 3174/6", + "City_7156": "Prague", + "Company_4711": null, + "Country_3806": "Czech Republic", + "Email_8704": "hholy@gmail.com", + "Fax_7845": null, + "LastName_8501": "Holý", + "Phone_5608": "+420 2 4177 0449", + "PostalCode_2473": "14300" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/84084f5306673cb6/request.json b/test-snapshots/query/84084f5306673cb6/request.json new file mode 100644 index 0000000..64788d1 --- /dev/null +++ b/test-snapshots/query/84084f5306673cb6/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_1680": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_7156": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_4711": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_3806": { + "type": "column", + "column": "Country", + "fields": null + }, + "PostalCode_2473": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Email_8704": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_7845": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Phone_5608": { + "type": "column", + "column": "Phone", + "fields": null + }, + "LastName_8501": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/840edc243c6b7449/expected.json b/test-snapshots/query/840edc243c6b7449/expected.json new file mode 100644 index 0000000..3c48e4b --- /dev/null +++ b/test-snapshots/query/840edc243c6b7449/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/840edc243c6b7449/request.json b/test-snapshots/query/840edc243c6b7449/request.json new file mode 100644 index 0000000..d31c37a --- /dev/null +++ b/test-snapshots/query/840edc243c6b7449/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 256 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/841dfac846ef143/expected.json b/test-snapshots/query/841dfac846ef143/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/841dfac846ef143/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/841dfac846ef143/request.json b/test-snapshots/query/841dfac846ef143/request.json new file mode 100644 index 0000000..5581863 --- /dev/null +++ b/test-snapshots/query/841dfac846ef143/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 268 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8434024aef6aab31/expected.json b/test-snapshots/query/8434024aef6aab31/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8434024aef6aab31/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8434024aef6aab31/request.json b/test-snapshots/query/8434024aef6aab31/request.json new file mode 100644 index 0000000..c226b72 --- /dev/null +++ b/test-snapshots/query/8434024aef6aab31/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8463c1d10ac5bfc0/expected.json b/test-snapshots/query/8463c1d10ac5bfc0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8463c1d10ac5bfc0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8463c1d10ac5bfc0/request.json b/test-snapshots/query/8463c1d10ac5bfc0/request.json new file mode 100644 index 0000000..679a5f0 --- /dev/null +++ b/test-snapshots/query/8463c1d10ac5bfc0/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/84aac82ecd0838a5/expected.json b/test-snapshots/query/84aac82ecd0838a5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/84aac82ecd0838a5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/84aac82ecd0838a5/request.json b/test-snapshots/query/84aac82ecd0838a5/request.json new file mode 100644 index 0000000..233c968 --- /dev/null +++ b/test-snapshots/query/84aac82ecd0838a5/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/84cacfff1c5bbfb7/expected.json b/test-snapshots/query/84cacfff1c5bbfb7/expected.json new file mode 100644 index 0000000..f49bac9 --- /dev/null +++ b/test-snapshots/query/84cacfff1c5bbfb7/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 160, + "ArtistId": 106, + "Title": "Ace Of Spades" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/84cacfff1c5bbfb7/request.json b/test-snapshots/query/84cacfff1c5bbfb7/request.json new file mode 100644 index 0000000..d1a2b1b --- /dev/null +++ b/test-snapshots/query/84cacfff1c5bbfb7/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/84e85d95b315541b/expected.json b/test-snapshots/query/84e85d95b315541b/expected.json new file mode 100644 index 0000000..789cc0e --- /dev/null +++ b/test-snapshots/query/84e85d95b315541b/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Country_4519": "Italy" + }, + { + "Country_4519": "Norway" + }, + { + "Country_4519": "Germany" + }, + { + "Country_4519": "Germany" + }, + { + "Country_4519": "Denmark" + }, + { + "Country_4519": "Brazil" + }, + { + "Country_4519": "Portugal" + }, + { + "Country_4519": "Portugal" + }, + { + "Country_4519": "Austria" + }, + { + "Country_4519": "Czech Republic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/84e85d95b315541b/request.json b/test-snapshots/query/84e85d95b315541b/request.json new file mode 100644 index 0000000..8df33f7 --- /dev/null +++ b/test-snapshots/query/84e85d95b315541b/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Country_4519": { + "type": "column", + "column": "Country", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/85070030ccf26c34/expected.json b/test-snapshots/query/85070030ccf26c34/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/85070030ccf26c34/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/85070030ccf26c34/request.json b/test-snapshots/query/85070030ccf26c34/request.json new file mode 100644 index 0000000..e905c66 --- /dev/null +++ b/test-snapshots/query/85070030ccf26c34/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/850b5dc6046cc05f/expected.json b/test-snapshots/query/850b5dc6046cc05f/expected.json new file mode 100644 index 0000000..851a602 --- /dev/null +++ b/test-snapshots/query/850b5dc6046cc05f/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 142, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId": 143, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/850b5dc6046cc05f/request.json b/test-snapshots/query/850b5dc6046cc05f/request.json new file mode 100644 index 0000000..3aeed11 --- /dev/null +++ b/test-snapshots/query/850b5dc6046cc05f/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8532258ef93ea55a/expected.json b/test-snapshots/query/8532258ef93ea55a/expected.json new file mode 100644 index 0000000..6ab58ea --- /dev/null +++ b/test-snapshots/query/8532258ef93ea55a/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "MediaTypeId_count_5826": 5, + "MediaTypeId_min_0808": 1, + "Name_count_6028": 5, + "Name_min_4493": "AAC audio file" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/8532258ef93ea55a/request.json b/test-snapshots/query/8532258ef93ea55a/request.json new file mode 100644 index 0000000..e49f14f --- /dev/null +++ b/test-snapshots/query/8532258ef93ea55a/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "MediaTypeId_count_5826": { + "type": "single_column", + "column": "MediaTypeId", + "function": "count" + }, + "Name_count_6028": { + "type": "single_column", + "column": "Name", + "function": "count" + }, + "MediaTypeId_min_0808": { + "type": "single_column", + "column": "MediaTypeId", + "function": "min" + }, + "Name_min_4493": { + "type": "single_column", + "column": "Name", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/85a806d5cbb4c9e3/expected.json b/test-snapshots/query/85a806d5cbb4c9e3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/85a806d5cbb4c9e3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/85a806d5cbb4c9e3/request.json b/test-snapshots/query/85a806d5cbb4c9e3/request.json new file mode 100644 index 0000000..e8c608e --- /dev/null +++ b/test-snapshots/query/85a806d5cbb4c9e3/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Orlando" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Smith" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/85aeb1ae8f93db5/expected.json b/test-snapshots/query/85aeb1ae8f93db5/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/85aeb1ae8f93db5/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/85aeb1ae8f93db5/request.json b/test-snapshots/query/85aeb1ae8f93db5/request.json new file mode 100644 index 0000000..4cab5bd --- /dev/null +++ b/test-snapshots/query/85aeb1ae8f93db5/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/85de0c2b895795b6/expected.json b/test-snapshots/query/85de0c2b895795b6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/85de0c2b895795b6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/85de0c2b895795b6/request.json b/test-snapshots/query/85de0c2b895795b6/request.json new file mode 100644 index 0000000..ca71f91 --- /dev/null +++ b/test-snapshots/query/85de0c2b895795b6/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 199836 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/85eca9235bfe8e25/expected.json b/test-snapshots/query/85eca9235bfe8e25/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/85eca9235bfe8e25/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/85eca9235bfe8e25/request.json b/test-snapshots/query/85eca9235bfe8e25/request.json new file mode 100644 index 0000000..537b286 --- /dev/null +++ b/test-snapshots/query/85eca9235bfe8e25/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Inject The Venom" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/85fc0e6ad709965/expected.json b/test-snapshots/query/85fc0e6ad709965/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/85fc0e6ad709965/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/85fc0e6ad709965/request.json b/test-snapshots/query/85fc0e6ad709965/request.json new file mode 100644 index 0000000..97b8dc3 --- /dev/null +++ b/test-snapshots/query/85fc0e6ad709965/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/861dcc63a71d7c51/expected.json b/test-snapshots/query/861dcc63a71d7c51/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/861dcc63a71d7c51/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/861dcc63a71d7c51/request.json b/test-snapshots/query/861dcc63a71d7c51/request.json new file mode 100644 index 0000000..470d3dc --- /dev/null +++ b/test-snapshots/query/861dcc63a71d7c51/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/864b00dcdbfb1fa2/expected.json b/test-snapshots/query/864b00dcdbfb1fa2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/864b00dcdbfb1fa2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/864b00dcdbfb1fa2/request.json b/test-snapshots/query/864b00dcdbfb1fa2/request.json new file mode 100644 index 0000000..f5366c0 --- /dev/null +++ b/test-snapshots/query/864b00dcdbfb1fa2/request.json @@ -0,0 +1,126 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Mountain View" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Smith" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/86bcf38bca490499/expected.json b/test-snapshots/query/86bcf38bca490499/expected.json new file mode 100644 index 0000000..041b810 --- /dev/null +++ b/test-snapshots/query/86bcf38bca490499/expected.json @@ -0,0 +1,105 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/86bcf38bca490499/request.json b/test-snapshots/query/86bcf38bca490499/request.json new file mode 100644 index 0000000..d37f4eb --- /dev/null +++ b/test-snapshots/query/86bcf38bca490499/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/86d73f41aadfb0e8/expected.json b/test-snapshots/query/86d73f41aadfb0e8/expected.json new file mode 100644 index 0000000..c5634a6 --- /dev/null +++ b/test-snapshots/query/86d73f41aadfb0e8/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Company_4973": null, + "CustomerId_2690": 33, + "Email_3770": "ellie.sullivan@shaw.ca", + "Fax_8032": null, + "FirstName_7455": "Ellie", + "State_9717": "NT" + }, + { + "Company_4973": "Rogers Canada", + "CustomerId_2690": 15, + "Email_3770": "jenniferp@rogers.ca", + "Fax_8032": "+1 (604) 688-8756", + "FirstName_7455": "Jennifer", + "State_9717": "BC" + }, + { + "Company_4973": null, + "CustomerId_2690": 53, + "Email_3770": "phil.hughes@gmail.com", + "Fax_8032": null, + "FirstName_7455": "Phil", + "State_9717": null + }, + { + "Company_4973": null, + "CustomerId_2690": 52, + "Email_3770": "emma_jones@hotmail.com", + "Fax_8032": null, + "FirstName_7455": "Emma", + "State_9717": null + }, + { + "Company_4973": null, + "CustomerId_2690": 29, + "Email_3770": "robbrown@shaw.ca", + "Fax_8032": null, + "FirstName_7455": "Robert", + "State_9717": "ON" + }, + { + "Company_4973": null, + "CustomerId_2690": 30, + "Email_3770": "edfrancis@yachoo.ca", + "Fax_8032": null, + "FirstName_7455": "Edward", + "State_9717": "ON" + }, + { + "Company_4973": null, + "CustomerId_2690": 3, + "Email_3770": "ftremblay@gmail.com", + "Fax_8032": null, + "FirstName_7455": "François", + "State_9717": "QC" + }, + { + "Company_4973": null, + "CustomerId_2690": 45, + "Email_3770": "ladislav_kovacs@apple.hu", + "Fax_8032": null, + "FirstName_7455": "Ladislav", + "State_9717": null + }, + { + "Company_4973": "Apple Inc.", + "CustomerId_2690": 19, + "Email_3770": "tgoyer@apple.com", + "Fax_8032": "+1 (408) 996-1011", + "FirstName_7455": "Tim", + "State_9717": "CA" + }, + { + "Company_4973": null, + "CustomerId_2690": 24, + "Email_3770": "fralston@gmail.com", + "Fax_8032": null, + "FirstName_7455": "Frank", + "State_9717": "IL" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/86d73f41aadfb0e8/request.json b/test-snapshots/query/86d73f41aadfb0e8/request.json new file mode 100644 index 0000000..f9c0575 --- /dev/null +++ b/test-snapshots/query/86d73f41aadfb0e8/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Fax_8032": { + "type": "column", + "column": "Fax", + "fields": null + }, + "State_9717": { + "type": "column", + "column": "State", + "fields": null + }, + "Company_4973": { + "type": "column", + "column": "Company", + "fields": null + }, + "FirstName_7455": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "CustomerId_2690": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_3770": { + "type": "column", + "column": "Email", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/870d2b500dc25d33/expected.json b/test-snapshots/query/870d2b500dc25d33/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/870d2b500dc25d33/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/870d2b500dc25d33/request.json b/test-snapshots/query/870d2b500dc25d33/request.json new file mode 100644 index 0000000..36878a0 --- /dev/null +++ b/test-snapshots/query/870d2b500dc25d33/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1962-02-18" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8747133cfef6bfc1/expected.json b/test-snapshots/query/8747133cfef6bfc1/expected.json new file mode 100644 index 0000000..8baeb01 --- /dev/null +++ b/test-snapshots/query/8747133cfef6bfc1/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "Bytes_max_8169": 1059546140, + "Milliseconds_count_0600": 3503, + "Name_max_8188": "[Untitled]" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/8747133cfef6bfc1/request.json b/test-snapshots/query/8747133cfef6bfc1/request.json new file mode 100644 index 0000000..a89ec47 --- /dev/null +++ b/test-snapshots/query/8747133cfef6bfc1/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Track", + "query": { + "aggregates": { + "Bytes_max_8169": { + "type": "single_column", + "column": "Bytes", + "function": "max" + }, + "Milliseconds_count_0600": { + "type": "single_column", + "column": "Milliseconds", + "function": "count" + }, + "Name_max_8188": { + "type": "single_column", + "column": "Name", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/874dedfeff466b31/expected.json b/test-snapshots/query/874dedfeff466b31/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/874dedfeff466b31/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/874dedfeff466b31/request.json b/test-snapshots/query/874dedfeff466b31/request.json new file mode 100644 index 0000000..902a5fb --- /dev/null +++ b/test-snapshots/query/874dedfeff466b31/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/87823ff0d760be8f/expected.json b/test-snapshots/query/87823ff0d760be8f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/87823ff0d760be8f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/87823ff0d760be8f/request.json b/test-snapshots/query/87823ff0d760be8f/request.json new file mode 100644 index 0000000..897ad32 --- /dev/null +++ b/test-snapshots/query/87823ff0d760be8f/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3254 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/87a3f492d0049980/expected.json b/test-snapshots/query/87a3f492d0049980/expected.json new file mode 100644 index 0000000..86ae919 --- /dev/null +++ b/test-snapshots/query/87a3f492d0049980/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_2761": 1, + "Name_3587": "MPEG audio file" + }, + { + "MediaTypeId_2761": 2, + "Name_3587": "Protected AAC audio file" + }, + { + "MediaTypeId_2761": 3, + "Name_3587": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_2761": 4, + "Name_3587": "Purchased AAC audio file" + }, + { + "MediaTypeId_2761": 5, + "Name_3587": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/87a3f492d0049980/request.json b/test-snapshots/query/87a3f492d0049980/request.json new file mode 100644 index 0000000..e5f1511 --- /dev/null +++ b/test-snapshots/query/87a3f492d0049980/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_2761": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_3587": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/87abb2e161287bb2/expected.json b/test-snapshots/query/87abb2e161287bb2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/87abb2e161287bb2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/87abb2e161287bb2/request.json b/test-snapshots/query/87abb2e161287bb2/request.json new file mode 100644 index 0000000..fa70519 --- /dev/null +++ b/test-snapshots/query/87abb2e161287bb2/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/87d2892f0e5ff0ad/expected.json b/test-snapshots/query/87d2892f0e5ff0ad/expected.json new file mode 100644 index 0000000..cd35ed4 --- /dev/null +++ b/test-snapshots/query/87d2892f0e5ff0ad/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "BillingState_2417": null, + "InvoiceDate_5208": "2012-10-14", + "InvoiceId_4051": 314 + }, + { + "BillingState_2417": "Dublin", + "InvoiceDate_5208": "2009-09-24", + "InvoiceId_4051": 62 + }, + { + "BillingState_2417": null, + "InvoiceDate_5208": "2010-06-30", + "InvoiceId_4051": 125 + }, + { + "BillingState_2417": null, + "InvoiceDate_5208": "2011-09-07", + "InvoiceId_4051": 223 + }, + { + "BillingState_2417": null, + "InvoiceDate_5208": "2013-04-18", + "InvoiceId_4051": 356 + }, + { + "BillingState_2417": "RM", + "InvoiceDate_5208": "2010-12-02", + "InvoiceId_4051": 160 + }, + { + "BillingState_2417": null, + "InvoiceDate_5208": "2012-05-12", + "InvoiceId_4051": 279 + }, + { + "BillingState_2417": "SP", + "InvoiceDate_5208": "2012-01-09", + "InvoiceId_4051": 251 + }, + { + "BillingState_2417": "SP", + "InvoiceDate_5208": "2013-03-18", + "InvoiceId_4051": 349 + }, + { + "BillingState_2417": null, + "InvoiceDate_5208": "2009-11-25", + "InvoiceId_4051": 76 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/87d2892f0e5ff0ad/request.json b/test-snapshots/query/87d2892f0e5ff0ad/request.json new file mode 100644 index 0000000..ed16a27 --- /dev/null +++ b/test-snapshots/query/87d2892f0e5ff0ad/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingState_2417": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "InvoiceId_4051": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceDate_5208": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/87d7924dd6af544/expected.json b/test-snapshots/query/87d7924dd6af544/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/87d7924dd6af544/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/87d7924dd6af544/request.json b/test-snapshots/query/87d7924dd6af544/request.json new file mode 100644 index 0000000..6845241 --- /dev/null +++ b/test-snapshots/query/87d7924dd6af544/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/87f0fbc1ea9606cd/expected.json b/test-snapshots/query/87f0fbc1ea9606cd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/87f0fbc1ea9606cd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/87f0fbc1ea9606cd/request.json b/test-snapshots/query/87f0fbc1ea9606cd/request.json new file mode 100644 index 0000000..59b5c22 --- /dev/null +++ b/test-snapshots/query/87f0fbc1ea9606cd/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Snowballed" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/88283a3699ddaff6/expected.json b/test-snapshots/query/88283a3699ddaff6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/88283a3699ddaff6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/88283a3699ddaff6/request.json b/test-snapshots/query/88283a3699ddaff6/request.json new file mode 100644 index 0000000..21472cd --- /dev/null +++ b/test-snapshots/query/88283a3699ddaff6/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/882e40eb87ffce12/expected.json b/test-snapshots/query/882e40eb87ffce12/expected.json new file mode 100644 index 0000000..25286a9 --- /dev/null +++ b/test-snapshots/query/882e40eb87ffce12/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/882e40eb87ffce12/request.json b/test-snapshots/query/882e40eb87ffce12/request.json new file mode 100644 index 0000000..aa8a82a --- /dev/null +++ b/test-snapshots/query/882e40eb87ffce12/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8834de2294ab41c3/expected.json b/test-snapshots/query/8834de2294ab41c3/expected.json new file mode 100644 index 0000000..a0ec9a9 --- /dev/null +++ b/test-snapshots/query/8834de2294ab41c3/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "BillingCountry_7496": "India", + "CustomerId_6849": 58, + "InvoiceDate_8187": "2013-12-22" + }, + { + "BillingCountry_7496": "Finland", + "CustomerId_6849": 44, + "InvoiceDate_8187": "2013-12-14" + }, + { + "BillingCountry_7496": "Portugal", + "CustomerId_6849": 35, + "InvoiceDate_8187": "2013-12-09" + }, + { + "BillingCountry_7496": "Canada", + "CustomerId_6849": 29, + "InvoiceDate_8187": "2013-12-06" + }, + { + "BillingCountry_7496": "USA", + "CustomerId_6849": 25, + "InvoiceDate_8187": "2013-12-05" + }, + { + "BillingCountry_7496": "USA", + "CustomerId_6849": 23, + "InvoiceDate_8187": "2013-12-04" + }, + { + "BillingCountry_7496": "USA", + "CustomerId_6849": 21, + "InvoiceDate_8187": "2013-12-04" + }, + { + "BillingCountry_7496": "USA", + "CustomerId_6849": 20, + "InvoiceDate_8187": "2013-11-21" + }, + { + "BillingCountry_7496": "Czech Republic", + "CustomerId_6849": 6, + "InvoiceDate_8187": "2013-11-13" + }, + { + "BillingCountry_7496": "Argentina", + "CustomerId_6849": 56, + "InvoiceDate_8187": "2013-11-08" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8834de2294ab41c3/request.json b/test-snapshots/query/8834de2294ab41c3/request.json new file mode 100644 index 0000000..83c7baf --- /dev/null +++ b/test-snapshots/query/8834de2294ab41c3/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "CustomerId_6849": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_8187": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "BillingCountry_7496": { + "type": "column", + "column": "BillingCountry", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8837419408eb75ee/expected.json b/test-snapshots/query/8837419408eb75ee/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/8837419408eb75ee/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8837419408eb75ee/request.json b/test-snapshots/query/8837419408eb75ee/request.json new file mode 100644 index 0000000..75367e5 --- /dev/null +++ b/test-snapshots/query/8837419408eb75ee/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8837f85679a0f9c/expected.json b/test-snapshots/query/8837f85679a0f9c/expected.json new file mode 100644 index 0000000..324c8c2 --- /dev/null +++ b/test-snapshots/query/8837f85679a0f9c/expected.json @@ -0,0 +1,30 @@ +[ + { + "rows": [ + { + "ReportsTo_3130": null + }, + { + "ReportsTo_3130": 1 + }, + { + "ReportsTo_3130": 1 + }, + { + "ReportsTo_3130": 2 + }, + { + "ReportsTo_3130": 2 + }, + { + "ReportsTo_3130": 2 + }, + { + "ReportsTo_3130": 6 + }, + { + "ReportsTo_3130": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8837f85679a0f9c/request.json b/test-snapshots/query/8837f85679a0f9c/request.json new file mode 100644 index 0000000..55d8434 --- /dev/null +++ b/test-snapshots/query/8837f85679a0f9c/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "ReportsTo_3130": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/884478a34ebfe747/expected.json b/test-snapshots/query/884478a34ebfe747/expected.json new file mode 100644 index 0000000..948a776 --- /dev/null +++ b/test-snapshots/query/884478a34ebfe747/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/884478a34ebfe747/request.json b/test-snapshots/query/884478a34ebfe747/request.json new file mode 100644 index 0000000..3cd50e1 --- /dev/null +++ b/test-snapshots/query/884478a34ebfe747/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/88625af277b2daaf/expected.json b/test-snapshots/query/88625af277b2daaf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/88625af277b2daaf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/88625af277b2daaf/request.json b/test-snapshots/query/88625af277b2daaf/request.json new file mode 100644 index 0000000..28ccd2b --- /dev/null +++ b/test-snapshots/query/88625af277b2daaf/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8898a03d81bd71c6/expected.json b/test-snapshots/query/8898a03d81bd71c6/expected.json new file mode 100644 index 0000000..0c458d9 --- /dev/null +++ b/test-snapshots/query/8898a03d81bd71c6/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8898a03d81bd71c6/request.json b/test-snapshots/query/8898a03d81bd71c6/request.json new file mode 100644 index 0000000..a0e192b --- /dev/null +++ b/test-snapshots/query/8898a03d81bd71c6/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/88d625953201b146/expected.json b/test-snapshots/query/88d625953201b146/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/88d625953201b146/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/88d625953201b146/request.json b/test-snapshots/query/88d625953201b146/request.json new file mode 100644 index 0000000..92be0ce --- /dev/null +++ b/test-snapshots/query/88d625953201b146/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/88d8330a4a105db9/expected.json b/test-snapshots/query/88d8330a4a105db9/expected.json new file mode 100644 index 0000000..941c1e4 --- /dev/null +++ b/test-snapshots/query/88d8330a4a105db9/expected.json @@ -0,0 +1,102 @@ +[ + { + "rows": [ + { + "Address_1307": "1111 6 Ave SW", + "City_4883": "Calgary", + "Country_6275": "Canada", + "EmployeeId_1693": 3, + "Fax_2994": "+1 (403) 262-6712", + "HireDate_9736": "2002-04-01", + "LastName_5836": "Peacock", + "Phone_1389": "+1 (403) 262-3443", + "ReportsTo_6561": 2, + "State_5508": "AB" + }, + { + "Address_1307": "825 8 Ave SW", + "City_4883": "Calgary", + "Country_6275": "Canada", + "EmployeeId_1693": 2, + "Fax_2994": "+1 (403) 262-3322", + "HireDate_9736": "2002-05-01", + "LastName_5836": "Edwards", + "Phone_1389": "+1 (403) 262-3443", + "ReportsTo_6561": 1, + "State_5508": "AB" + }, + { + "Address_1307": "11120 Jasper Ave NW", + "City_4883": "Edmonton", + "Country_6275": "Canada", + "EmployeeId_1693": 1, + "Fax_2994": "+1 (780) 428-3457", + "HireDate_9736": "2002-08-14", + "LastName_5836": "Adams", + "Phone_1389": "+1 (780) 428-9482", + "ReportsTo_6561": null, + "State_5508": "AB" + }, + { + "Address_1307": "683 10 Street SW", + "City_4883": "Calgary", + "Country_6275": "Canada", + "EmployeeId_1693": 4, + "Fax_2994": "+1 (403) 263-4289", + "HireDate_9736": "2003-05-03", + "LastName_5836": "Park", + "Phone_1389": "+1 (403) 263-4423", + "ReportsTo_6561": 2, + "State_5508": "AB" + }, + { + "Address_1307": "5827 Bowness Road NW", + "City_4883": "Calgary", + "Country_6275": "Canada", + "EmployeeId_1693": 6, + "Fax_2994": "+1 (403) 246-9899", + "HireDate_9736": "2003-10-17", + "LastName_5836": "Mitchell", + "Phone_1389": "+1 (403) 246-9887", + "ReportsTo_6561": 1, + "State_5508": "AB" + }, + { + "Address_1307": "7727B 41 Ave", + "City_4883": "Calgary", + "Country_6275": "Canada", + "EmployeeId_1693": 5, + "Fax_2994": "1 (780) 836-9543", + "HireDate_9736": "2003-10-17", + "LastName_5836": "Johnson", + "Phone_1389": "1 (780) 836-9987", + "ReportsTo_6561": 2, + "State_5508": "AB" + }, + { + "Address_1307": "590 Columbia Boulevard West", + "City_4883": "Lethbridge", + "Country_6275": "Canada", + "EmployeeId_1693": 7, + "Fax_2994": "+1 (403) 456-8485", + "HireDate_9736": "2004-01-02", + "LastName_5836": "King", + "Phone_1389": "+1 (403) 456-9986", + "ReportsTo_6561": 6, + "State_5508": "AB" + }, + { + "Address_1307": "923 7 ST NW", + "City_4883": "Lethbridge", + "Country_6275": "Canada", + "EmployeeId_1693": 8, + "Fax_2994": "+1 (403) 467-8772", + "HireDate_9736": "2004-03-04", + "LastName_5836": "Callahan", + "Phone_1389": "+1 (403) 467-3351", + "ReportsTo_6561": 6, + "State_5508": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/88d8330a4a105db9/request.json b/test-snapshots/query/88d8330a4a105db9/request.json new file mode 100644 index 0000000..1323790 --- /dev/null +++ b/test-snapshots/query/88d8330a4a105db9/request.json @@ -0,0 +1,72 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_1307": { + "type": "column", + "column": "Address", + "fields": null + }, + "ReportsTo_6561": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "City_4883": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_6275": { + "type": "column", + "column": "Country", + "fields": null + }, + "Phone_1389": { + "type": "column", + "column": "Phone", + "fields": null + }, + "EmployeeId_1693": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_2994": { + "type": "column", + "column": "Fax", + "fields": null + }, + "State_5508": { + "type": "column", + "column": "State", + "fields": null + }, + "HireDate_9736": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_5836": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/89358fba504d5583/expected.json b/test-snapshots/query/89358fba504d5583/expected.json new file mode 100644 index 0000000..59d8d98 --- /dev/null +++ b/test-snapshots/query/89358fba504d5583/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "SupportRepId_8443": 4 + }, + { + "SupportRepId_8443": 5 + }, + { + "SupportRepId_8443": 3 + }, + { + "SupportRepId_8443": 3 + }, + { + "SupportRepId_8443": 5 + }, + { + "SupportRepId_8443": 4 + }, + { + "SupportRepId_8443": 4 + }, + { + "SupportRepId_8443": 3 + }, + { + "SupportRepId_8443": 5 + }, + { + "SupportRepId_8443": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89358fba504d5583/request.json b/test-snapshots/query/89358fba504d5583/request.json new file mode 100644 index 0000000..c301114 --- /dev/null +++ b/test-snapshots/query/89358fba504d5583/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_8443": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/895ae03b9f74c9bc/expected.json b/test-snapshots/query/895ae03b9f74c9bc/expected.json new file mode 100644 index 0000000..a21539a --- /dev/null +++ b/test-snapshots/query/895ae03b9f74c9bc/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/895ae03b9f74c9bc/request.json b/test-snapshots/query/895ae03b9f74c9bc/request.json new file mode 100644 index 0000000..6e35fd4 --- /dev/null +++ b/test-snapshots/query/895ae03b9f74c9bc/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/89649c05e5920fc5/expected.json b/test-snapshots/query/89649c05e5920fc5/expected.json new file mode 100644 index 0000000..05cc333 --- /dev/null +++ b/test-snapshots/query/89649c05e5920fc5/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_9034": "Opera" + }, + { + "Name_9034": "Classical" + }, + { + "Name_9034": "Alternative" + }, + { + "Name_9034": "Comedy" + }, + { + "Name_9034": "Drama" + }, + { + "Name_9034": "Sci Fi & Fantasy" + }, + { + "Name_9034": "TV Shows" + }, + { + "Name_9034": "Science Fiction" + }, + { + "Name_9034": "Hip Hop/Rap" + }, + { + "Name_9034": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89649c05e5920fc5/request.json b/test-snapshots/query/89649c05e5920fc5/request.json new file mode 100644 index 0000000..4a7bdd8 --- /dev/null +++ b/test-snapshots/query/89649c05e5920fc5/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_9034": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8978cba8dbe4eda7/expected.json b/test-snapshots/query/8978cba8dbe4eda7/expected.json new file mode 100644 index 0000000..6668926 --- /dev/null +++ b/test-snapshots/query/8978cba8dbe4eda7/expected.json @@ -0,0 +1,18 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 17, + "TrackId": 1 + }, + { + "PlaylistId": 8, + "TrackId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8978cba8dbe4eda7/request.json b/test-snapshots/query/8978cba8dbe4eda7/request.json new file mode 100644 index 0000000..0ad6b19 --- /dev/null +++ b/test-snapshots/query/8978cba8dbe4eda7/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/89b44cfaa41ff300/expected.json b/test-snapshots/query/89b44cfaa41ff300/expected.json new file mode 100644 index 0000000..42086c5 --- /dev/null +++ b/test-snapshots/query/89b44cfaa41ff300/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 11, + "Name": "Bossa Nova" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89b44cfaa41ff300/request.json b/test-snapshots/query/89b44cfaa41ff300/request.json new file mode 100644 index 0000000..ade1f42 --- /dev/null +++ b/test-snapshots/query/89b44cfaa41ff300/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Bossa Nova" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/89b4670509e2a245/expected.json b/test-snapshots/query/89b4670509e2a245/expected.json new file mode 100644 index 0000000..c824e98 --- /dev/null +++ b/test-snapshots/query/89b4670509e2a245/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_1484": 43 + }, + { + "ArtistId_1484": 230 + }, + { + "ArtistId_1484": 202 + }, + { + "ArtistId_1484": 1 + }, + { + "ArtistId_1484": 214 + }, + { + "ArtistId_1484": 215 + }, + { + "ArtistId_1484": 222 + }, + { + "ArtistId_1484": 257 + }, + { + "ArtistId_1484": 239 + }, + { + "ArtistId_1484": 2 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89b4670509e2a245/request.json b/test-snapshots/query/89b4670509e2a245/request.json new file mode 100644 index 0000000..5c1e018 --- /dev/null +++ b/test-snapshots/query/89b4670509e2a245/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_1484": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/89bf1f932e2976a/expected.json b/test-snapshots/query/89bf1f932e2976a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/89bf1f932e2976a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89bf1f932e2976a/request.json b/test-snapshots/query/89bf1f932e2976a/request.json new file mode 100644 index 0000000..9450104 --- /dev/null +++ b/test-snapshots/query/89bf1f932e2976a/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/89bff689010314c9/expected.json b/test-snapshots/query/89bff689010314c9/expected.json new file mode 100644 index 0000000..a0378f3 --- /dev/null +++ b/test-snapshots/query/89bff689010314c9/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89bff689010314c9/request.json b/test-snapshots/query/89bff689010314c9/request.json new file mode 100644 index 0000000..7ecf72a --- /dev/null +++ b/test-snapshots/query/89bff689010314c9/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 22 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heather" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/89ef69a287d780e4/expected.json b/test-snapshots/query/89ef69a287d780e4/expected.json new file mode 100644 index 0000000..f083295 --- /dev/null +++ b/test-snapshots/query/89ef69a287d780e4/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Address_2754": "1 Infinite Loop", + "City_3896": "Cupertino", + "Company_0364": "Apple Inc.", + "Email_9437": "tgoyer@apple.com", + "PostalCode_1842": "95014", + "State_4133": "CA" + }, + { + "Address_2754": "1 Microsoft Way", + "City_3896": "Redmond", + "Company_0364": "Microsoft Corporation", + "Email_9437": "jacksmith@microsoft.com", + "PostalCode_1842": "98052-8300", + "State_4133": "WA" + }, + { + "Address_2754": "1033 N Park Ave", + "City_3896": "Tucson", + "Company_0364": null, + "Email_9437": "patrick.gray@aol.com", + "PostalCode_1842": "85719", + "State_4133": "AZ" + }, + { + "Address_2754": "11, Place Bellecour", + "City_3896": "Lyon", + "Company_0364": null, + "Email_9437": "marc.dubois@hotmail.com", + "PostalCode_1842": "69002", + "State_4133": null + }, + { + "Address_2754": "110 Raeburn Pl", + "City_3896": "Edinburgh ", + "Company_0364": null, + "Email_9437": "steve.murray@yahoo.uk", + "PostalCode_1842": "EH4 1HH", + "State_4133": null + }, + { + "Address_2754": "113 Lupus St", + "City_3896": "London", + "Company_0364": null, + "Email_9437": "phil.hughes@gmail.com", + "PostalCode_1842": "SW1V 3EN", + "State_4133": null + }, + { + "Address_2754": "12,Community Centre", + "City_3896": "Delhi", + "Company_0364": null, + "Email_9437": "manoj.pareek@rediff.com", + "PostalCode_1842": "110017", + "State_4133": null + }, + { + "Address_2754": "120 S Orange Ave", + "City_3896": "Orlando", + "Company_0364": null, + "Email_9437": "hleacock@gmail.com", + "PostalCode_1842": "32801", + "State_4133": "FL" + }, + { + "Address_2754": "1498 rue Bélanger", + "City_3896": "Montréal", + "Company_0364": null, + "Email_9437": "ftremblay@gmail.com", + "PostalCode_1842": "H2G 1A7", + "State_4133": "QC" + }, + { + "Address_2754": "1600 Amphitheatre Parkway", + "City_3896": "Mountain View", + "Company_0364": "Google Inc.", + "Email_9437": "fharris@google.com", + "PostalCode_1842": "94043-1351", + "State_4133": "CA" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/89ef69a287d780e4/request.json b/test-snapshots/query/89ef69a287d780e4/request.json new file mode 100644 index 0000000..5979fec --- /dev/null +++ b/test-snapshots/query/89ef69a287d780e4/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_2754": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_3896": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_0364": { + "type": "column", + "column": "Company", + "fields": null + }, + "State_4133": { + "type": "column", + "column": "State", + "fields": null + }, + "PostalCode_1842": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Email_9437": { + "type": "column", + "column": "Email", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8a0e971db9a156f8/expected.json b/test-snapshots/query/8a0e971db9a156f8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8a0e971db9a156f8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a0e971db9a156f8/request.json b/test-snapshots/query/8a0e971db9a156f8/request.json new file mode 100644 index 0000000..161fac9 --- /dev/null +++ b/test-snapshots/query/8a0e971db9a156f8/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8a339a41450740d8/expected.json b/test-snapshots/query/8a339a41450740d8/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/8a339a41450740d8/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a339a41450740d8/request.json b/test-snapshots/query/8a339a41450740d8/request.json new file mode 100644 index 0000000..30e11d6 --- /dev/null +++ b/test-snapshots/query/8a339a41450740d8/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8a40bb5e7a433b04/expected.json b/test-snapshots/query/8a40bb5e7a433b04/expected.json new file mode 100644 index 0000000..1b426d8 --- /dev/null +++ b/test-snapshots/query/8a40bb5e7a433b04/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 105, + "Name": "Men At Work" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a40bb5e7a433b04/request.json b/test-snapshots/query/8a40bb5e7a433b04/request.json new file mode 100644 index 0000000..6d5333f --- /dev/null +++ b/test-snapshots/query/8a40bb5e7a433b04/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8a451ef35f38dd05/expected.json b/test-snapshots/query/8a451ef35f38dd05/expected.json new file mode 100644 index 0000000..95363d4 --- /dev/null +++ b/test-snapshots/query/8a451ef35f38dd05/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "12227-000", + "CustomerId_4992": 1 + }, + { + "BillingPostalCode_6544": "70174", + "CustomerId_4992": 2 + }, + { + "BillingPostalCode_6544": "70174", + "CustomerId_4992": 2 + }, + { + "BillingPostalCode_6544": "70174", + "CustomerId_4992": 2 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a451ef35f38dd05/request.json b/test-snapshots/query/8a451ef35f38dd05/request.json new file mode 100644 index 0000000..6641f2d --- /dev/null +++ b/test-snapshots/query/8a451ef35f38dd05/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingPostalCode_6544": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "CustomerId_4992": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8a4a337841ff3283/expected.json b/test-snapshots/query/8a4a337841ff3283/expected.json new file mode 100644 index 0000000..0f9cd54 --- /dev/null +++ b/test-snapshots/query/8a4a337841ff3283/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a4a337841ff3283/request.json b/test-snapshots/query/8a4a337841ff3283/request.json new file mode 100644 index 0000000..b1c618f --- /dev/null +++ b/test-snapshots/query/8a4a337841ff3283/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (514) 721-4711" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8a597580e41e50ff/expected.json b/test-snapshots/query/8a597580e41e50ff/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8a597580e41e50ff/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a597580e41e50ff/request.json b/test-snapshots/query/8a597580e41e50ff/request.json new file mode 100644 index 0000000..13d026e --- /dev/null +++ b/test-snapshots/query/8a597580e41e50ff/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 59 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8a808416f1108525/expected.json b/test-snapshots/query/8a808416f1108525/expected.json new file mode 100644 index 0000000..e6bbaed --- /dev/null +++ b/test-snapshots/query/8a808416f1108525/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "Address_3982": "Via Degli Scipioni, 43", + "City_7991": "Rome", + "Company_2871": null, + "Country_6967": "Italy", + "CustomerId_3925": 47, + "FirstName_5759": "Lucas", + "PostalCode_9537": "00192", + "State_1256": "RM", + "SupportRepId_2617": 5 + }, + { + "Address_3982": "Ullevålsveien 14", + "City_7991": "Oslo", + "Company_2871": null, + "Country_6967": "Norway", + "CustomerId_3925": 4, + "FirstName_5759": "Bjørn", + "PostalCode_9537": "0171", + "State_1256": null, + "SupportRepId_2617": 4 + }, + { + "Address_3982": "Theodor-Heuss-Straße 34", + "City_7991": "Stuttgart", + "Company_2871": null, + "Country_6967": "Germany", + "CustomerId_3925": 2, + "FirstName_5759": "Leonie", + "PostalCode_9537": "70174", + "State_1256": null, + "SupportRepId_2617": 5 + }, + { + "Address_3982": "Tauentzienstraße 8", + "City_7991": "Berlin", + "Company_2871": null, + "Country_6967": "Germany", + "CustomerId_3925": 36, + "FirstName_5759": "Hannah", + "PostalCode_9537": "10789", + "State_1256": null, + "SupportRepId_2617": 5 + }, + { + "Address_3982": "Sønder Boulevard 51", + "City_7991": "Copenhagen", + "Company_2871": null, + "Country_6967": "Denmark", + "CustomerId_3925": 9, + "FirstName_5759": "Kara", + "PostalCode_9537": "1720", + "State_1256": null, + "SupportRepId_2617": 4 + }, + { + "Address_3982": "Rua Dr. Falcão Filho, 155", + "City_7991": "São Paulo", + "Company_2871": "Woodstock Discos", + "Country_6967": "Brazil", + "CustomerId_3925": 10, + "FirstName_5759": "Eduardo", + "PostalCode_9537": "01007-010", + "State_1256": "SP", + "SupportRepId_2617": 4 + }, + { + "Address_3982": "Rua dos Campeões Europeus de Viena, 4350", + "City_7991": "Porto", + "Company_2871": null, + "Country_6967": "Portugal", + "CustomerId_3925": 35, + "FirstName_5759": "Madalena", + "PostalCode_9537": null, + "State_1256": null, + "SupportRepId_2617": 4 + }, + { + "Address_3982": "Rua da Assunção 53", + "City_7991": "Lisbon", + "Company_2871": null, + "Country_6967": "Portugal", + "CustomerId_3925": 34, + "FirstName_5759": "João", + "PostalCode_9537": null, + "State_1256": null, + "SupportRepId_2617": 4 + }, + { + "Address_3982": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_7991": "Vienne", + "Company_2871": null, + "Country_6967": "Austria", + "CustomerId_3925": 7, + "FirstName_5759": "Astrid", + "PostalCode_9537": "1010", + "State_1256": null, + "SupportRepId_2617": 5 + }, + { + "Address_3982": "Rilská 3174/6", + "City_7991": "Prague", + "Company_2871": null, + "Country_6967": "Czech Republic", + "CustomerId_3925": 6, + "FirstName_5759": "Helena", + "PostalCode_9537": "14300", + "State_1256": null, + "SupportRepId_2617": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a808416f1108525/request.json b/test-snapshots/query/8a808416f1108525/request.json new file mode 100644 index 0000000..636ec85 --- /dev/null +++ b/test-snapshots/query/8a808416f1108525/request.json @@ -0,0 +1,75 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_3982": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_7991": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_2871": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_6967": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_3925": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "PostalCode_9537": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "SupportRepId_2617": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FirstName_5759": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "State_1256": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8a9b474f6fd58843/expected.json b/test-snapshots/query/8a9b474f6fd58843/expected.json new file mode 100644 index 0000000..369db61 --- /dev/null +++ b/test-snapshots/query/8a9b474f6fd58843/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8a9b474f6fd58843/request.json b/test-snapshots/query/8a9b474f6fd58843/request.json new file mode 100644 index 0000000..fdca8d7 --- /dev/null +++ b/test-snapshots/query/8a9b474f6fd58843/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8acfd16397eee7db/expected.json b/test-snapshots/query/8acfd16397eee7db/expected.json new file mode 100644 index 0000000..3c48e4b --- /dev/null +++ b/test-snapshots/query/8acfd16397eee7db/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8acfd16397eee7db/request.json b/test-snapshots/query/8acfd16397eee7db/request.json new file mode 100644 index 0000000..2a8aa2d --- /dev/null +++ b/test-snapshots/query/8acfd16397eee7db/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 256 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8ae95e1030a15cf3/expected.json b/test-snapshots/query/8ae95e1030a15cf3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8ae95e1030a15cf3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ae95e1030a15cf3/request.json b/test-snapshots/query/8ae95e1030a15cf3/request.json new file mode 100644 index 0000000..e354fc4 --- /dev/null +++ b/test-snapshots/query/8ae95e1030a15cf3/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.98 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-10-22" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8b3044beda924bb8/expected.json b/test-snapshots/query/8b3044beda924bb8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8b3044beda924bb8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b3044beda924bb8/request.json b/test-snapshots/query/8b3044beda924bb8/request.json new file mode 100644 index 0000000..3453f60 --- /dev/null +++ b/test-snapshots/query/8b3044beda924bb8/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8b5e274f74747f39/expected.json b/test-snapshots/query/8b5e274f74747f39/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8b5e274f74747f39/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b5e274f74747f39/request.json b/test-snapshots/query/8b5e274f74747f39/request.json new file mode 100644 index 0000000..cc05b6c --- /dev/null +++ b/test-snapshots/query/8b5e274f74747f39/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205662 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8b682a4bf26dad28/expected.json b/test-snapshots/query/8b682a4bf26dad28/expected.json new file mode 100644 index 0000000..67068f1 --- /dev/null +++ b/test-snapshots/query/8b682a4bf26dad28/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_0511": 16, + "Name_5765": "World" + }, + { + "GenreId_0511": 19, + "Name_5765": "TV Shows" + }, + { + "GenreId_0511": 10, + "Name_5765": "Soundtrack" + }, + { + "GenreId_0511": 18, + "Name_5765": "Science Fiction" + }, + { + "GenreId_0511": 20, + "Name_5765": "Sci Fi & Fantasy" + }, + { + "GenreId_0511": 5, + "Name_5765": "Rock And Roll" + }, + { + "GenreId_0511": 1, + "Name_5765": "Rock" + }, + { + "GenreId_0511": 8, + "Name_5765": "Reggae" + }, + { + "GenreId_0511": 14, + "Name_5765": "R&B/Soul" + }, + { + "GenreId_0511": 9, + "Name_5765": "Pop" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b682a4bf26dad28/request.json b/test-snapshots/query/8b682a4bf26dad28/request.json new file mode 100644 index 0000000..90601f5 --- /dev/null +++ b/test-snapshots/query/8b682a4bf26dad28/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_0511": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_5765": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8b6b006d38435294/expected.json b/test-snapshots/query/8b6b006d38435294/expected.json new file mode 100644 index 0000000..cbbace4 --- /dev/null +++ b/test-snapshots/query/8b6b006d38435294/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 232, + "Bytes": 8531766, + "Composer": "U2", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Love Is Blindness", + "TrackId": 2937, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b6b006d38435294/request.json b/test-snapshots/query/8b6b006d38435294/request.json new file mode 100644 index 0000000..793e8dc --- /dev/null +++ b/test-snapshots/query/8b6b006d38435294/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8b6d6cfb9a13c0b6/expected.json b/test-snapshots/query/8b6d6cfb9a13c0b6/expected.json new file mode 100644 index 0000000..434876c --- /dev/null +++ b/test-snapshots/query/8b6d6cfb9a13c0b6/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_3579": "590 Columbia Boulevard West", + "BirthDate_2479": "1970-05-29", + "City_6309": "Lethbridge", + "Email_9243": "robert@chinookcorp.com", + "EmployeeId_2854": 7, + "FirstName_2247": "Robert", + "HireDate_5650": "2004-01-02", + "LastName_9686": "King", + "Phone_6116": "+1 (403) 456-9986", + "PostalCode_1801": "T1K 5N8", + "ReportsTo_6022": 6, + "State_6699": "AB", + "Title_6677": "IT Staff" + }, + { + "Address_3579": "923 7 ST NW", + "BirthDate_2479": "1968-01-09", + "City_6309": "Lethbridge", + "Email_9243": "laura@chinookcorp.com", + "EmployeeId_2854": 8, + "FirstName_2247": "Laura", + "HireDate_5650": "2004-03-04", + "LastName_9686": "Callahan", + "Phone_6116": "+1 (403) 467-3351", + "PostalCode_1801": "T1H 1Y8", + "ReportsTo_6022": 6, + "State_6699": "AB", + "Title_6677": "IT Staff" + }, + { + "Address_3579": "1111 6 Ave SW", + "BirthDate_2479": "1973-08-29", + "City_6309": "Calgary", + "Email_9243": "jane@chinookcorp.com", + "EmployeeId_2854": 3, + "FirstName_2247": "Jane", + "HireDate_5650": "2002-04-01", + "LastName_9686": "Peacock", + "Phone_6116": "+1 (403) 262-3443", + "PostalCode_1801": "T2P 5M5", + "ReportsTo_6022": 2, + "State_6699": "AB", + "Title_6677": "Sales Support Agent" + }, + { + "Address_3579": "683 10 Street SW", + "BirthDate_2479": "1947-09-19", + "City_6309": "Calgary", + "Email_9243": "margaret@chinookcorp.com", + "EmployeeId_2854": 4, + "FirstName_2247": "Margaret", + "HireDate_5650": "2003-05-03", + "LastName_9686": "Park", + "Phone_6116": "+1 (403) 263-4423", + "PostalCode_1801": "T2P 5G3", + "ReportsTo_6022": 2, + "State_6699": "AB", + "Title_6677": "Sales Support Agent" + }, + { + "Address_3579": "7727B 41 Ave", + "BirthDate_2479": "1965-03-03", + "City_6309": "Calgary", + "Email_9243": "steve@chinookcorp.com", + "EmployeeId_2854": 5, + "FirstName_2247": "Steve", + "HireDate_5650": "2003-10-17", + "LastName_9686": "Johnson", + "Phone_6116": "1 (780) 836-9987", + "PostalCode_1801": "T3B 1Y7", + "ReportsTo_6022": 2, + "State_6699": "AB", + "Title_6677": "Sales Support Agent" + }, + { + "Address_3579": "5827 Bowness Road NW", + "BirthDate_2479": "1973-07-01", + "City_6309": "Calgary", + "Email_9243": "michael@chinookcorp.com", + "EmployeeId_2854": 6, + "FirstName_2247": "Michael", + "HireDate_5650": "2003-10-17", + "LastName_9686": "Mitchell", + "Phone_6116": "+1 (403) 246-9887", + "PostalCode_1801": "T3B 0C5", + "ReportsTo_6022": 1, + "State_6699": "AB", + "Title_6677": "IT Manager" + }, + { + "Address_3579": "825 8 Ave SW", + "BirthDate_2479": "1958-12-08", + "City_6309": "Calgary", + "Email_9243": "nancy@chinookcorp.com", + "EmployeeId_2854": 2, + "FirstName_2247": "Nancy", + "HireDate_5650": "2002-05-01", + "LastName_9686": "Edwards", + "Phone_6116": "+1 (403) 262-3443", + "PostalCode_1801": "T2P 2T3", + "ReportsTo_6022": 1, + "State_6699": "AB", + "Title_6677": "Sales Manager" + }, + { + "Address_3579": "11120 Jasper Ave NW", + "BirthDate_2479": "1962-02-18", + "City_6309": "Edmonton", + "Email_9243": "andrew@chinookcorp.com", + "EmployeeId_2854": 1, + "FirstName_2247": "Andrew", + "HireDate_5650": "2002-08-14", + "LastName_9686": "Adams", + "Phone_6116": "+1 (780) 428-9482", + "PostalCode_1801": "T5K 2N1", + "ReportsTo_6022": null, + "State_6699": "AB", + "Title_6677": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b6d6cfb9a13c0b6/request.json b/test-snapshots/query/8b6d6cfb9a13c0b6/request.json new file mode 100644 index 0000000..4217c33 --- /dev/null +++ b/test-snapshots/query/8b6d6cfb9a13c0b6/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_3579": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_2479": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_6309": { + "type": "column", + "column": "City", + "fields": null + }, + "Title_6677": { + "type": "column", + "column": "Title", + "fields": null + }, + "Email_9243": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_2854": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "State_6699": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_2247": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_5650": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_9686": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_6116": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_1801": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_6022": { + "type": "column", + "column": "ReportsTo", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8b8264c57e7f0cde/expected.json b/test-snapshots/query/8b8264c57e7f0cde/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/8b8264c57e7f0cde/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b8264c57e7f0cde/request.json b/test-snapshots/query/8b8264c57e7f0cde/request.json new file mode 100644 index 0000000..78d4538 --- /dev/null +++ b/test-snapshots/query/8b8264c57e7f0cde/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8b8569c473e50c18/expected.json b/test-snapshots/query/8b8569c473e50c18/expected.json new file mode 100644 index 0000000..55eead6 --- /dev/null +++ b/test-snapshots/query/8b8569c473e50c18/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 59 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b8569c473e50c18/request.json b/test-snapshots/query/8b8569c473e50c18/request.json new file mode 100644 index 0000000..d93a7de --- /dev/null +++ b/test-snapshots/query/8b8569c473e50c18/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8b96d8dbdf766d3e/expected.json b/test-snapshots/query/8b96d8dbdf766d3e/expected.json new file mode 100644 index 0000000..22a1202 --- /dev/null +++ b/test-snapshots/query/8b96d8dbdf766d3e/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8b96d8dbdf766d3e/request.json b/test-snapshots/query/8b96d8dbdf766d3e/request.json new file mode 100644 index 0000000..27ed314 --- /dev/null +++ b/test-snapshots/query/8b96d8dbdf766d3e/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8bb3662bb1d9c076/expected.json b/test-snapshots/query/8bb3662bb1d9c076/expected.json new file mode 100644 index 0000000..6385bcc --- /dev/null +++ b/test-snapshots/query/8bb3662bb1d9c076/expected.json @@ -0,0 +1,102 @@ +[ + { + "rows": [ + { + "BirthDate_6645": "1947-09-19", + "EmployeeId_2024": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2003-05-03", + "Phone_8505": "+1 (403) 263-4423", + "PostalCode_2943": "T2P 5G3", + "ReportsTo_7815": 2, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1958-12-08", + "EmployeeId_2024": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2002-05-01", + "Phone_8505": "+1 (403) 262-3443", + "PostalCode_2943": "T2P 2T3", + "ReportsTo_7815": 1, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1962-02-18", + "EmployeeId_2024": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2002-08-14", + "Phone_8505": "+1 (780) 428-9482", + "PostalCode_2943": "T5K 2N1", + "ReportsTo_7815": null, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1965-03-03", + "EmployeeId_2024": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2003-10-17", + "Phone_8505": "1 (780) 836-9987", + "PostalCode_2943": "T3B 1Y7", + "ReportsTo_7815": 2, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1968-01-09", + "EmployeeId_2024": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2004-03-04", + "Phone_8505": "+1 (403) 467-3351", + "PostalCode_2943": "T1H 1Y8", + "ReportsTo_7815": 6, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1970-05-29", + "EmployeeId_2024": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2004-01-02", + "Phone_8505": "+1 (403) 456-9986", + "PostalCode_2943": "T1K 5N8", + "ReportsTo_7815": 6, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1973-07-01", + "EmployeeId_2024": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2003-10-17", + "Phone_8505": "+1 (403) 246-9887", + "PostalCode_2943": "T3B 0C5", + "ReportsTo_7815": 1, + "State_7604": "AB" + }, + { + "BirthDate_6645": "1973-08-29", + "EmployeeId_2024": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "HireDate_6799": "2002-04-01", + "Phone_8505": "+1 (403) 262-3443", + "PostalCode_2943": "T2P 5M5", + "ReportsTo_7815": 2, + "State_7604": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8bb3662bb1d9c076/request.json b/test-snapshots/query/8bb3662bb1d9c076/request.json new file mode 100644 index 0000000..71b14c1 --- /dev/null +++ b/test-snapshots/query/8bb3662bb1d9c076/request.json @@ -0,0 +1,139 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Phone_8505": { + "type": "column", + "column": "Phone", + "fields": null + }, + "BirthDate_6645": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "State_7604": { + "type": "column", + "column": "State", + "fields": null + }, + "ReportsTo_7815": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "PostalCode_2943": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "EmployeeId_2024": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "HireDate_6799": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8bb816b11ab6c5d/expected.json b/test-snapshots/query/8bb816b11ab6c5d/expected.json new file mode 100644 index 0000000..dc97c96 --- /dev/null +++ b/test-snapshots/query/8bb816b11ab6c5d/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceLineId_9076": 579, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 1, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 1154, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 1728, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 2, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 580, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 3, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 1155, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 4, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + }, + { + "InvoiceLineId_9076": 1729, + "Quantity_2189": 1, + "UnitPrice_7364": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8bb816b11ab6c5d/request.json b/test-snapshots/query/8bb816b11ab6c5d/request.json new file mode 100644 index 0000000..f2d9c41 --- /dev/null +++ b/test-snapshots/query/8bb816b11ab6c5d/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "UnitPrice_7364": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "InvoiceLineId_9076": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_2189": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8bbbae4e9e648951/expected.json b/test-snapshots/query/8bbbae4e9e648951/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8bbbae4e9e648951/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8bbbae4e9e648951/request.json b/test-snapshots/query/8bbbae4e9e648951/request.json new file mode 100644 index 0000000..106fde9 --- /dev/null +++ b/test-snapshots/query/8bbbae4e9e648951/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8bcdc50114cc9723/expected.json b/test-snapshots/query/8bcdc50114cc9723/expected.json new file mode 100644 index 0000000..e96f049 --- /dev/null +++ b/test-snapshots/query/8bcdc50114cc9723/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 125, + "InvoiceLineId": 682, + "Quantity": 1, + "TrackId": 671, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 126, + "InvoiceLineId": 683, + "Quantity": 1, + "TrackId": 672, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 126, + "InvoiceLineId": 684, + "Quantity": 1, + "TrackId": 673, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 149, + "InvoiceLineId": 801, + "Quantity": 1, + "TrackId": 1375, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8bcdc50114cc9723/request.json b/test-snapshots/query/8bcdc50114cc9723/request.json new file mode 100644 index 0000000..40cf767 --- /dev/null +++ b/test-snapshots/query/8bcdc50114cc9723/request.json @@ -0,0 +1,61 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8c136a2b20f0ff7/expected.json b/test-snapshots/query/8c136a2b20f0ff7/expected.json new file mode 100644 index 0000000..e2d8143 --- /dev/null +++ b/test-snapshots/query/8c136a2b20f0ff7/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 15, + "Name": "Electronica/Dance" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8c136a2b20f0ff7/request.json b/test-snapshots/query/8c136a2b20f0ff7/request.json new file mode 100644 index 0000000..d348ea9 --- /dev/null +++ b/test-snapshots/query/8c136a2b20f0ff7/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Electronica/Dance" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8c32254f75baebbe/expected.json b/test-snapshots/query/8c32254f75baebbe/expected.json new file mode 100644 index 0000000..e343192 --- /dev/null +++ b/test-snapshots/query/8c32254f75baebbe/expected.json @@ -0,0 +1,102 @@ +[ + { + "rows": [ + { + "Address_8016": "11120 Jasper Ave NW", + "BirthDate_2692": "1962-02-18", + "City_2381": "Edmonton", + "EmployeeId_4744": 1, + "FirstName_8792": "Andrew", + "HireDate_7347": "2002-08-14", + "Phone_3981": "+1 (780) 428-9482", + "ReportsTo_6259": null, + "State_5350": "AB", + "Title_6164": "General Manager" + }, + { + "Address_8016": "825 8 Ave SW", + "BirthDate_2692": "1958-12-08", + "City_2381": "Calgary", + "EmployeeId_4744": 2, + "FirstName_8792": "Nancy", + "HireDate_7347": "2002-05-01", + "Phone_3981": "+1 (403) 262-3443", + "ReportsTo_6259": 1, + "State_5350": "AB", + "Title_6164": "Sales Manager" + }, + { + "Address_8016": "5827 Bowness Road NW", + "BirthDate_2692": "1973-07-01", + "City_2381": "Calgary", + "EmployeeId_4744": 6, + "FirstName_8792": "Michael", + "HireDate_7347": "2003-10-17", + "Phone_3981": "+1 (403) 246-9887", + "ReportsTo_6259": 1, + "State_5350": "AB", + "Title_6164": "IT Manager" + }, + { + "Address_8016": "7727B 41 Ave", + "BirthDate_2692": "1965-03-03", + "City_2381": "Calgary", + "EmployeeId_4744": 5, + "FirstName_8792": "Steve", + "HireDate_7347": "2003-10-17", + "Phone_3981": "1 (780) 836-9987", + "ReportsTo_6259": 2, + "State_5350": "AB", + "Title_6164": "Sales Support Agent" + }, + { + "Address_8016": "683 10 Street SW", + "BirthDate_2692": "1947-09-19", + "City_2381": "Calgary", + "EmployeeId_4744": 4, + "FirstName_8792": "Margaret", + "HireDate_7347": "2003-05-03", + "Phone_3981": "+1 (403) 263-4423", + "ReportsTo_6259": 2, + "State_5350": "AB", + "Title_6164": "Sales Support Agent" + }, + { + "Address_8016": "1111 6 Ave SW", + "BirthDate_2692": "1973-08-29", + "City_2381": "Calgary", + "EmployeeId_4744": 3, + "FirstName_8792": "Jane", + "HireDate_7347": "2002-04-01", + "Phone_3981": "+1 (403) 262-3443", + "ReportsTo_6259": 2, + "State_5350": "AB", + "Title_6164": "Sales Support Agent" + }, + { + "Address_8016": "923 7 ST NW", + "BirthDate_2692": "1968-01-09", + "City_2381": "Lethbridge", + "EmployeeId_4744": 8, + "FirstName_8792": "Laura", + "HireDate_7347": "2004-03-04", + "Phone_3981": "+1 (403) 467-3351", + "ReportsTo_6259": 6, + "State_5350": "AB", + "Title_6164": "IT Staff" + }, + { + "Address_8016": "590 Columbia Boulevard West", + "BirthDate_2692": "1970-05-29", + "City_2381": "Lethbridge", + "EmployeeId_4744": 7, + "FirstName_8792": "Robert", + "HireDate_7347": "2004-01-02", + "Phone_3981": "+1 (403) 456-9986", + "ReportsTo_6259": 6, + "State_5350": "AB", + "Title_6164": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8c32254f75baebbe/request.json b/test-snapshots/query/8c32254f75baebbe/request.json new file mode 100644 index 0000000..95b6b5f --- /dev/null +++ b/test-snapshots/query/8c32254f75baebbe/request.json @@ -0,0 +1,80 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_8016": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_2692": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_2381": { + "type": "column", + "column": "City", + "fields": null + }, + "Title_6164": { + "type": "column", + "column": "Title", + "fields": null + }, + "ReportsTo_6259": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "EmployeeId_4744": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "State_5350": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_8792": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_7347": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Phone_3981": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8c4636e080db141c/expected.json b/test-snapshots/query/8c4636e080db141c/expected.json new file mode 100644 index 0000000..3146566 --- /dev/null +++ b/test-snapshots/query/8c4636e080db141c/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8c4636e080db141c/request.json b/test-snapshots/query/8c4636e080db141c/request.json new file mode 100644 index 0000000..100bacc --- /dev/null +++ b/test-snapshots/query/8c4636e080db141c/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263288 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8c5751abf9a9bf2d/expected.json b/test-snapshots/query/8c5751abf9a9bf2d/expected.json new file mode 100644 index 0000000..bbfde75 --- /dev/null +++ b/test-snapshots/query/8c5751abf9a9bf2d/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_2988": "Koyaanisqatsi" + }, + { + "Name_2988": "Quintet for Horn, Violin, 2 Violas, and Cello in E Flat Major, K. 407/386c: III. Allegro" + }, + { + "Name_2988": "L'orfeo, Act 3, Sinfonia (Orchestra)" + }, + { + "Name_2988": "String Quartet No. 12 in C Minor, D. 703 \"Quartettsatz\": II. Andante - Allegro assai" + }, + { + "Name_2988": "Pini Di Roma (Pinien Von Rom) I Pini Della Via Appia" + }, + { + "Name_2988": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro" + }, + { + "Name_2988": "Erlkonig, D.328" + }, + { + "Name_2988": "Étude 1, In C Major - Preludio (Presto) - Liszt" + }, + { + "Name_2988": "24 Caprices, Op. 1, No. 24, for Solo Violin, in A Minor" + }, + { + "Name_2988": "Symphony No. 2, Op. 16 - \"The Four Temperaments\": II. Allegro Comodo e Flemmatico" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8c5751abf9a9bf2d/request.json b/test-snapshots/query/8c5751abf9a9bf2d/request.json new file mode 100644 index 0000000..963473b --- /dev/null +++ b/test-snapshots/query/8c5751abf9a9bf2d/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_2988": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8c5785b9411b6e23/expected.json b/test-snapshots/query/8c5785b9411b6e23/expected.json new file mode 100644 index 0000000..e458a58 --- /dev/null +++ b/test-snapshots/query/8c5785b9411b6e23/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_4299": "Rock" + }, + { + "Name_4299": "Jazz" + }, + { + "Name_4299": "Metal" + }, + { + "Name_4299": "Alternative & Punk" + }, + { + "Name_4299": "Rock And Roll" + }, + { + "Name_4299": "Blues" + }, + { + "Name_4299": "Latin" + }, + { + "Name_4299": "Reggae" + }, + { + "Name_4299": "Pop" + }, + { + "Name_4299": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8c5785b9411b6e23/request.json b/test-snapshots/query/8c5785b9411b6e23/request.json new file mode 100644 index 0000000..e80d2a3 --- /dev/null +++ b/test-snapshots/query/8c5785b9411b6e23/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_4299": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8c8cc5e86bfb302c/expected.json b/test-snapshots/query/8c8cc5e86bfb302c/expected.json new file mode 100644 index 0000000..15cdc67 --- /dev/null +++ b/test-snapshots/query/8c8cc5e86bfb302c/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "Address_7714": "590 Columbia Boulevard West", + "BirthDate_1176": "1970-05-29", + "City_1439": "Lethbridge", + "Country_5391": "Canada", + "Email_0880": "robert@chinookcorp.com", + "EmployeeId_3792": 7, + "Fax_3356": "+1 (403) 456-8485", + "FirstName_8805": "Robert", + "HireDate_2254": "2004-01-02", + "LastName_6655": "King", + "Phone_5310": "+1 (403) 456-9986", + "PostalCode_1618": "T1K 5N8", + "ReportsTo_4191": 6, + "State_8932": "AB", + "Title_5067": "IT Staff" + }, + { + "Address_7714": "923 7 ST NW", + "BirthDate_1176": "1968-01-09", + "City_1439": "Lethbridge", + "Country_5391": "Canada", + "Email_0880": "laura@chinookcorp.com", + "EmployeeId_3792": 8, + "Fax_3356": "+1 (403) 467-8772", + "FirstName_8805": "Laura", + "HireDate_2254": "2004-03-04", + "LastName_6655": "Callahan", + "Phone_5310": "+1 (403) 467-3351", + "PostalCode_1618": "T1H 1Y8", + "ReportsTo_4191": 6, + "State_8932": "AB", + "Title_5067": "IT Staff" + }, + { + "Address_7714": "1111 6 Ave SW", + "BirthDate_1176": "1973-08-29", + "City_1439": "Calgary", + "Country_5391": "Canada", + "Email_0880": "jane@chinookcorp.com", + "EmployeeId_3792": 3, + "Fax_3356": "+1 (403) 262-6712", + "FirstName_8805": "Jane", + "HireDate_2254": "2002-04-01", + "LastName_6655": "Peacock", + "Phone_5310": "+1 (403) 262-3443", + "PostalCode_1618": "T2P 5M5", + "ReportsTo_4191": 2, + "State_8932": "AB", + "Title_5067": "Sales Support Agent" + }, + { + "Address_7714": "683 10 Street SW", + "BirthDate_1176": "1947-09-19", + "City_1439": "Calgary", + "Country_5391": "Canada", + "Email_0880": "margaret@chinookcorp.com", + "EmployeeId_3792": 4, + "Fax_3356": "+1 (403) 263-4289", + "FirstName_8805": "Margaret", + "HireDate_2254": "2003-05-03", + "LastName_6655": "Park", + "Phone_5310": "+1 (403) 263-4423", + "PostalCode_1618": "T2P 5G3", + "ReportsTo_4191": 2, + "State_8932": "AB", + "Title_5067": "Sales Support Agent" + }, + { + "Address_7714": "7727B 41 Ave", + "BirthDate_1176": "1965-03-03", + "City_1439": "Calgary", + "Country_5391": "Canada", + "Email_0880": "steve@chinookcorp.com", + "EmployeeId_3792": 5, + "Fax_3356": "1 (780) 836-9543", + "FirstName_8805": "Steve", + "HireDate_2254": "2003-10-17", + "LastName_6655": "Johnson", + "Phone_5310": "1 (780) 836-9987", + "PostalCode_1618": "T3B 1Y7", + "ReportsTo_4191": 2, + "State_8932": "AB", + "Title_5067": "Sales Support Agent" + }, + { + "Address_7714": "5827 Bowness Road NW", + "BirthDate_1176": "1973-07-01", + "City_1439": "Calgary", + "Country_5391": "Canada", + "Email_0880": "michael@chinookcorp.com", + "EmployeeId_3792": 6, + "Fax_3356": "+1 (403) 246-9899", + "FirstName_8805": "Michael", + "HireDate_2254": "2003-10-17", + "LastName_6655": "Mitchell", + "Phone_5310": "+1 (403) 246-9887", + "PostalCode_1618": "T3B 0C5", + "ReportsTo_4191": 1, + "State_8932": "AB", + "Title_5067": "IT Manager" + }, + { + "Address_7714": "825 8 Ave SW", + "BirthDate_1176": "1958-12-08", + "City_1439": "Calgary", + "Country_5391": "Canada", + "Email_0880": "nancy@chinookcorp.com", + "EmployeeId_3792": 2, + "Fax_3356": "+1 (403) 262-3322", + "FirstName_8805": "Nancy", + "HireDate_2254": "2002-05-01", + "LastName_6655": "Edwards", + "Phone_5310": "+1 (403) 262-3443", + "PostalCode_1618": "T2P 2T3", + "ReportsTo_4191": 1, + "State_8932": "AB", + "Title_5067": "Sales Manager" + }, + { + "Address_7714": "11120 Jasper Ave NW", + "BirthDate_1176": "1962-02-18", + "City_1439": "Edmonton", + "Country_5391": "Canada", + "Email_0880": "andrew@chinookcorp.com", + "EmployeeId_3792": 1, + "Fax_3356": "+1 (780) 428-3457", + "FirstName_8805": "Andrew", + "HireDate_2254": "2002-08-14", + "LastName_6655": "Adams", + "Phone_5310": "+1 (780) 428-9482", + "PostalCode_1618": "T5K 2N1", + "ReportsTo_4191": null, + "State_8932": "AB", + "Title_5067": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8c8cc5e86bfb302c/request.json b/test-snapshots/query/8c8cc5e86bfb302c/request.json new file mode 100644 index 0000000..441475d --- /dev/null +++ b/test-snapshots/query/8c8cc5e86bfb302c/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_7714": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_1176": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_1439": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_5391": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_0880": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_3792": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_3356": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_8805": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_2254": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6655": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_5310": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_1618": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_4191": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_8932": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_5067": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8cd2fd5a66850c00/expected.json b/test-snapshots/query/8cd2fd5a66850c00/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8cd2fd5a66850c00/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8cd2fd5a66850c00/request.json b/test-snapshots/query/8cd2fd5a66850c00/request.json new file mode 100644 index 0000000..a0074cc --- /dev/null +++ b/test-snapshots/query/8cd2fd5a66850c00/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8cd490062adbbc8/expected.json b/test-snapshots/query/8cd490062adbbc8/expected.json new file mode 100644 index 0000000..e36644c --- /dev/null +++ b/test-snapshots/query/8cd490062adbbc8/expected.json @@ -0,0 +1,409 @@ +[ + { + "rows": [ + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2009-03-04", + "InvoiceId_5459": 15, + "Total_8818": 1.98 + }, + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2011-07-20", + "InvoiceId_5459": 210, + "Total_8818": 1.98 + }, + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2011-10-22", + "InvoiceId_5459": 233, + "Total_8818": 3.96 + }, + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1377, + "Quantity": 1, + "TrackId": 1370, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1378, + "Quantity": 1, + "TrackId": 1374, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1379, + "Quantity": 1, + "TrackId": 1378, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1380, + "Quantity": 1, + "TrackId": 1382, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2012-01-24", + "InvoiceId_5459": 255, + "Total_8818": 5.94 + }, + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 144, + "Quantity": 1, + "TrackId": 867, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 145, + "Quantity": 1, + "TrackId": 876, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2009-04-14", + "InvoiceId_5459": 26, + "Total_8818": 13.86 + }, + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 307, + "InvoiceLineId": 1670, + "Quantity": 1, + "TrackId": 3200, + "UnitPrice": 1.99 + } + ] + }, + "InvoiceDate_4656": "2012-09-13", + "InvoiceId_5459": 307, + "Total_8818": 1.99 + }, + { + "BillingAddress_0583": "1 Infinite Loop", + "BillingCity_4011": "Cupertino", + "BillingCountry_1050": "USA", + "BillingState_2866": "CA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 81, + "InvoiceLineId": 431, + "Quantity": 1, + "TrackId": 2594, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 432, + "Quantity": 1, + "TrackId": 2600, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 433, + "Quantity": 1, + "TrackId": 2606, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 434, + "Quantity": 1, + "TrackId": 2612, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 435, + "Quantity": 1, + "TrackId": 2618, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 436, + "Quantity": 1, + "TrackId": 2624, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 437, + "Quantity": 1, + "TrackId": 2630, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 438, + "Quantity": 1, + "TrackId": 2636, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 81, + "InvoiceLineId": 439, + "Quantity": 1, + "TrackId": 2642, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2009-12-13", + "InvoiceId_5459": 81, + "Total_8818": 8.91 + }, + { + "BillingAddress_0583": "1 Microsoft Way", + "BillingCity_4011": "Redmond", + "BillingCountry_1050": "USA", + "BillingState_2866": "WA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2010-04-29", + "InvoiceId_5459": 111, + "Total_8818": 0.99 + }, + { + "BillingAddress_0583": "1 Microsoft Way", + "BillingCity_4011": "Redmond", + "BillingCountry_1050": "USA", + "BillingState_2866": "WA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2009-03-04", + "InvoiceId_5459": 14, + "Total_8818": 1.98 + }, + { + "BillingAddress_0583": "1 Microsoft Way", + "BillingCity_4011": "Redmond", + "BillingCountry_1050": "USA", + "BillingState_2866": "WA", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_4656": "2011-10-21", + "InvoiceId_5459": 232, + "Total_8818": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8cd490062adbbc8/request.json b/test-snapshots/query/8cd490062adbbc8/request.json new file mode 100644 index 0000000..6407610 --- /dev/null +++ b/test-snapshots/query/8cd490062adbbc8/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_0583": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_4011": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_1050": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "Total_8818": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingState_2866": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "InvoiceId_5459": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceDate_4656": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8cdc23d108bb1ecb/expected.json b/test-snapshots/query/8cdc23d108bb1ecb/expected.json new file mode 100644 index 0000000..d769ec7 --- /dev/null +++ b/test-snapshots/query/8cdc23d108bb1ecb/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_8892": 18 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + }, + { + "PlaylistId_8892": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8cdc23d108bb1ecb/request.json b/test-snapshots/query/8cdc23d108bb1ecb/request.json new file mode 100644 index 0000000..5ac8862 --- /dev/null +++ b/test-snapshots/query/8cdc23d108bb1ecb/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8892": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8ce4e6bf03ee31fd/expected.json b/test-snapshots/query/8ce4e6bf03ee31fd/expected.json new file mode 100644 index 0000000..212da37 --- /dev/null +++ b/test-snapshots/query/8ce4e6bf03ee31fd/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_9474": "Opera" + }, + { + "Name_9474": "Classical" + }, + { + "Name_9474": "Alternative" + }, + { + "Name_9474": "Comedy" + }, + { + "Name_9474": "Drama" + }, + { + "Name_9474": "Sci Fi & Fantasy" + }, + { + "Name_9474": "TV Shows" + }, + { + "Name_9474": "Science Fiction" + }, + { + "Name_9474": "Hip Hop/Rap" + }, + { + "Name_9474": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ce4e6bf03ee31fd/request.json b/test-snapshots/query/8ce4e6bf03ee31fd/request.json new file mode 100644 index 0000000..e4e57c4 --- /dev/null +++ b/test-snapshots/query/8ce4e6bf03ee31fd/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_9474": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8cf22edfc55a8cb7/expected.json b/test-snapshots/query/8cf22edfc55a8cb7/expected.json new file mode 100644 index 0000000..a00eeb1 --- /dev/null +++ b/test-snapshots/query/8cf22edfc55a8cb7/expected.json @@ -0,0 +1,48 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8cf22edfc55a8cb7/request.json b/test-snapshots/query/8cf22edfc55a8cb7/request.json new file mode 100644 index 0000000..d45c5be --- /dev/null +++ b/test-snapshots/query/8cf22edfc55a8cb7/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8cfb8fa68a4eb987/expected.json b/test-snapshots/query/8cfb8fa68a4eb987/expected.json new file mode 100644 index 0000000..30dba5a --- /dev/null +++ b/test-snapshots/query/8cfb8fa68a4eb987/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "TrackId_8685": 597 + }, + { + "TrackId_8685": 3290 + }, + { + "TrackId_8685": 2096 + }, + { + "TrackId_8685": 2095 + }, + { + "TrackId_8685": 2094 + }, + { + "TrackId_8685": 1984 + }, + { + "TrackId_8685": 1945 + }, + { + "TrackId_8685": 1942 + }, + { + "TrackId_8685": 1880 + }, + { + "TrackId_8685": 1876 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8cfb8fa68a4eb987/request.json b/test-snapshots/query/8cfb8fa68a4eb987/request.json new file mode 100644 index 0000000..5b4cddb --- /dev/null +++ b/test-snapshots/query/8cfb8fa68a4eb987/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "TrackId_8685": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8d313c37bbf90c81/expected.json b/test-snapshots/query/8d313c37bbf90c81/expected.json new file mode 100644 index 0000000..5d6a514 --- /dev/null +++ b/test-snapshots/query/8d313c37bbf90c81/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "AlbumId": 260, + "Bytes": 8052374, + "Composer": null, + "GenreId": 23, + "MediaTypeId": 4, + "Milliseconds": 234013, + "Name": "War Pigs", + "TrackId": 3336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 283, + "Bytes": 10085867, + "Composer": "Franz Joseph Haydn", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 306687, + "Name": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId": 3414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 318, + "Bytes": 3819535, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 101293, + "Name": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId": 3452, + "UnitPrice": 0.99 + }, + { + "AlbumId": 324, + "Bytes": 10887931, + "Composer": "Ludwig van Beethoven", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 339567, + "Name": "Prometheus Overture, Op. 43", + "TrackId": 3479, + "UnitPrice": 0.99 + }, + { + "AlbumId": 325, + "Bytes": 9785346, + "Composer": "Béla Bartók", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 299350, + "Name": "Sonata for Solo Violin: IV: Presto", + "TrackId": 3480, + "UnitPrice": 0.99 + }, + { + "AlbumId": 340, + "Bytes": 2229617, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 51780, + "Name": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "TrackId": 3496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 342, + "Bytes": 16454937, + "Composer": "Pietro Antonio Locatelli", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 493573, + "Name": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId": 3498, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d313c37bbf90c81/request.json b/test-snapshots/query/8d313c37bbf90c81/request.json new file mode 100644 index 0000000..1640ae1 --- /dev/null +++ b/test-snapshots/query/8d313c37bbf90c81/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8d3cb04c1fca809d/expected.json b/test-snapshots/query/8d3cb04c1fca809d/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/8d3cb04c1fca809d/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d3cb04c1fca809d/request.json b/test-snapshots/query/8d3cb04c1fca809d/request.json new file mode 100644 index 0000000..3fc8926 --- /dev/null +++ b/test-snapshots/query/8d3cb04c1fca809d/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8d4b02b413d45ffb/expected.json b/test-snapshots/query/8d4b02b413d45ffb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8d4b02b413d45ffb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d4b02b413d45ffb/request.json b/test-snapshots/query/8d4b02b413d45ffb/request.json new file mode 100644 index 0000000..a240fcf --- /dev/null +++ b/test-snapshots/query/8d4b02b413d45ffb/request.json @@ -0,0 +1,171 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "andrew@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8d4f76e1be9c5916/expected.json b/test-snapshots/query/8d4f76e1be9c5916/expected.json new file mode 100644 index 0000000..a4c68d1 --- /dev/null +++ b/test-snapshots/query/8d4f76e1be9c5916/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_5372": "90’s Music", + "PlaylistId_7245": 5 + }, + { + "Name_5372": "Audiobooks", + "PlaylistId_7245": 4 + }, + { + "Name_5372": "Audiobooks", + "PlaylistId_7245": 6 + }, + { + "Name_5372": "Brazilian Music", + "PlaylistId_7245": 11 + }, + { + "Name_5372": "Classical", + "PlaylistId_7245": 12 + }, + { + "Name_5372": "Classical 101 - Deep Cuts", + "PlaylistId_7245": 13 + }, + { + "Name_5372": "Classical 101 - Next Steps", + "PlaylistId_7245": 14 + }, + { + "Name_5372": "Classical 101 - The Basics", + "PlaylistId_7245": 15 + }, + { + "Name_5372": "Grunge", + "PlaylistId_7245": 16 + }, + { + "Name_5372": "Heavy Metal Classic", + "PlaylistId_7245": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d4f76e1be9c5916/request.json b/test-snapshots/query/8d4f76e1be9c5916/request.json new file mode 100644 index 0000000..73a6e94 --- /dev/null +++ b/test-snapshots/query/8d4f76e1be9c5916/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_5372": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_7245": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8d659c655870794a/expected.json b/test-snapshots/query/8d659c655870794a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8d659c655870794a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d659c655870794a/request.json b/test-snapshots/query/8d659c655870794a/request.json new file mode 100644 index 0000000..a77eb73 --- /dev/null +++ b/test-snapshots/query/8d659c655870794a/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8d9738cafd02f289/expected.json b/test-snapshots/query/8d9738cafd02f289/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8d9738cafd02f289/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d9738cafd02f289/request.json b/test-snapshots/query/8d9738cafd02f289/request.json new file mode 100644 index 0000000..24c2c65 --- /dev/null +++ b/test-snapshots/query/8d9738cafd02f289/request.json @@ -0,0 +1,126 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8d97815aa39a65e/expected.json b/test-snapshots/query/8d97815aa39a65e/expected.json new file mode 100644 index 0000000..87b0141 --- /dev/null +++ b/test-snapshots/query/8d97815aa39a65e/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 312, + "InvoiceLineId": 1687, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d97815aa39a65e/request.json b/test-snapshots/query/8d97815aa39a65e/request.json new file mode 100644 index 0000000..05e944c --- /dev/null +++ b/test-snapshots/query/8d97815aa39a65e/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8d97ff468419b4de/expected.json b/test-snapshots/query/8d97ff468419b4de/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8d97ff468419b4de/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d97ff468419b4de/request.json b/test-snapshots/query/8d97ff468419b4de/request.json new file mode 100644 index 0000000..3b2630c --- /dev/null +++ b/test-snapshots/query/8d97ff468419b4de/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8d9be9a02537eb04/expected.json b/test-snapshots/query/8d9be9a02537eb04/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8d9be9a02537eb04/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8d9be9a02537eb04/request.json b/test-snapshots/query/8d9be9a02537eb04/request.json new file mode 100644 index 0000000..737b924 --- /dev/null +++ b/test-snapshots/query/8d9be9a02537eb04/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8da28c6a62b06463/expected.json b/test-snapshots/query/8da28c6a62b06463/expected.json new file mode 100644 index 0000000..6945296 --- /dev/null +++ b/test-snapshots/query/8da28c6a62b06463/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 141, + "ArtistId": 100, + "Title": "Greatest Hits" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8da28c6a62b06463/request.json b/test-snapshots/query/8da28c6a62b06463/request.json new file mode 100644 index 0000000..24d554e --- /dev/null +++ b/test-snapshots/query/8da28c6a62b06463/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8da43347855c5216/expected.json b/test-snapshots/query/8da43347855c5216/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8da43347855c5216/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8da43347855c5216/request.json b/test-snapshots/query/8da43347855c5216/request.json new file mode 100644 index 0000000..74d10e6 --- /dev/null +++ b/test-snapshots/query/8da43347855c5216/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8dea671d6a5d29aa/expected.json b/test-snapshots/query/8dea671d6a5d29aa/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/8dea671d6a5d29aa/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8dea671d6a5d29aa/request.json b/test-snapshots/query/8dea671d6a5d29aa/request.json new file mode 100644 index 0000000..621c3e3 --- /dev/null +++ b/test-snapshots/query/8dea671d6a5d29aa/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8ded8a49e21ebdd2/expected.json b/test-snapshots/query/8ded8a49e21ebdd2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8ded8a49e21ebdd2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ded8a49e21ebdd2/request.json b/test-snapshots/query/8ded8a49e21ebdd2/request.json new file mode 100644 index 0000000..0c75f25 --- /dev/null +++ b/test-snapshots/query/8ded8a49e21ebdd2/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8df7dcba3e2357d3/expected.json b/test-snapshots/query/8df7dcba3e2357d3/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/8df7dcba3e2357d3/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8df7dcba3e2357d3/request.json b/test-snapshots/query/8df7dcba3e2357d3/request.json new file mode 100644 index 0000000..c23d4fb --- /dev/null +++ b/test-snapshots/query/8df7dcba3e2357d3/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 9 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8e2fde9f25713441/expected.json b/test-snapshots/query/8e2fde9f25713441/expected.json new file mode 100644 index 0000000..286ad0b --- /dev/null +++ b/test-snapshots/query/8e2fde9f25713441/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2819 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2820 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2821 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2822 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2823 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2824 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2825 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2826 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2827 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_9751": 10 + } + ] + }, + "PlaylistId": 10, + "TrackId": 2828 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8e2fde9f25713441/request.json b/test-snapshots/query/8e2fde9f25713441/request.json new file mode 100644 index 0000000..a8cb20c --- /dev/null +++ b/test-snapshots/query/8e2fde9f25713441/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId_9751": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8e313ea41903de57/expected.json b/test-snapshots/query/8e313ea41903de57/expected.json new file mode 100644 index 0000000..8f8ff9f --- /dev/null +++ b/test-snapshots/query/8e313ea41903de57/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8e313ea41903de57/request.json b/test-snapshots/query/8e313ea41903de57/request.json new file mode 100644 index 0000000..1ae82d9 --- /dev/null +++ b/test-snapshots/query/8e313ea41903de57/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jane" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8e34b5500b0d2adc/expected.json b/test-snapshots/query/8e34b5500b0d2adc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8e34b5500b0d2adc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8e34b5500b0d2adc/request.json b/test-snapshots/query/8e34b5500b0d2adc/request.json new file mode 100644 index 0000000..8b017ef --- /dev/null +++ b/test-snapshots/query/8e34b5500b0d2adc/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-12-13" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8e8a68443a91e19/expected.json b/test-snapshots/query/8e8a68443a91e19/expected.json new file mode 100644 index 0000000..ab70a8b --- /dev/null +++ b/test-snapshots/query/8e8a68443a91e19/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_8186": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8e8a68443a91e19/request.json b/test-snapshots/query/8e8a68443a91e19/request.json new file mode 100644 index 0000000..2b45b25 --- /dev/null +++ b/test-snapshots/query/8e8a68443a91e19/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId_8186": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8e8f5f42235369da/expected.json b/test-snapshots/query/8e8f5f42235369da/expected.json new file mode 100644 index 0000000..1e6ee2e --- /dev/null +++ b/test-snapshots/query/8e8f5f42235369da/expected.json @@ -0,0 +1,236 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Infinite Loop", + "City_8988": "Cupertino", + "Country_6782": "USA", + "CustomerId_5402": 19, + "Email_1428": "tgoyer@apple.com", + "Fax_2685": "+1 (408) 996-1011" + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Microsoft Way", + "City_8988": "Redmond", + "Country_6782": "USA", + "CustomerId_5402": 17, + "Email_1428": "jacksmith@microsoft.com", + "Fax_2685": "+1 (425) 882-8081" + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Microsoft Way", + "City_8988": "Redmond", + "Country_6782": "USA", + "CustomerId_5402": 17, + "Email_1428": "jacksmith@microsoft.com", + "Fax_2685": "+1 (425) 882-8081" + } + ] + }, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceCustomerId": { + "rows": [ + { + "Address_4432": "1 Microsoft Way", + "City_8988": "Redmond", + "Country_6782": "USA", + "CustomerId_5402": 17, + "Email_1428": "jacksmith@microsoft.com", + "Fax_2685": "+1 (425) 882-8081" + } + ] + }, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8e8f5f42235369da/request.json b/test-snapshots/query/8e8f5f42235369da/request.json new file mode 100644 index 0000000..1875f10 --- /dev/null +++ b/test-snapshots/query/8e8f5f42235369da/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "Address_4432": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_8988": { + "type": "column", + "column": "City", + "fields": null + }, + "Fax_2685": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Country_6782": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_5402": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_1428": { + "type": "column", + "column": "Email", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8e9ed2abcac95735/expected.json b/test-snapshots/query/8e9ed2abcac95735/expected.json new file mode 100644 index 0000000..bb96ca7 --- /dev/null +++ b/test-snapshots/query/8e9ed2abcac95735/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 8, + "TrackId": 1004 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8e9ed2abcac95735/request.json b/test-snapshots/query/8e9ed2abcac95735/request.json new file mode 100644 index 0000000..57ba30b --- /dev/null +++ b/test-snapshots/query/8e9ed2abcac95735/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1004 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8ebaff3bdfb39f0f/expected.json b/test-snapshots/query/8ebaff3bdfb39f0f/expected.json new file mode 100644 index 0000000..47c2ca4 --- /dev/null +++ b/test-snapshots/query/8ebaff3bdfb39f0f/expected.json @@ -0,0 +1,219 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 1 + }, + { + "TrackId_3047": 1 + }, + { + "TrackId_3047": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 11 + }, + { + "TrackId_3047": 11 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 9 + }, + { + "TrackId_3047": 9 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 13 + }, + { + "TrackId_3047": 13 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 6 + }, + { + "TrackId_3047": 6 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 8 + }, + { + "TrackId_3047": 8 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 7 + }, + { + "TrackId_3047": 7 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 12 + }, + { + "TrackId_3047": 12 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 10 + }, + { + "TrackId_3047": 10 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "TrackId_3047": 14 + }, + { + "TrackId_3047": 14 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ebaff3bdfb39f0f/request.json b/test-snapshots/query/8ebaff3bdfb39f0f/request.json new file mode 100644 index 0000000..8bf3aaf --- /dev/null +++ b/test-snapshots/query/8ebaff3bdfb39f0f/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "TrackId_3047": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8ec92e12bf210583/expected.json b/test-snapshots/query/8ec92e12bf210583/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8ec92e12bf210583/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ec92e12bf210583/request.json b/test-snapshots/query/8ec92e12bf210583/request.json new file mode 100644 index 0000000..0aa3747 --- /dev/null +++ b/test-snapshots/query/8ec92e12bf210583/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8ee84ae1a8129a28/expected.json b/test-snapshots/query/8ee84ae1a8129a28/expected.json new file mode 100644 index 0000000..47fc8d3 --- /dev/null +++ b/test-snapshots/query/8ee84ae1a8129a28/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_3649": 275, + "Name_3414": "Philip Glass Ensemble" + }, + { + "ArtistId_3649": 274, + "Name_3414": "Nash Ensemble" + }, + { + "ArtistId_3649": 273, + "Name_3414": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "ArtistId_3649": 272, + "Name_3414": "Emerson String Quartet" + }, + { + "ArtistId_3649": 271, + "Name_3414": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "ArtistId_3649": 270, + "Name_3414": "Gerald Moore" + }, + { + "ArtistId_3649": 269, + "Name_3414": "Michele Campanella" + }, + { + "ArtistId_3649": 268, + "Name_3414": "Itzhak Perlman" + }, + { + "ArtistId_3649": 267, + "Name_3414": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "ArtistId_3649": 266, + "Name_3414": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ee84ae1a8129a28/request.json b/test-snapshots/query/8ee84ae1a8129a28/request.json new file mode 100644 index 0000000..eaa8fce --- /dev/null +++ b/test-snapshots/query/8ee84ae1a8129a28/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_3649": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_3414": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8efc14b0bc87e541/expected.json b/test-snapshots/query/8efc14b0bc87e541/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8efc14b0bc87e541/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8efc14b0bc87e541/request.json b/test-snapshots/query/8efc14b0bc87e541/request.json new file mode 100644 index 0000000..96e8552 --- /dev/null +++ b/test-snapshots/query/8efc14b0bc87e541/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Nancy" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1970-05-29" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8efdfa85bcdbc5c8/expected.json b/test-snapshots/query/8efdfa85bcdbc5c8/expected.json new file mode 100644 index 0000000..511b1fc --- /dev/null +++ b/test-snapshots/query/8efdfa85bcdbc5c8/expected.json @@ -0,0 +1,1152 @@ +[ + { + "rows": [ + { + "AlbumId_6842": 1, + "ArtistId_5450": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "For Those About To Rock We Salute You" + }, + { + "AlbumId_6842": 10, + "ArtistId_5450": 8, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5339931, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 222380, + "Name": "Cochise", + "TrackId": 85, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5988186, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 249391, + "Name": "What You Are", + "TrackId": 88, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6321091, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263262, + "Name": "Set It Off", + "TrackId": 90, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6672176, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 277890, + "Name": "Show Me How to Live", + "TrackId": 86, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6709793, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 279457, + "Name": "Gasoline", + "TrackId": 87, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7059624, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294034, + "Name": "Like a Stone", + "TrackId": 89, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7193162, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 299598, + "Name": "Getaway Car", + "TrackId": 97, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7289084, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 303595, + "Name": "Light My Way", + "TrackId": 96, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Audioslave" + }, + { + "AlbumId_6842": 100, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Iron Maiden" + }, + { + "AlbumId_6842": 101, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Killers" + }, + { + "AlbumId_6842": 102, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10589917, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 441155, + "Name": "Phantom Of The Opera", + "TrackId": 1304, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 1154488, + "Composer": null, + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 48013, + "Name": "Intro- Churchill S Speech", + "TrackId": 1287, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4410181, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 183666, + "Name": "Wrathchild", + "TrackId": 1300, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Live After Death" + }, + { + "AlbumId_6842": 103, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId_6842": 104, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 104, + "Bytes": 10577743, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 440555, + "Name": "Heaven Can Wait", + "TrackId": 1317, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 10751410, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 447791, + "Name": "Hallowed Be Thy Name", + "TrackId": 1321, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11380851, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 474017, + "Name": "Running Free", + "TrackId": 1324, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11874875, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 494602, + "Name": "Iron Maiden", + "TrackId": 1320, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5588560, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 232672, + "Name": "The Trooper", + "TrackId": 1322, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5665052, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 235859, + "Name": "Run To The Hills", + "TrackId": 1318, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 6302648, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 262426, + "Name": "The Clairvoyant", + "TrackId": 1316, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 7648679, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 318511, + "Name": "Sanctuary", + "TrackId": 1323, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 8122030, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 338233, + "Name": "2 Minutes To Midnight", + "TrackId": 1319, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 9045532, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 376711, + "Name": "Bring Your Daughter... To The Slaughter...", + "TrackId": 1315, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId_6842": 105, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 105, + "Bytes": 3672064, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229459, + "Name": "Holy Smoke", + "TrackId": 1326, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 3960832, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 247510, + "Name": "Hooks In You", + "TrackId": 1332, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4018088, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 250853, + "Name": "Fates Warning", + "TrackId": 1329, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4071587, + "Composer": "Bruce Dickinson/David Murray", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 254197, + "Name": "Public Enema Number One", + "TrackId": 1328, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4089856, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 255582, + "Name": "Tailgunner", + "TrackId": 1325, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4141056, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 258768, + "Name": "The Assassin", + "TrackId": 1330, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4225024, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 263941, + "Name": "No Prayer For The Dying", + "TrackId": 1327, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4407296, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275408, + "Name": "Run Silent Run Deep", + "TrackId": 1331, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4548608, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 284238, + "Name": "Bring Your Daughter... ...To The Slaughter", + "TrackId": 1333, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 5322752, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 332617, + "Name": "Mother Russia", + "TrackId": 1334, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "No Prayer For The Dying" + }, + { + "AlbumId_6842": 106, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 106, + "Bytes": 3306324, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 206367, + "Name": "Sun And Steel", + "TrackId": 1342, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3543040, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 221309, + "Name": "Quest For Fire", + "TrackId": 1341, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3686400, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 230269, + "Name": "Flight Of The Icarus", + "TrackId": 1337, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4024320, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 251454, + "Name": "The Trooper", + "TrackId": 1339, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4710400, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 294347, + "Name": "Still Life", + "TrackId": 1340, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5212160, + "Composer": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 325694, + "Name": "Die With Your Boots On", + "TrackId": 1338, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5914624, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 369554, + "Name": "Where Eagles Dare", + "TrackId": 1335, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 6539264, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 408607, + "Name": "Revelations", + "TrackId": 1336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 7129264, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 445283, + "Name": "To Tame A Land", + "TrackId": 1343, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Piece Of Mind" + }, + { + "AlbumId_6842": 107, + "ArtistId_5450": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + }, + "Title_8653": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8efdfa85bcdbc5c8/request.json b/test-snapshots/query/8efdfa85bcdbc5c8/request.json new file mode 100644 index 0000000..6b7ca81 --- /dev/null +++ b/test-snapshots/query/8efdfa85bcdbc5c8/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_6842": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_5450": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_8653": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8f8d6ed3446ade48/expected.json b/test-snapshots/query/8f8d6ed3446ade48/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/8f8d6ed3446ade48/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8f8d6ed3446ade48/request.json b/test-snapshots/query/8f8d6ed3446ade48/request.json new file mode 100644 index 0000000..d6dec4d --- /dev/null +++ b/test-snapshots/query/8f8d6ed3446ade48/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Murray" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/8fbaaabbbcfd2510/expected.json b/test-snapshots/query/8fbaaabbbcfd2510/expected.json new file mode 100644 index 0000000..cf57ede --- /dev/null +++ b/test-snapshots/query/8fbaaabbbcfd2510/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8fbaaabbbcfd2510/request.json b/test-snapshots/query/8fbaaabbbcfd2510/request.json new file mode 100644 index 0000000..de9cc5e --- /dev/null +++ b/test-snapshots/query/8fbaaabbbcfd2510/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Google Inc." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8fdcb23e87bb2516/expected.json b/test-snapshots/query/8fdcb23e87bb2516/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/8fdcb23e87bb2516/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8fdcb23e87bb2516/request.json b/test-snapshots/query/8fdcb23e87bb2516/request.json new file mode 100644 index 0000000..5d4d318 --- /dev/null +++ b/test-snapshots/query/8fdcb23e87bb2516/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8ff87594e8a8d6e6/expected.json b/test-snapshots/query/8ff87594e8a8d6e6/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/8ff87594e8a8d6e6/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ff87594e8a8d6e6/request.json b/test-snapshots/query/8ff87594e8a8d6e6/request.json new file mode 100644 index 0000000..ac05e01 --- /dev/null +++ b/test-snapshots/query/8ff87594e8a8d6e6/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/8ff92113fa0b4bf0/expected.json b/test-snapshots/query/8ff92113fa0b4bf0/expected.json new file mode 100644 index 0000000..1860b6e --- /dev/null +++ b/test-snapshots/query/8ff92113fa0b4bf0/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/8ff92113fa0b4bf0/request.json b/test-snapshots/query/8ff92113fa0b4bf0/request.json new file mode 100644 index 0000000..81ff83a --- /dev/null +++ b/test-snapshots/query/8ff92113fa0b4bf0/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210834 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9083a561f8aedc7c/expected.json b/test-snapshots/query/9083a561f8aedc7c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9083a561f8aedc7c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9083a561f8aedc7c/request.json b/test-snapshots/query/9083a561f8aedc7c/request.json new file mode 100644 index 0000000..dcdc6ce --- /dev/null +++ b/test-snapshots/query/9083a561f8aedc7c/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/908ab9abad98aba6/expected.json b/test-snapshots/query/908ab9abad98aba6/expected.json new file mode 100644 index 0000000..ed226db --- /dev/null +++ b/test-snapshots/query/908ab9abad98aba6/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + }, + { + "Name": "Music", + "PlaylistId": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/908ab9abad98aba6/request.json b/test-snapshots/query/908ab9abad98aba6/request.json new file mode 100644 index 0000000..5b8ffa4 --- /dev/null +++ b/test-snapshots/query/908ab9abad98aba6/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9091831ae8b2895c/expected.json b/test-snapshots/query/9091831ae8b2895c/expected.json new file mode 100644 index 0000000..551524c --- /dev/null +++ b/test-snapshots/query/9091831ae8b2895c/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9721373, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 293276, + "Name": "Razor", + "TrackId": 1008, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9091831ae8b2895c/request.json b/test-snapshots/query/9091831ae8b2895c/request.json new file mode 100644 index 0000000..7cc6fc8 --- /dev/null +++ b/test-snapshots/query/9091831ae8b2895c/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/90c9dd859314c6f2/expected.json b/test-snapshots/query/90c9dd859314c6f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/90c9dd859314c6f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/90c9dd859314c6f2/request.json b/test-snapshots/query/90c9dd859314c6f2/request.json new file mode 100644 index 0000000..5bbe5d0 --- /dev/null +++ b/test-snapshots/query/90c9dd859314c6f2/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "7727B 41 Ave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/90ef7916f1e95a9/expected.json b/test-snapshots/query/90ef7916f1e95a9/expected.json new file mode 100644 index 0000000..7a6f09f --- /dev/null +++ b/test-snapshots/query/90ef7916f1e95a9/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 12 + }, + { + "PlaylistId": 8, + "TrackId": 12 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/90ef7916f1e95a9/request.json b/test-snapshots/query/90ef7916f1e95a9/request.json new file mode 100644 index 0000000..9c26e28 --- /dev/null +++ b/test-snapshots/query/90ef7916f1e95a9/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8596840 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/910ea53cd95d8a42/expected.json b/test-snapshots/query/910ea53cd95d8a42/expected.json new file mode 100644 index 0000000..0fa8545 --- /dev/null +++ b/test-snapshots/query/910ea53cd95d8a42/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1005 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/910ea53cd95d8a42/request.json b/test-snapshots/query/910ea53cd95d8a42/request.json new file mode 100644 index 0000000..8db188c --- /dev/null +++ b/test-snapshots/query/910ea53cd95d8a42/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1005 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/911635d5b126b563/expected.json b/test-snapshots/query/911635d5b126b563/expected.json new file mode 100644 index 0000000..b7c896a --- /dev/null +++ b/test-snapshots/query/911635d5b126b563/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 8, + "TrackId": 7 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/911635d5b126b563/request.json b/test-snapshots/query/911635d5b126b563/request.json new file mode 100644 index 0000000..a4d414c --- /dev/null +++ b/test-snapshots/query/911635d5b126b563/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/91356ea1d81d10c3/expected.json b/test-snapshots/query/91356ea1d81d10c3/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/91356ea1d81d10c3/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/91356ea1d81d10c3/request.json b/test-snapshots/query/91356ea1d81d10c3/request.json new file mode 100644 index 0000000..72b6410 --- /dev/null +++ b/test-snapshots/query/91356ea1d81d10c3/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/914178e223681b11/expected.json b/test-snapshots/query/914178e223681b11/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/914178e223681b11/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/914178e223681b11/request.json b/test-snapshots/query/914178e223681b11/request.json new file mode 100644 index 0000000..3c552e5 --- /dev/null +++ b/test-snapshots/query/914178e223681b11/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/91515ce41f50ae5/expected.json b/test-snapshots/query/91515ce41f50ae5/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/91515ce41f50ae5/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/91515ce41f50ae5/request.json b/test-snapshots/query/91515ce41f50ae5/request.json new file mode 100644 index 0000000..a45b89a --- /dev/null +++ b/test-snapshots/query/91515ce41f50ae5/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/916cd51b3ccf7541/expected.json b/test-snapshots/query/916cd51b3ccf7541/expected.json new file mode 100644 index 0000000..427d288 --- /dev/null +++ b/test-snapshots/query/916cd51b3ccf7541/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 146, + "ArtistId": 104, + "Title": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/916cd51b3ccf7541/request.json b/test-snapshots/query/916cd51b3ccf7541/request.json new file mode 100644 index 0000000..2b2d006 --- /dev/null +++ b/test-snapshots/query/916cd51b3ccf7541/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/91b8b91c757d8cef/expected.json b/test-snapshots/query/91b8b91c757d8cef/expected.json new file mode 100644 index 0000000..036967c --- /dev/null +++ b/test-snapshots/query/91b8b91c757d8cef/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "Company_6348": null, + "LastName_8466": "Kovács", + "State_8567": null, + "SupportRepId_9921": 3 + }, + { + "Company_6348": null, + "LastName_8466": "Mitchell", + "State_8567": "MB", + "SupportRepId_9921": 4 + }, + { + "Company_6348": null, + "LastName_8466": "Brooks", + "State_8567": "NY", + "SupportRepId_9921": 3 + }, + { + "Company_6348": null, + "LastName_8466": "Ralston", + "State_8567": "IL", + "SupportRepId_9921": 3 + }, + { + "Company_6348": null, + "LastName_8466": "Leacock", + "State_8567": "FL", + "SupportRepId_9921": 4 + }, + { + "Company_6348": "Apple Inc.", + "LastName_8466": "Goyer", + "State_8567": "CA", + "SupportRepId_9921": 3 + }, + { + "Company_6348": null, + "LastName_8466": "Brown", + "State_8567": "ON", + "SupportRepId_9921": 3 + }, + { + "Company_6348": "Microsoft Corporation", + "LastName_8466": "Smith", + "State_8567": "WA", + "SupportRepId_9921": 5 + }, + { + "Company_6348": null, + "LastName_8466": "Tremblay", + "State_8567": "QC", + "SupportRepId_9921": 3 + }, + { + "Company_6348": null, + "LastName_8466": "Gray", + "State_8567": "AZ", + "SupportRepId_9921": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/91b8b91c757d8cef/request.json b/test-snapshots/query/91b8b91c757d8cef/request.json new file mode 100644 index 0000000..0798425 --- /dev/null +++ b/test-snapshots/query/91b8b91c757d8cef/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_9921": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "LastName_8466": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Company_6348": { + "type": "column", + "column": "Company", + "fields": null + }, + "State_8567": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/91dc80ada090e593/expected.json b/test-snapshots/query/91dc80ada090e593/expected.json new file mode 100644 index 0000000..b3a4a58 --- /dev/null +++ b/test-snapshots/query/91dc80ada090e593/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "C.O.D.", + "TrackId_1679": 11 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Snowballed", + "TrackId_1679": 9 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Night Of The Long Knives", + "TrackId_1679": 13 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Put The Finger On You", + "TrackId_1679": 6 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Inject The Venom", + "TrackId_1679": 8 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Let's Get It Up", + "TrackId_1679": 7 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Breaking The Rules", + "TrackId_1679": 12 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Evil Walks", + "TrackId_1679": 10 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "Spellbound", + "TrackId_1679": 14 + }, + { + "Composer_7046": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_9901": 1, + "MediaTypeId_8797": 1, + "Name_3721": "For Those About To Rock (We Salute You)", + "TrackId_1679": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/91dc80ada090e593/request.json b/test-snapshots/query/91dc80ada090e593/request.json new file mode 100644 index 0000000..3488406 --- /dev/null +++ b/test-snapshots/query/91dc80ada090e593/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_3721": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_1679": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Composer_7046": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_9901": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_8797": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/91e263ece8c35127/expected.json b/test-snapshots/query/91e263ece8c35127/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/91e263ece8c35127/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/91e263ece8c35127/request.json b/test-snapshots/query/91e263ece8c35127/request.json new file mode 100644 index 0000000..db647a1 --- /dev/null +++ b/test-snapshots/query/91e263ece8c35127/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/92083247ba1b675f/expected.json b/test-snapshots/query/92083247ba1b675f/expected.json new file mode 100644 index 0000000..695f017 --- /dev/null +++ b/test-snapshots/query/92083247ba1b675f/expected.json @@ -0,0 +1,316 @@ +[ + { + "rows": [ + { + "Address_2100": "1 Infinite Loop", + "City_7010": "Cupertino", + "Company_8236": "Apple Inc.", + "Country_2063": "USA", + "CustomerId_9920": 19, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Tim", + "LastName_6431": "Goyer", + "Phone_9182": "+1 (408) 996-1010" + }, + { + "Address_2100": "1 Microsoft Way", + "City_7010": "Redmond", + "Company_8236": "Microsoft Corporation", + "Country_2063": "USA", + "CustomerId_9920": 17, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Jack", + "LastName_6431": "Smith", + "Phone_9182": "+1 (425) 882-8080" + }, + { + "Address_2100": "1033 N Park Ave", + "City_7010": "Tucson", + "Company_8236": null, + "Country_2063": "USA", + "CustomerId_9920": 27, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Patrick", + "LastName_6431": "Gray", + "Phone_9182": "+1 (520) 622-4200" + }, + { + "Address_2100": "11, Place Bellecour", + "City_7010": "Lyon", + "Company_8236": null, + "Country_2063": "France", + "CustomerId_9920": 41, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Marc", + "LastName_6431": "Dubois", + "Phone_9182": "+33 04 78 30 30 30" + }, + { + "Address_2100": "110 Raeburn Pl", + "City_7010": "Edinburgh ", + "Company_8236": null, + "Country_2063": "United Kingdom", + "CustomerId_9920": 54, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Steve", + "LastName_6431": "Murray", + "Phone_9182": "+44 0131 315 3300" + }, + { + "Address_2100": "113 Lupus St", + "City_7010": "London", + "Company_8236": null, + "Country_2063": "United Kingdom", + "CustomerId_9920": 53, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Phil", + "LastName_6431": "Hughes", + "Phone_9182": "+44 020 7976 5722" + }, + { + "Address_2100": "12,Community Centre", + "City_7010": "Delhi", + "Company_8236": null, + "Country_2063": "India", + "CustomerId_9920": 58, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Manoj", + "LastName_6431": "Pareek", + "Phone_9182": "+91 0124 39883988" + }, + { + "Address_2100": "120 S Orange Ave", + "City_7010": "Orlando", + "Company_8236": null, + "Country_2063": "USA", + "CustomerId_9920": 22, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Heather", + "LastName_6431": "Leacock", + "Phone_9182": "+1 (407) 999-7788" + }, + { + "Address_2100": "1498 rue Bélanger", + "City_7010": "Montréal", + "Company_8236": null, + "Country_2063": "Canada", + "CustomerId_9920": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "François", + "LastName_6431": "Tremblay", + "Phone_9182": "+1 (514) 721-4711" + }, + { + "Address_2100": "1600 Amphitheatre Parkway", + "City_7010": "Mountain View", + "Company_8236": "Google Inc.", + "Country_2063": "USA", + "CustomerId_9920": 16, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "FirstName_6218": "Frank", + "LastName_6431": "Harris", + "Phone_9182": "+1 (650) 253-0000" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92083247ba1b675f/request.json b/test-snapshots/query/92083247ba1b675f/request.json new file mode 100644 index 0000000..da371a8 --- /dev/null +++ b/test-snapshots/query/92083247ba1b675f/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_2100": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_7010": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_8236": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_2063": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_9920": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "LastName_6431": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_9182": { + "type": "column", + "column": "Phone", + "fields": null + }, + "FirstName_6218": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/920dec2792966b9a/expected.json b/test-snapshots/query/920dec2792966b9a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/920dec2792966b9a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/920dec2792966b9a/request.json b/test-snapshots/query/920dec2792966b9a/request.json new file mode 100644 index 0000000..9a13288 --- /dev/null +++ b/test-snapshots/query/920dec2792966b9a/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "General Manager" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/920ec6815f93a6d4/expected.json b/test-snapshots/query/920ec6815f93a6d4/expected.json new file mode 100644 index 0000000..aad6cd8 --- /dev/null +++ b/test-snapshots/query/920ec6815f93a6d4/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingCity_0168": "Delhi", + "BillingCountry_1540": "India", + "BillingPostalCode_8630": "110017", + "BillingState_2813": null, + "CustomerId_2099": 58, + "InvoiceDate_0216": "2013-12-22", + "Total_6368": 1.99 + }, + { + "BillingCity_0168": "Helsinki", + "BillingCountry_1540": "Finland", + "BillingPostalCode_8630": "00530", + "BillingState_2813": null, + "CustomerId_2099": 44, + "InvoiceDate_0216": "2013-12-14", + "Total_6368": 13.86 + }, + { + "BillingCity_0168": "Porto", + "BillingCountry_1540": "Portugal", + "BillingPostalCode_8630": null, + "BillingState_2813": null, + "CustomerId_2099": 35, + "InvoiceDate_0216": "2013-12-09", + "Total_6368": 8.91 + }, + { + "BillingCity_0168": "Toronto", + "BillingCountry_1540": "Canada", + "BillingPostalCode_8630": "M6J 1V1", + "BillingState_2813": "ON", + "CustomerId_2099": 29, + "InvoiceDate_0216": "2013-12-06", + "Total_6368": 5.94 + }, + { + "BillingCity_0168": "Madison", + "BillingCountry_1540": "USA", + "BillingPostalCode_8630": "53703", + "BillingState_2813": "WI", + "CustomerId_2099": 25, + "InvoiceDate_0216": "2013-12-05", + "Total_6368": 3.96 + }, + { + "BillingCity_0168": "Boston", + "BillingCountry_1540": "USA", + "BillingPostalCode_8630": "2113", + "BillingState_2813": "MA", + "CustomerId_2099": 23, + "InvoiceDate_0216": "2013-12-04", + "Total_6368": 1.98 + }, + { + "BillingCity_0168": "Reno", + "BillingCountry_1540": "USA", + "BillingPostalCode_8630": "89503", + "BillingState_2813": "NV", + "CustomerId_2099": 21, + "InvoiceDate_0216": "2013-12-04", + "Total_6368": 1.98 + }, + { + "BillingCity_0168": "Mountain View", + "BillingCountry_1540": "USA", + "BillingPostalCode_8630": "94040-111", + "BillingState_2813": "CA", + "CustomerId_2099": 20, + "InvoiceDate_0216": "2013-11-21", + "Total_6368": 0.99 + }, + { + "BillingCity_0168": "Prague", + "BillingCountry_1540": "Czech Republic", + "BillingPostalCode_8630": "14300", + "BillingState_2813": null, + "CustomerId_2099": 6, + "InvoiceDate_0216": "2013-11-13", + "Total_6368": 25.86 + }, + { + "BillingCity_0168": "Buenos Aires", + "BillingCountry_1540": "Argentina", + "BillingPostalCode_8630": "1106", + "BillingState_2813": null, + "CustomerId_2099": 56, + "InvoiceDate_0216": "2013-11-08", + "Total_6368": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/920ec6815f93a6d4/request.json b/test-snapshots/query/920ec6815f93a6d4/request.json new file mode 100644 index 0000000..2bed1f0 --- /dev/null +++ b/test-snapshots/query/920ec6815f93a6d4/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "Total_6368": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCity_0168": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_1540": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_8630": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_2813": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_2099": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_0216": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/922c78a5262f8a7a/expected.json b/test-snapshots/query/922c78a5262f8a7a/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/922c78a5262f8a7a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/922c78a5262f8a7a/request.json b/test-snapshots/query/922c78a5262f8a7a/request.json new file mode 100644 index 0000000..1a4e770 --- /dev/null +++ b/test-snapshots/query/922c78a5262f8a7a/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/923de59d5fdfa70/expected.json b/test-snapshots/query/923de59d5fdfa70/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/923de59d5fdfa70/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/923de59d5fdfa70/request.json b/test-snapshots/query/923de59d5fdfa70/request.json new file mode 100644 index 0000000..2f2ccd5 --- /dev/null +++ b/test-snapshots/query/923de59d5fdfa70/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-05-03" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T5K 2N1" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9252a0799830d575/expected.json b/test-snapshots/query/9252a0799830d575/expected.json new file mode 100644 index 0000000..efe010d --- /dev/null +++ b/test-snapshots/query/9252a0799830d575/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9252a0799830d575/request.json b/test-snapshots/query/9252a0799830d575/request.json new file mode 100644 index 0000000..39403e5 --- /dev/null +++ b/test-snapshots/query/9252a0799830d575/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Leacock" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/92637a347f1db579/expected.json b/test-snapshots/query/92637a347f1db579/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/92637a347f1db579/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92637a347f1db579/request.json b/test-snapshots/query/92637a347f1db579/request.json new file mode 100644 index 0000000..696104d --- /dev/null +++ b/test-snapshots/query/92637a347f1db579/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9281ee031fd3ae88/expected.json b/test-snapshots/query/9281ee031fd3ae88/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9281ee031fd3ae88/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9281ee031fd3ae88/request.json b/test-snapshots/query/9281ee031fd3ae88/request.json new file mode 100644 index 0000000..1c2ff53 --- /dev/null +++ b/test-snapshots/query/9281ee031fd3ae88/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/92aa103d820ff6ca/expected.json b/test-snapshots/query/92aa103d820ff6ca/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/92aa103d820ff6ca/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92aa103d820ff6ca/request.json b/test-snapshots/query/92aa103d820ff6ca/request.json new file mode 100644 index 0000000..21207d4 --- /dev/null +++ b/test-snapshots/query/92aa103d820ff6ca/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "No Prayer For The Dying" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/92b9c9ee7e603c3d/expected.json b/test-snapshots/query/92b9c9ee7e603c3d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/92b9c9ee7e603c3d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92b9c9ee7e603c3d/request.json b/test-snapshots/query/92b9c9ee7e603c3d/request.json new file mode 100644 index 0000000..f51d305 --- /dev/null +++ b/test-snapshots/query/92b9c9ee7e603c3d/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/92e8b2f54a6e7ace/expected.json b/test-snapshots/query/92e8b2f54a6e7ace/expected.json new file mode 100644 index 0000000..6b5c7bc --- /dev/null +++ b/test-snapshots/query/92e8b2f54a6e7ace/expected.json @@ -0,0 +1,118 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 1 + }, + { + "ArtistId_2132": 1 + } + ] + }, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 10 + } + ] + }, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 100 + } + ] + }, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 101 + }, + { + "ArtistId_2132": 101 + } + ] + }, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 102 + } + ] + }, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 103 + } + ] + }, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 104 + } + ] + }, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 105 + } + ] + }, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_2132": 106 + } + ] + }, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92e8b2f54a6e7ace/request.json b/test-snapshots/query/92e8b2f54a6e7ace/request.json new file mode 100644 index 0000000..c82f74d --- /dev/null +++ b/test-snapshots/query/92e8b2f54a6e7ace/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId_2132": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/92e9c3efd7149fd8/expected.json b/test-snapshots/query/92e9c3efd7149fd8/expected.json new file mode 100644 index 0000000..d7548c5 --- /dev/null +++ b/test-snapshots/query/92e9c3efd7149fd8/expected.json @@ -0,0 +1,296 @@ +[ + { + "rows": [ + { + "Address_8150": "1 Infinite Loop", + "Company_9077": "Apple Inc.", + "Country_3317": "USA", + "CustomerId_5585": 19, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Goyer", + "Phone_7777": "+1 (408) 996-1010" + }, + { + "Address_8150": "1 Microsoft Way", + "Company_9077": "Microsoft Corporation", + "Country_3317": "USA", + "CustomerId_5585": 17, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Smith", + "Phone_7777": "+1 (425) 882-8080" + }, + { + "Address_8150": "1033 N Park Ave", + "Company_9077": null, + "Country_3317": "USA", + "CustomerId_5585": 27, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Gray", + "Phone_7777": "+1 (520) 622-4200" + }, + { + "Address_8150": "11, Place Bellecour", + "Company_9077": null, + "Country_3317": "France", + "CustomerId_5585": 41, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Dubois", + "Phone_7777": "+33 04 78 30 30 30" + }, + { + "Address_8150": "110 Raeburn Pl", + "Company_9077": null, + "Country_3317": "United Kingdom", + "CustomerId_5585": 54, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Murray", + "Phone_7777": "+44 0131 315 3300" + }, + { + "Address_8150": "113 Lupus St", + "Company_9077": null, + "Country_3317": "United Kingdom", + "CustomerId_5585": 53, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Hughes", + "Phone_7777": "+44 020 7976 5722" + }, + { + "Address_8150": "12,Community Centre", + "Company_9077": null, + "Country_3317": "India", + "CustomerId_5585": 58, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Pareek", + "Phone_7777": "+91 0124 39883988" + }, + { + "Address_8150": "120 S Orange Ave", + "Company_9077": null, + "Country_3317": "USA", + "CustomerId_5585": 22, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Leacock", + "Phone_7777": "+1 (407) 999-7788" + }, + { + "Address_8150": "1498 rue Bélanger", + "Company_9077": null, + "Country_3317": "Canada", + "CustomerId_5585": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Tremblay", + "Phone_7777": "+1 (514) 721-4711" + }, + { + "Address_8150": "1600 Amphitheatre Parkway", + "Company_9077": "Google Inc.", + "Country_3317": "USA", + "CustomerId_5585": 16, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "LastName_2133": "Harris", + "Phone_7777": "+1 (650) 253-0000" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92e9c3efd7149fd8/request.json b/test-snapshots/query/92e9c3efd7149fd8/request.json new file mode 100644 index 0000000..2ca965f --- /dev/null +++ b/test-snapshots/query/92e9c3efd7149fd8/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_8150": { + "type": "column", + "column": "Address", + "fields": null + }, + "LastName_2133": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Company_9077": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_3317": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_5585": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Phone_7777": { + "type": "column", + "column": "Phone", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/92eac2f52a3eed11/expected.json b/test-snapshots/query/92eac2f52a3eed11/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/92eac2f52a3eed11/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/92eac2f52a3eed11/request.json b/test-snapshots/query/92eac2f52a3eed11/request.json new file mode 100644 index 0000000..8b30727 --- /dev/null +++ b/test-snapshots/query/92eac2f52a3eed11/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/930023c7ccc7b393/expected.json b/test-snapshots/query/930023c7ccc7b393/expected.json new file mode 100644 index 0000000..648729e --- /dev/null +++ b/test-snapshots/query/930023c7ccc7b393/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1020 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1021 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1022 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1023 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1024 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1025 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1026 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1027 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1028 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + }, + "PlaylistId_6328": 5, + "TrackId_3831": 1029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/930023c7ccc7b393/request.json b/test-snapshots/query/930023c7ccc7b393/request.json new file mode 100644 index 0000000..bcf7e69 --- /dev/null +++ b/test-snapshots/query/930023c7ccc7b393/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_6328": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_3831": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/932db719050668a2/expected.json b/test-snapshots/query/932db719050668a2/expected.json new file mode 100644 index 0000000..0c398fb --- /dev/null +++ b/test-snapshots/query/932db719050668a2/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + }, + { + "BillingAddress": "Praça Pio X, 119", + "BillingCity": "Rio de Janeiro", + "BillingCountry": "Brazil", + "BillingPostalCode": "20040-020", + "BillingState": "RJ", + "CustomerId": 12, + "InvoiceDate": "2011-08-25", + "InvoiceId": 221, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/932db719050668a2/request.json b/test-snapshots/query/932db719050668a2/request.json new file mode 100644 index 0000000..02f8fb5 --- /dev/null +++ b/test-snapshots/query/932db719050668a2/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 252 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/93345d45411bf180/expected.json b/test-snapshots/query/93345d45411bf180/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/93345d45411bf180/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/93345d45411bf180/request.json b/test-snapshots/query/93345d45411bf180/request.json new file mode 100644 index 0000000..27d4e31 --- /dev/null +++ b/test-snapshots/query/93345d45411bf180/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Soundtrack" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9356d02647dc42f8/expected.json b/test-snapshots/query/9356d02647dc42f8/expected.json new file mode 100644 index 0000000..411211c --- /dev/null +++ b/test-snapshots/query/9356d02647dc42f8/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "AlbumId_0516": 1, + "Bytes_2282": 11170334, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 343719, + "Name_4496": "For Those About To Rock (We Salute You)", + "TrackId_0689": 1, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 6566314, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 199836, + "Name_4496": "C.O.D.", + "TrackId_0689": 11, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 6599424, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 203102, + "Name_4496": "Snowballed", + "TrackId_0689": 9, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 6706347, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 205688, + "Name_4496": "Night Of The Long Knives", + "TrackId_0689": 13, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 6713451, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 205662, + "Name_4496": "Put The Finger On You", + "TrackId_0689": 6, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 6852860, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 210834, + "Name_4496": "Inject The Venom", + "TrackId_0689": 8, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 7636561, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 233926, + "Name_4496": "Let's Get It Up", + "TrackId_0689": 7, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 8596840, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 263288, + "Name_4496": "Breaking The Rules", + "TrackId_0689": 12, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 8611245, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 263497, + "Name_4496": "Evil Walks", + "TrackId_0689": 10, + "UnitPrice_7061": 0.99 + }, + { + "AlbumId_0516": 1, + "Bytes_2282": 8817038, + "Composer_7789": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_8139": 1, + "Milliseconds_4711": 270863, + "Name_4496": "Spellbound", + "TrackId_0689": 14, + "UnitPrice_7061": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9356d02647dc42f8/request.json b/test-snapshots/query/9356d02647dc42f8/request.json new file mode 100644 index 0000000..a00dced --- /dev/null +++ b/test-snapshots/query/9356d02647dc42f8/request.json @@ -0,0 +1,62 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_0516": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_2282": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_7789": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_8139": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "UnitPrice_7061": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Milliseconds_4711": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_4496": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_0689": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/935ae2d869c23b38/expected.json b/test-snapshots/query/935ae2d869c23b38/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/935ae2d869c23b38/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/935ae2d869c23b38/request.json b/test-snapshots/query/935ae2d869c23b38/request.json new file mode 100644 index 0000000..c4052ae --- /dev/null +++ b/test-snapshots/query/935ae2d869c23b38/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/93c5948bc30e050d/expected.json b/test-snapshots/query/93c5948bc30e050d/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/93c5948bc30e050d/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/93c5948bc30e050d/request.json b/test-snapshots/query/93c5948bc30e050d/request.json new file mode 100644 index 0000000..4f6f02a --- /dev/null +++ b/test-snapshots/query/93c5948bc30e050d/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/93e1a550bca92f66/expected.json b/test-snapshots/query/93e1a550bca92f66/expected.json new file mode 100644 index 0000000..235e337 --- /dev/null +++ b/test-snapshots/query/93e1a550bca92f66/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 226, + "Bytes": 490750393, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622250, + "Name": "Battlestar Galactica: The Story So Far", + "TrackId": 2819, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 462818231, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2620245, + "Name": "A Day In the Life", + "TrackId": 2833, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 489715554, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2563938, + "Name": "A Measure of Salvation", + "TrackId": 2825, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 490375760, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2623875, + "Name": "The Passage", + "TrackId": 2828, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 492700163, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624207, + "Name": "Taking a Break from All Your Worries", + "TrackId": 2831, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 499258498, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2621830, + "Name": "The Son Also Rises", + "TrackId": 2836, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 506896959, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2713755, + "Name": "Hero", + "TrackId": 2826, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 508406153, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624541, + "Name": "Rapture", + "TrackId": 2830, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 514154275, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622372, + "Name": "Maelstrom", + "TrackId": 2835, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 517909587, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2618750, + "Name": "The Eye of Jupiter", + "TrackId": 2829, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/93e1a550bca92f66/request.json b/test-snapshots/query/93e1a550bca92f66/request.json new file mode 100644 index 0000000..841027b --- /dev/null +++ b/test-snapshots/query/93e1a550bca92f66/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/93e7c2b88522d4dc/expected.json b/test-snapshots/query/93e7c2b88522d4dc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/93e7c2b88522d4dc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/93e7c2b88522d4dc/request.json b/test-snapshots/query/93e7c2b88522d4dc/request.json new file mode 100644 index 0000000..ca6b3b4 --- /dev/null +++ b/test-snapshots/query/93e7c2b88522d4dc/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/94172eaa990feb30/expected.json b/test-snapshots/query/94172eaa990feb30/expected.json new file mode 100644 index 0000000..19cd2e5 --- /dev/null +++ b/test-snapshots/query/94172eaa990feb30/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 103, + "InvoiceLineId": 554, + "Quantity": 1, + "TrackId": 3347, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 555, + "Quantity": 1, + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 556, + "Quantity": 1, + "TrackId": 3365, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 557, + "Quantity": 1, + "TrackId": 3374, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 558, + "Quantity": 1, + "TrackId": 3383, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 559, + "Quantity": 1, + "TrackId": 3392, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 560, + "Quantity": 1, + "TrackId": 3401, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 561, + "Quantity": 1, + "TrackId": 3410, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 562, + "Quantity": 1, + "TrackId": 3419, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 563, + "Quantity": 1, + "TrackId": 3428, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94172eaa990feb30/request.json b/test-snapshots/query/94172eaa990feb30/request.json new file mode 100644 index 0000000..5c899c0 --- /dev/null +++ b/test-snapshots/query/94172eaa990feb30/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9425a8caba424166/expected.json b/test-snapshots/query/9425a8caba424166/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9425a8caba424166/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9425a8caba424166/request.json b/test-snapshots/query/9425a8caba424166/request.json new file mode 100644 index 0000000..60ba211 --- /dev/null +++ b/test-snapshots/query/9425a8caba424166/request.json @@ -0,0 +1,126 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/94421fc09a932530/expected.json b/test-snapshots/query/94421fc09a932530/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/94421fc09a932530/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94421fc09a932530/request.json b/test-snapshots/query/94421fc09a932530/request.json new file mode 100644 index 0000000..a21da4f --- /dev/null +++ b/test-snapshots/query/94421fc09a932530/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9449f256e7d34065/expected.json b/test-snapshots/query/9449f256e7d34065/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9449f256e7d34065/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9449f256e7d34065/request.json b/test-snapshots/query/9449f256e7d34065/request.json new file mode 100644 index 0000000..63037fd --- /dev/null +++ b/test-snapshots/query/9449f256e7d34065/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1973-07-01" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/944c4ff7bd766ddd/expected.json b/test-snapshots/query/944c4ff7bd766ddd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/944c4ff7bd766ddd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/944c4ff7bd766ddd/request.json b/test-snapshots/query/944c4ff7bd766ddd/request.json new file mode 100644 index 0000000..5296965 --- /dev/null +++ b/test-snapshots/query/944c4ff7bd766ddd/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/945fae509011cd3c/expected.json b/test-snapshots/query/945fae509011cd3c/expected.json new file mode 100644 index 0000000..28a170c --- /dev/null +++ b/test-snapshots/query/945fae509011cd3c/expected.json @@ -0,0 +1,586 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 100153, + "Name_8284": "Intruder", + "TrackId_5303": 3056 + }, + { + "Milliseconds_1830": 102164, + "Name_8284": "Eruption", + "TrackId_5303": 3064 + }, + { + "Milliseconds_1830": 102556, + "Name_8284": "Eruption", + "TrackId_5303": 3082 + }, + { + "Milliseconds_1830": 102630, + "Name_8284": "Midnight", + "TrackId_5303": 1504 + }, + { + "Milliseconds_1830": 105639, + "Name_8284": "Neworld", + "TrackId_5303": 3092 + }, + { + "Milliseconds_1830": 1070027, + "Name_8284": "We've Got To Get Together/Jingo", + "TrackId_5303": 2429 + }, + { + "Milliseconds_1830": 1071, + "Name_8284": "É Uma Partida De Futebol", + "TrackId_5303": 2461 + }, + { + "Milliseconds_1830": 108435, + "Name_8284": "Hill of the Skull", + "TrackId_5303": 1501 + }, + { + "Milliseconds_1830": 1116734, + "Name_8284": "Dazed And Confused", + "TrackId_5303": 1581 + }, + { + "Milliseconds_1830": 112613, + "Name_8284": "Right On Time", + "TrackId_5303": 2404 + } + ] + }, + "GenreId": 1, + "Name": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 100858, + "Name_8284": "Seus Amigos", + "TrackId_5303": 2247 + }, + { + "Milliseconds_1830": 114520, + "Name_8284": "Danny Boy, Danny Boy", + "TrackId_5303": 3308 + }, + { + "Milliseconds_1830": 121704, + "Name_8284": "Quem Me Cobrou?", + "TrackId_5303": 2252 + }, + { + "Milliseconds_1830": 121808, + "Name_8284": "Nega Do Cabelo Duro", + "TrackId_5303": 2250 + }, + { + "Milliseconds_1830": 151536, + "Name_8284": "Hip Hop Rio", + "TrackId_5303": 2240 + }, + { + "Milliseconds_1830": 155611, + "Name_8284": "House Of Pain Anthem", + "TrackId_5303": 3307 + }, + { + "Milliseconds_1830": 163030, + "Name_8284": "Life Goes On", + "TrackId_5303": 3313 + }, + { + "Milliseconds_1830": 165146, + "Name_8284": "100% HardCore", + "TrackId_5303": 2242 + }, + { + "Milliseconds_1830": 170213, + "Name_8284": "One For The Road", + "TrackId_5303": 3314 + }, + { + "Milliseconds_1830": 170475, + "Name_8284": "Come And Get Some Of This", + "TrackId_5303": 3312 + } + ] + }, + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 101293, + "Name_8284": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId_5303": 3452 + }, + { + "Milliseconds_1830": 110266, + "Name_8284": "Concert pour 4 Parties de V**les, H. 545: I. Prelude", + "TrackId_5303": 3483 + }, + { + "Milliseconds_1830": 120000, + "Name_8284": "Music for the Royal Fireworks, HWV351 (1749): La Réjouissance", + "TrackId_5303": 3449 + }, + { + "Milliseconds_1830": 120463, + "Name_8284": "Aria Mit 30 Veränderungen, BWV 988 \"Goldberg Variations\": Aria", + "TrackId_5303": 3408 + }, + { + "Milliseconds_1830": 132932, + "Name_8284": "Carmen: Overture", + "TrackId_5303": 3447 + }, + { + "Milliseconds_1830": 133768, + "Name_8284": "Sing Joyfully", + "TrackId_5303": 3492 + }, + { + "Milliseconds_1830": 139200, + "Name_8284": "String Quartet No. 12 in C Minor, D. 703 \"Quartettsatz\": II. Andante - Allegro assai", + "TrackId_5303": 3500 + }, + { + "Milliseconds_1830": 142081, + "Name_8284": "Music for the Funeral of Queen Mary: VI. \"Thou Knowest, Lord, the Secrets of Our Hearts\"", + "TrackId_5303": 3488 + }, + { + "Milliseconds_1830": 143288, + "Name_8284": "Suite for Solo Cello No. 1 in G Major, BWV 1007: I. Prélude", + "TrackId_5303": 3409 + }, + { + "Milliseconds_1830": 153901, + "Name_8284": "Toccata and Fugue in D Minor, BWV 565: I. Toccata", + "TrackId_5303": 3430 + } + ] + }, + "GenreId": 24, + "Name": "Classical" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 103157, + "Name_8284": "FX", + "TrackId_5303": 159 + }, + { + "Milliseconds_1830": 115931, + "Name_8284": "Intro", + "TrackId_5303": 1352 + }, + { + "Milliseconds_1830": 128339, + "Name_8284": "This Cocaine Makes Me Feel Like I'm On This Song", + "TrackId_5303": 2559 + }, + { + "Milliseconds_1830": 131787, + "Name_8284": "Cigaro", + "TrackId_5303": 2557 + }, + { + "Milliseconds_1830": 137717, + "Name_8284": "Stone Cold Crazy", + "TrackId_5303": 1822 + }, + { + "Milliseconds_1830": 144195, + "Name_8284": "Breaking The Law (Live)", + "TrackId_5303": 1548 + }, + { + "Milliseconds_1830": 149315, + "Name_8284": "Die Die My Darling", + "TrackId_5303": 412 + }, + { + "Milliseconds_1830": 149655, + "Name_8284": "St. Vitus Dance", + "TrackId_5303": 164 + }, + { + "Milliseconds_1830": 155428, + "Name_8284": "Free Speech For The Dumb", + "TrackId_5303": 408 + }, + { + "Milliseconds_1830": 158432, + "Name_8284": "Dance", + "TrackId_5303": 1950 + } + ] + }, + "GenreId": 3, + "Name": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 104986, + "Name_8284": "Bichos Escrotos (Vinheta)", + "TrackId_5303": 2795 + }, + { + "Milliseconds_1830": 112352, + "Name_8284": "Last Chance", + "TrackId_5303": 1466 + }, + { + "Milliseconds_1830": 11650, + "Name_8284": "The Real Problem", + "TrackId_5303": 172 + }, + { + "Milliseconds_1830": 118726, + "Name_8284": "White Riot", + "TrackId_5303": 2591 + }, + { + "Milliseconds_1830": 119040, + "Name_8284": "Home Sick Home", + "TrackId_5303": 933 + }, + { + "Milliseconds_1830": 120528, + "Name_8284": "She's A Rebel", + "TrackId_5303": 1140 + }, + { + "Milliseconds_1830": 121652, + "Name_8284": "Papeau Nuky Doe", + "TrackId_5303": 2336 + }, + { + "Milliseconds_1830": 125152, + "Name_8284": "Panis Et Circenses", + "TrackId_5303": 534 + }, + { + "Milliseconds_1830": 126040, + "Name_8284": "Merry Christmas", + "TrackId_5303": 2337 + }, + { + "Milliseconds_1830": 128757, + "Name_8284": "Naked In Front Of The Computer", + "TrackId_5303": 926 + } + ] + }, + "GenreId": 4, + "Name": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 105064, + "Name_8284": "Até Que Enfim Encontrei Você", + "TrackId_5303": 2755 + }, + { + "Milliseconds_1830": 105586, + "Name_8284": "Risoflora", + "TrackId_5303": 279 + }, + { + "Milliseconds_1830": 107206, + "Name_8284": "Feirinha da Pavuna/Luz do Repente/Bagaço da Laranja", + "TrackId_5303": 3154 + }, + { + "Milliseconds_1830": 115461, + "Name_8284": "Salve Nossa Senhora", + "TrackId_5303": 2760 + }, + { + "Milliseconds_1830": 116767, + "Name_8284": "As Rosas Não Falam (Beth Carvalho)", + "TrackId_5303": 671 + }, + { + "Milliseconds_1830": 116767, + "Name_8284": "Principiando/Decolagem", + "TrackId_5303": 983 + }, + { + "Milliseconds_1830": 119196, + "Name_8284": "Pela Luz Dos Olhos Teus", + "TrackId_5303": 3117 + }, + { + "Milliseconds_1830": 126615, + "Name_8284": "Primavera", + "TrackId_5303": 2751 + }, + { + "Milliseconds_1830": 126615, + "Name_8284": "Um Satélite Na Cabeça", + "TrackId_5303": 258 + }, + { + "Milliseconds_1830": 128078, + "Name_8284": "Always Be All Right", + "TrackId_5303": 1529 + } + ] + }, + "GenreId": 7, + "Name": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 105926, + "Name_8284": "The Ides Of March", + "TrackId_5303": 1277 + }, + { + "Milliseconds_1830": 174471, + "Name_8284": "Wrathchild", + "TrackId_5303": 1278 + }, + { + "Milliseconds_1830": 183666, + "Name_8284": "Wrathchild", + "TrackId_5303": 1300 + }, + { + "Milliseconds_1830": 187141, + "Name_8284": "Genghis Khan", + "TrackId_5303": 1281 + }, + { + "Milliseconds_1830": 200150, + "Name_8284": "Purgatory", + "TrackId_5303": 1285 + }, + { + "Milliseconds_1830": 203049, + "Name_8284": "Another Life", + "TrackId_5303": 1280 + }, + { + "Milliseconds_1830": 228623, + "Name_8284": "Rainmaker", + "TrackId_5303": 1246 + }, + { + "Milliseconds_1830": 232515, + "Name_8284": "Innocent Exile", + "TrackId_5303": 1282 + }, + { + "Milliseconds_1830": 232777, + "Name_8284": "Wildest Dreams", + "TrackId_5303": 1245 + }, + { + "Milliseconds_1830": 258377, + "Name_8284": "Murders In The Rue Morgue", + "TrackId_5303": 1279 + } + ] + }, + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 106266, + "Name_8284": "Good Golly Miss Molly", + "TrackId_5303": 121 + }, + { + "Milliseconds_1830": 106396, + "Name_8284": "Long Tall Sally", + "TrackId_5303": 112 + }, + { + "Milliseconds_1830": 107807, + "Name_8284": "20 Flight Rock", + "TrackId_5303": 122 + }, + { + "Milliseconds_1830": 116088, + "Name_8284": "Bad Boy", + "TrackId_5303": 113 + }, + { + "Milliseconds_1830": 137639, + "Name_8284": "Please Mr. Postman", + "TrackId_5303": 115 + }, + { + "Milliseconds_1830": 140199, + "Name_8284": "C'Mon Everybody", + "TrackId_5303": 116 + }, + { + "Milliseconds_1830": 141923, + "Name_8284": "Rock 'N' Roll Music", + "TrackId_5303": 117 + }, + { + "Milliseconds_1830": 143595, + "Name_8284": "Roadrunner", + "TrackId_5303": 119 + }, + { + "Milliseconds_1830": 143830, + "Name_8284": "Carol", + "TrackId_5303": 120 + }, + { + "Milliseconds_1830": 147591, + "Name_8284": "Money", + "TrackId_5303": 111 + } + ] + }, + "GenreId": 5, + "Name": "Rock And Roll" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 112712, + "Name_8284": "LOST Season 4 Trailer", + "TrackId_5303": 3339 + }, + { + "Milliseconds_1830": 2478041, + "Name_8284": "Live Together, Die Alone, Pt. 1", + "TrackId_5303": 2922 + }, + { + "Milliseconds_1830": 2492867, + "Name_8284": "Past, Present, and Future", + "TrackId_5303": 3337 + }, + { + "Milliseconds_1830": 2497956, + "Name_8284": "There's No Place Like Home, Pt. 2", + "TrackId_5303": 3363 + }, + { + "Milliseconds_1830": 2533575, + "Name_8284": "Hiros", + "TrackId_5303": 2843 + }, + { + "Milliseconds_1830": 2561394, + "Name_8284": "Catch-22", + "TrackId_5303": 2909 + }, + { + "Milliseconds_1830": 2571154, + "Name_8284": "Don't Look Back", + "TrackId_5303": 2840 + }, + { + "Milliseconds_1830": 2573031, + "Name_8284": "Better Halves", + "TrackId_5303": 2844 + }, + { + "Milliseconds_1830": 2582957, + "Name_8284": "There's No Place Like Home, Pt. 3", + "TrackId_5303": 3364 + }, + { + "Milliseconds_1830": 2585794, + "Name_8284": ".07%", + "TrackId_5303": 3166 + } + ] + }, + "GenreId": 21, + "Name": "Drama" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Milliseconds_1830": 118804, + "Name_8284": "Cuando Eu For Pro Ceu", + "TrackId_5303": 1541 + }, + { + "Milliseconds_1830": 180924, + "Name_8284": "Cafezinho", + "TrackId_5303": 1544 + }, + { + "Milliseconds_1830": 182308, + "Name_8284": "No Futuro", + "TrackId_5303": 1535 + }, + { + "Milliseconds_1830": 190484, + "Name_8284": "Choramingando", + "TrackId_5303": 1533 + }, + { + "Milliseconds_1830": 194873, + "Name_8284": "É Fogo", + "TrackId_5303": 1963 + }, + { + "Milliseconds_1830": 203415, + "Name_8284": "Do Nosso Amor", + "TrackId_5303": 1542 + }, + { + "Milliseconds_1830": 206811, + "Name_8284": "Noite Negra", + "TrackId_5303": 1961 + }, + { + "Milliseconds_1830": 208457, + "Name_8284": "Borogodo", + "TrackId_5303": 1543 + }, + { + "Milliseconds_1830": 213263, + "Name_8284": "Papelão", + "TrackId_5303": 1540 + }, + { + "Milliseconds_1830": 219271, + "Name_8284": "Dois Índios", + "TrackId_5303": 1960 + } + ] + }, + "GenreId": 16, + "Name": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/945fae509011cd3c/request.json b/test-snapshots/query/945fae509011cd3c/request.json new file mode 100644 index 0000000..263b011 --- /dev/null +++ b/test-snapshots/query/945fae509011cd3c/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "TrackId_5303": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Name_8284": { + "type": "column", + "column": "Name", + "fields": null + }, + "Milliseconds_1830": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/948515d58de09136/expected.json b/test-snapshots/query/948515d58de09136/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/948515d58de09136/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/948515d58de09136/request.json b/test-snapshots/query/948515d58de09136/request.json new file mode 100644 index 0000000..5633f0f --- /dev/null +++ b/test-snapshots/query/948515d58de09136/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/94861eca10cef55e/expected.json b/test-snapshots/query/94861eca10cef55e/expected.json new file mode 100644 index 0000000..983b42e --- /dev/null +++ b/test-snapshots/query/94861eca10cef55e/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_8978": 18 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + }, + { + "PlaylistId_8978": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94861eca10cef55e/request.json b/test-snapshots/query/94861eca10cef55e/request.json new file mode 100644 index 0000000..0bbbd9b --- /dev/null +++ b/test-snapshots/query/94861eca10cef55e/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8978": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9487946aca04588d/expected.json b/test-snapshots/query/9487946aca04588d/expected.json new file mode 100644 index 0000000..1e44755 --- /dev/null +++ b/test-snapshots/query/9487946aca04588d/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_4984": "3 Chatham Street", + "City_0764": "Dublin", + "Company_0839": null, + "Country_0797": "Ireland", + "CustomerId_0950": 46, + "Email_1214": "hughoreilly@apple.ie", + "Phone_4210": "+353 01 6792424", + "PostalCode_0723": null, + "State_6726": "Dublin", + "SupportRepId_6014": 3 + }, + { + "Address_4984": "Rua da Assunção 53", + "City_0764": "Lisbon", + "Company_0839": null, + "Country_0797": "Portugal", + "CustomerId_0950": 34, + "Email_1214": "jfernandes@yahoo.pt", + "Phone_4210": "+351 (213) 466-111", + "PostalCode_0723": null, + "State_6726": null, + "SupportRepId_6014": 4 + }, + { + "Address_4984": "Rua dos Campeões Europeus de Viena, 4350", + "City_0764": "Porto", + "Company_0839": null, + "Country_0797": "Portugal", + "CustomerId_0950": 35, + "Email_1214": "masampaio@sapo.pt", + "Phone_4210": "+351 (225) 022-448", + "PostalCode_0723": null, + "State_6726": null, + "SupportRepId_6014": 4 + }, + { + "Address_4984": "Calle Lira, 198", + "City_0764": "Santiago", + "Company_0839": null, + "Country_0797": "Chile", + "CustomerId_0950": 57, + "Email_1214": "luisrojas@yahoo.cl", + "Phone_4210": "+56 (0)2 635 4444", + "PostalCode_0723": null, + "State_6726": null, + "SupportRepId_6014": 5 + }, + { + "Address_4984": "Ordynacka 10", + "City_0764": "Warsaw", + "Company_0839": null, + "Country_0797": "Poland", + "CustomerId_0950": 49, + "Email_1214": "stanisław.wójcik@wp.pl", + "Phone_4210": "+48 22 828 37 39", + "PostalCode_0723": "00-358", + "State_6726": null, + "SupportRepId_6014": 4 + }, + { + "Address_4984": "Via Degli Scipioni, 43", + "City_0764": "Rome", + "Company_0839": null, + "Country_0797": "Italy", + "CustomerId_0950": 47, + "Email_1214": "lucas.mancini@yahoo.it", + "Phone_4210": "+39 06 39733434", + "PostalCode_0723": "00192", + "State_6726": "RM", + "SupportRepId_6014": 5 + }, + { + "Address_4984": "Porthaninkatu 9", + "City_0764": "Helsinki", + "Company_0839": null, + "Country_0797": "Finland", + "CustomerId_0950": 44, + "Email_1214": "terhi.hamalainen@apple.fi", + "Phone_4210": "+358 09 870 2000", + "PostalCode_0723": "00530", + "State_6726": null, + "SupportRepId_6014": 3 + }, + { + "Address_4984": "Rua Dr. Falcão Filho, 155", + "City_0764": "São Paulo", + "Company_0839": "Woodstock Discos", + "Country_0797": "Brazil", + "CustomerId_0950": 10, + "Email_1214": "eduardo@woodstock.com.br", + "Phone_4210": "+55 (11) 3033-5446", + "PostalCode_0723": "01007-010", + "State_6726": "SP", + "SupportRepId_6014": 4 + }, + { + "Address_4984": "Av. Paulista, 2022", + "City_0764": "São Paulo", + "Company_0839": "Banco do Brasil S.A.", + "Country_0797": "Brazil", + "CustomerId_0950": 11, + "Email_1214": "alero@uol.com.br", + "Phone_4210": "+55 (11) 3055-3278", + "PostalCode_0723": "01310-200", + "State_6726": "SP", + "SupportRepId_6014": 5 + }, + { + "Address_4984": "Ullevålsveien 14", + "City_0764": "Oslo", + "Company_0839": null, + "Country_0797": "Norway", + "CustomerId_0950": 4, + "Email_1214": "bjorn.hansen@yahoo.no", + "Phone_4210": "+47 22 44 22 22", + "PostalCode_0723": "0171", + "State_6726": null, + "SupportRepId_6014": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9487946aca04588d/request.json b/test-snapshots/query/9487946aca04588d/request.json new file mode 100644 index 0000000..b2ba304 --- /dev/null +++ b/test-snapshots/query/9487946aca04588d/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_4984": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_0764": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_0839": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_0797": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_0950": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_1214": { + "type": "column", + "column": "Email", + "fields": null + }, + "SupportRepId_6014": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "PostalCode_0723": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_6726": { + "type": "column", + "column": "State", + "fields": null + }, + "Phone_4210": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9487c149d0d42f7d/expected.json b/test-snapshots/query/9487c149d0d42f7d/expected.json new file mode 100644 index 0000000..7d8b590 --- /dev/null +++ b/test-snapshots/query/9487c149d0d42f7d/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 180, + "ArtistId": 118, + "Title": "Riot Act" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9487c149d0d42f7d/request.json b/test-snapshots/query/9487c149d0d42f7d/request.json new file mode 100644 index 0000000..3b78287 --- /dev/null +++ b/test-snapshots/query/9487c149d0d42f7d/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 270863 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/94b12791ce290904/expected.json b/test-snapshots/query/94b12791ce290904/expected.json new file mode 100644 index 0000000..ba1bdbe --- /dev/null +++ b/test-snapshots/query/94b12791ce290904/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 108, + "ArtistId": 90, + "Title": "Rock In Rio [CD1]" + }, + { + "AlbumId": 121, + "ArtistId": 95, + "Title": "Surfing with the Alien (Remastered)" + }, + { + "AlbumId": 122, + "ArtistId": 46, + "Title": "Jorge Ben Jor 25 Anos" + }, + { + "AlbumId": 123, + "ArtistId": 96, + "Title": "Jota Quest-1995" + }, + { + "AlbumId": 125, + "ArtistId": 98, + "Title": "Living After Midnight" + }, + { + "AlbumId": 14, + "ArtistId": 11, + "Title": "Alcohol Fueled Brewtality Live! [Disc 1]" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94b12791ce290904/request.json b/test-snapshots/query/94b12791ce290904/request.json new file mode 100644 index 0000000..6edfd41 --- /dev/null +++ b/test-snapshots/query/94b12791ce290904/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/94c1cb78bddd4e8d/expected.json b/test-snapshots/query/94c1cb78bddd4e8d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/94c1cb78bddd4e8d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94c1cb78bddd4e8d/request.json b/test-snapshots/query/94c1cb78bddd4e8d/request.json new file mode 100644 index 0000000..dd38035 --- /dev/null +++ b/test-snapshots/query/94c1cb78bddd4e8d/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/94ce58260e4e02c1/expected.json b/test-snapshots/query/94ce58260e4e02c1/expected.json new file mode 100644 index 0000000..b49c69d --- /dev/null +++ b/test-snapshots/query/94ce58260e4e02c1/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1008 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94ce58260e4e02c1/request.json b/test-snapshots/query/94ce58260e4e02c1/request.json new file mode 100644 index 0000000..769f302 --- /dev/null +++ b/test-snapshots/query/94ce58260e4e02c1/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/94e2fd62b9d6523a/expected.json b/test-snapshots/query/94e2fd62b9d6523a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/94e2fd62b9d6523a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94e2fd62b9d6523a/request.json b/test-snapshots/query/94e2fd62b9d6523a/request.json new file mode 100644 index 0000000..86af987 --- /dev/null +++ b/test-snapshots/query/94e2fd62b9d6523a/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "EH4 1HH" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/94f3e0bee000d323/expected.json b/test-snapshots/query/94f3e0bee000d323/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/94f3e0bee000d323/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/94f3e0bee000d323/request.json b/test-snapshots/query/94f3e0bee000d323/request.json new file mode 100644 index 0000000..1218ee8 --- /dev/null +++ b/test-snapshots/query/94f3e0bee000d323/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/953ab39a8d17f4a5/expected.json b/test-snapshots/query/953ab39a8d17f4a5/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/953ab39a8d17f4a5/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/953ab39a8d17f4a5/request.json b/test-snapshots/query/953ab39a8d17f4a5/request.json new file mode 100644 index 0000000..da07e3d --- /dev/null +++ b/test-snapshots/query/953ab39a8d17f4a5/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/954b02913158b49/expected.json b/test-snapshots/query/954b02913158b49/expected.json new file mode 100644 index 0000000..a1543ca --- /dev/null +++ b/test-snapshots/query/954b02913158b49/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/954b02913158b49/request.json b/test-snapshots/query/954b02913158b49/request.json new file mode 100644 index 0000000..c4dfe7a --- /dev/null +++ b/test-snapshots/query/954b02913158b49/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/955804d2be361ced/expected.json b/test-snapshots/query/955804d2be361ced/expected.json new file mode 100644 index 0000000..e228533 --- /dev/null +++ b/test-snapshots/query/955804d2be361ced/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_1108": 25, + "Name_6596": "Opera" + }, + { + "GenreId_1108": 24, + "Name_6596": "Classical" + }, + { + "GenreId_1108": 23, + "Name_6596": "Alternative" + }, + { + "GenreId_1108": 22, + "Name_6596": "Comedy" + }, + { + "GenreId_1108": 21, + "Name_6596": "Drama" + }, + { + "GenreId_1108": 20, + "Name_6596": "Sci Fi & Fantasy" + }, + { + "GenreId_1108": 19, + "Name_6596": "TV Shows" + }, + { + "GenreId_1108": 18, + "Name_6596": "Science Fiction" + }, + { + "GenreId_1108": 17, + "Name_6596": "Hip Hop/Rap" + }, + { + "GenreId_1108": 16, + "Name_6596": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/955804d2be361ced/request.json b/test-snapshots/query/955804d2be361ced/request.json new file mode 100644 index 0000000..74d7961 --- /dev/null +++ b/test-snapshots/query/955804d2be361ced/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_1108": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_6596": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/957a1bef34e31bbf/expected.json b/test-snapshots/query/957a1bef34e31bbf/expected.json new file mode 100644 index 0000000..ef63a63 --- /dev/null +++ b/test-snapshots/query/957a1bef34e31bbf/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_2129": 5 + }, + { + "MediaTypeId_2129": 4 + }, + { + "MediaTypeId_2129": 3 + }, + { + "MediaTypeId_2129": 2 + }, + { + "MediaTypeId_2129": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/957a1bef34e31bbf/request.json b/test-snapshots/query/957a1bef34e31bbf/request.json new file mode 100644 index 0000000..0365ac9 --- /dev/null +++ b/test-snapshots/query/957a1bef34e31bbf/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_2129": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/959c0d1ed9ed8db4/expected.json b/test-snapshots/query/959c0d1ed9ed8db4/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/959c0d1ed9ed8db4/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/959c0d1ed9ed8db4/request.json b/test-snapshots/query/959c0d1ed9ed8db4/request.json new file mode 100644 index 0000000..f211f76 --- /dev/null +++ b/test-snapshots/query/959c0d1ed9ed8db4/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/959fa03325b92950/expected.json b/test-snapshots/query/959fa03325b92950/expected.json new file mode 100644 index 0000000..98d694c --- /dev/null +++ b/test-snapshots/query/959fa03325b92950/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/959fa03325b92950/request.json b/test-snapshots/query/959fa03325b92950/request.json new file mode 100644 index 0000000..4733d3b --- /dev/null +++ b/test-snapshots/query/959fa03325b92950/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/95b7bb4c8ed29fde/expected.json b/test-snapshots/query/95b7bb4c8ed29fde/expected.json new file mode 100644 index 0000000..22fde47 --- /dev/null +++ b/test-snapshots/query/95b7bb4c8ed29fde/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "Name_4593": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/95b7bb4c8ed29fde/request.json b/test-snapshots/query/95b7bb4c8ed29fde/request.json new file mode 100644 index 0000000..76239c5 --- /dev/null +++ b/test-snapshots/query/95b7bb4c8ed29fde/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "Name_4593": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/95e71a7f0845dbf8/expected.json b/test-snapshots/query/95e71a7f0845dbf8/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/95e71a7f0845dbf8/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/95e71a7f0845dbf8/request.json b/test-snapshots/query/95e71a7f0845dbf8/request.json new file mode 100644 index 0000000..7e02235 --- /dev/null +++ b/test-snapshots/query/95e71a7f0845dbf8/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/960244354de4e995/expected.json b/test-snapshots/query/960244354de4e995/expected.json new file mode 100644 index 0000000..041b810 --- /dev/null +++ b/test-snapshots/query/960244354de4e995/expected.json @@ -0,0 +1,105 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/960244354de4e995/request.json b/test-snapshots/query/960244354de4e995/request.json new file mode 100644 index 0000000..9acc248 --- /dev/null +++ b/test-snapshots/query/960244354de4e995/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/96051ba4e68b7f41/expected.json b/test-snapshots/query/96051ba4e68b7f41/expected.json new file mode 100644 index 0000000..0777632 --- /dev/null +++ b/test-snapshots/query/96051ba4e68b7f41/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_2975": 1, + "InvoiceLineId_1343": 1, + "Quantity_0825": 1, + "TrackId_8846": 2, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 1, + "InvoiceLineId_1343": 2, + "Quantity_0825": 1, + "TrackId_8846": 4, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 2, + "InvoiceLineId_1343": 3, + "Quantity_0825": 1, + "TrackId_8846": 6, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 2, + "InvoiceLineId_1343": 4, + "Quantity_0825": 1, + "TrackId_8846": 8, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 2, + "InvoiceLineId_1343": 5, + "Quantity_0825": 1, + "TrackId_8846": 10, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 2, + "InvoiceLineId_1343": 6, + "Quantity_0825": 1, + "TrackId_8846": 12, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 3, + "InvoiceLineId_1343": 10, + "Quantity_0825": 1, + "TrackId_8846": 28, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 3, + "InvoiceLineId_1343": 11, + "Quantity_0825": 1, + "TrackId_8846": 32, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 3, + "InvoiceLineId_1343": 12, + "Quantity_0825": 1, + "TrackId_8846": 36, + "UnitPrice_0092": 0.99 + }, + { + "InvoiceId_2975": 3, + "InvoiceLineId_1343": 7, + "Quantity_0825": 1, + "TrackId_8846": 16, + "UnitPrice_0092": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/96051ba4e68b7f41/request.json b/test-snapshots/query/96051ba4e68b7f41/request.json new file mode 100644 index 0000000..acb2725 --- /dev/null +++ b/test-snapshots/query/96051ba4e68b7f41/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_2975": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_1343": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_0825": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_8846": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_0092": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/961168f0b5f648a6/expected.json b/test-snapshots/query/961168f0b5f648a6/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/961168f0b5f648a6/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/961168f0b5f648a6/request.json b/test-snapshots/query/961168f0b5f648a6/request.json new file mode 100644 index 0000000..72dfd1a --- /dev/null +++ b/test-snapshots/query/961168f0b5f648a6/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/963a7bbb41a1c7c/expected.json b/test-snapshots/query/963a7bbb41a1c7c/expected.json new file mode 100644 index 0000000..5086624 --- /dev/null +++ b/test-snapshots/query/963a7bbb41a1c7c/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_2830": 275, + "Name_9645": "Philip Glass Ensemble" + }, + { + "ArtistId_2830": 274, + "Name_9645": "Nash Ensemble" + }, + { + "ArtistId_2830": 273, + "Name_9645": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "ArtistId_2830": 272, + "Name_9645": "Emerson String Quartet" + }, + { + "ArtistId_2830": 271, + "Name_9645": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "ArtistId_2830": 270, + "Name_9645": "Gerald Moore" + }, + { + "ArtistId_2830": 269, + "Name_9645": "Michele Campanella" + }, + { + "ArtistId_2830": 268, + "Name_9645": "Itzhak Perlman" + }, + { + "ArtistId_2830": 267, + "Name_9645": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "ArtistId_2830": 266, + "Name_9645": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/963a7bbb41a1c7c/request.json b/test-snapshots/query/963a7bbb41a1c7c/request.json new file mode 100644 index 0000000..7b0861f --- /dev/null +++ b/test-snapshots/query/963a7bbb41a1c7c/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_2830": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_9645": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9645b4db85046e15/expected.json b/test-snapshots/query/9645b4db85046e15/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/9645b4db85046e15/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9645b4db85046e15/request.json b/test-snapshots/query/9645b4db85046e15/request.json new file mode 100644 index 0000000..b618752 --- /dev/null +++ b/test-snapshots/query/9645b4db85046e15/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Inject The Venom" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/965344c74da775d1/expected.json b/test-snapshots/query/965344c74da775d1/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/965344c74da775d1/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/965344c74da775d1/request.json b/test-snapshots/query/965344c74da775d1/request.json new file mode 100644 index 0000000..99ccc31 --- /dev/null +++ b/test-snapshots/query/965344c74da775d1/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9658e5a0916c3c6c/expected.json b/test-snapshots/query/9658e5a0916c3c6c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9658e5a0916c3c6c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9658e5a0916c3c6c/request.json b/test-snapshots/query/9658e5a0916c3c6c/request.json new file mode 100644 index 0000000..816faae --- /dev/null +++ b/test-snapshots/query/9658e5a0916c3c6c/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9658eb95f554f6a5/expected.json b/test-snapshots/query/9658eb95f554f6a5/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/9658eb95f554f6a5/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9658eb95f554f6a5/request.json b/test-snapshots/query/9658eb95f554f6a5/request.json new file mode 100644 index 0000000..47c0f27 --- /dev/null +++ b/test-snapshots/query/9658eb95f554f6a5/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/96817930f100f8db/expected.json b/test-snapshots/query/96817930f100f8db/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/96817930f100f8db/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/96817930f100f8db/request.json b/test-snapshots/query/96817930f100f8db/request.json new file mode 100644 index 0000000..8116cbd --- /dev/null +++ b/test-snapshots/query/96817930f100f8db/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9695f7f46551d90e/expected.json b/test-snapshots/query/9695f7f46551d90e/expected.json new file mode 100644 index 0000000..166b6f2 --- /dev/null +++ b/test-snapshots/query/9695f7f46551d90e/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_0332": 1, + "TrackId_2983": 1 + }, + { + "PlaylistId_0332": 17, + "TrackId_2983": 1 + }, + { + "PlaylistId_0332": 8, + "TrackId_2983": 1 + }, + { + "PlaylistId_0332": 1, + "TrackId_2983": 2 + }, + { + "PlaylistId_0332": 17, + "TrackId_2983": 2 + }, + { + "PlaylistId_0332": 8, + "TrackId_2983": 2 + }, + { + "PlaylistId_0332": 1, + "TrackId_2983": 3 + }, + { + "PlaylistId_0332": 17, + "TrackId_2983": 3 + }, + { + "PlaylistId_0332": 5, + "TrackId_2983": 3 + }, + { + "PlaylistId_0332": 8, + "TrackId_2983": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9695f7f46551d90e/request.json b/test-snapshots/query/9695f7f46551d90e/request.json new file mode 100644 index 0000000..d0fa1e8 --- /dev/null +++ b/test-snapshots/query/9695f7f46551d90e/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_0332": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_2983": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/96bdd82c2a86849d/expected.json b/test-snapshots/query/96bdd82c2a86849d/expected.json new file mode 100644 index 0000000..f940431 --- /dev/null +++ b/test-snapshots/query/96bdd82c2a86849d/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/96bdd82c2a86849d/request.json b/test-snapshots/query/96bdd82c2a86849d/request.json new file mode 100644 index 0000000..b2e500b --- /dev/null +++ b/test-snapshots/query/96bdd82c2a86849d/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/96c5f9b35d98c754/expected.json b/test-snapshots/query/96c5f9b35d98c754/expected.json new file mode 100644 index 0000000..d54fc75 --- /dev/null +++ b/test-snapshots/query/96c5f9b35d98c754/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + }, + { + "PlaylistId_8476": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/96c5f9b35d98c754/request.json b/test-snapshots/query/96c5f9b35d98c754/request.json new file mode 100644 index 0000000..5c9f188 --- /dev/null +++ b/test-snapshots/query/96c5f9b35d98c754/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8476": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/96d1b101012abd32/expected.json b/test-snapshots/query/96d1b101012abd32/expected.json new file mode 100644 index 0000000..8261e68 --- /dev/null +++ b/test-snapshots/query/96d1b101012abd32/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/96d1b101012abd32/request.json b/test-snapshots/query/96d1b101012abd32/request.json new file mode 100644 index 0000000..924a194 --- /dev/null +++ b/test-snapshots/query/96d1b101012abd32/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/96d20820684faeb1/expected.json b/test-snapshots/query/96d20820684faeb1/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/96d20820684faeb1/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/96d20820684faeb1/request.json b/test-snapshots/query/96d20820684faeb1/request.json new file mode 100644 index 0000000..9a1f26f --- /dev/null +++ b/test-snapshots/query/96d20820684faeb1/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "85719" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/973fe8ce33b9ec6a/expected.json b/test-snapshots/query/973fe8ce33b9ec6a/expected.json new file mode 100644 index 0000000..e4a377c --- /dev/null +++ b/test-snapshots/query/973fe8ce33b9ec6a/expected.json @@ -0,0 +1,1122 @@ +[ + { + "rows": [ + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5339931, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 222380, + "Name": "Cochise", + "TrackId": 85, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5988186, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 249391, + "Name": "What You Are", + "TrackId": 88, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6321091, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263262, + "Name": "Set It Off", + "TrackId": 90, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6672176, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 277890, + "Name": "Show Me How to Live", + "TrackId": 86, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6709793, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 279457, + "Name": "Gasoline", + "TrackId": 87, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7059624, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294034, + "Name": "Like a Stone", + "TrackId": 89, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7193162, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 299598, + "Name": "Getaway Car", + "TrackId": 97, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7289084, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 303595, + "Name": "Light My Way", + "TrackId": 96, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10589917, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 441155, + "Name": "Phantom Of The Opera", + "TrackId": 1304, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 1154488, + "Composer": null, + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 48013, + "Name": "Intro- Churchill S Speech", + "TrackId": 1287, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4410181, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 183666, + "Name": "Wrathchild", + "TrackId": 1300, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 103, + "Bytes": 10361452, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 431542, + "Name": "Fear Of The Dark", + "TrackId": 1314, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 11479913, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 478145, + "Name": "The Evil That Men Do", + "TrackId": 1312, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 4182963, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 174106, + "Name": "Wrathchild", + "TrackId": 1307, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5118995, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 213106, + "Name": "Can I Play With Madness", + "TrackId": 1309, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5599853, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233142, + "Name": "Be Quick Or Be Dead", + "TrackId": 1305, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 5947795, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 247640, + "Name": "Tailgunner", + "TrackId": 1311, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 6831163, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 284447, + "Name": "From Here To Eternity", + "TrackId": 1308, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 7060625, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294008, + "Name": "The Number Of The Beast", + "TrackId": 1306, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 8091301, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 336953, + "Name": "Wasting Love", + "TrackId": 1310, + "UnitPrice": 0.99 + }, + { + "AlbumId": 103, + "Bytes": 9905048, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 412525, + "Name": "Afraid To Shoot Strangers", + "TrackId": 1313, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 104, + "Bytes": 10577743, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 440555, + "Name": "Heaven Can Wait", + "TrackId": 1317, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 10751410, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 447791, + "Name": "Hallowed Be Thy Name", + "TrackId": 1321, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11380851, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 474017, + "Name": "Running Free", + "TrackId": 1324, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11874875, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 494602, + "Name": "Iron Maiden", + "TrackId": 1320, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5588560, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 232672, + "Name": "The Trooper", + "TrackId": 1322, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5665052, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 235859, + "Name": "Run To The Hills", + "TrackId": 1318, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 6302648, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 262426, + "Name": "The Clairvoyant", + "TrackId": 1316, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 7648679, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 318511, + "Name": "Sanctuary", + "TrackId": 1323, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 8122030, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 338233, + "Name": "2 Minutes To Midnight", + "TrackId": 1319, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 9045532, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 376711, + "Name": "Bring Your Daughter... To The Slaughter...", + "TrackId": 1315, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 105, + "Bytes": 3672064, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229459, + "Name": "Holy Smoke", + "TrackId": 1326, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 3960832, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 247510, + "Name": "Hooks In You", + "TrackId": 1332, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4018088, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 250853, + "Name": "Fates Warning", + "TrackId": 1329, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4071587, + "Composer": "Bruce Dickinson/David Murray", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 254197, + "Name": "Public Enema Number One", + "TrackId": 1328, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4089856, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 255582, + "Name": "Tailgunner", + "TrackId": 1325, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4141056, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 258768, + "Name": "The Assassin", + "TrackId": 1330, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4225024, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 263941, + "Name": "No Prayer For The Dying", + "TrackId": 1327, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4407296, + "Composer": "Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275408, + "Name": "Run Silent Run Deep", + "TrackId": 1331, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 4548608, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 284238, + "Name": "Bring Your Daughter... ...To The Slaughter", + "TrackId": 1333, + "UnitPrice": 0.99 + }, + { + "AlbumId": 105, + "Bytes": 5322752, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 332617, + "Name": "Mother Russia", + "TrackId": 1334, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 106, + "Bytes": 3306324, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 206367, + "Name": "Sun And Steel", + "TrackId": 1342, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3543040, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 221309, + "Name": "Quest For Fire", + "TrackId": 1341, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3686400, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 230269, + "Name": "Flight Of The Icarus", + "TrackId": 1337, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4024320, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 251454, + "Name": "The Trooper", + "TrackId": 1339, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4710400, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 294347, + "Name": "Still Life", + "TrackId": 1340, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5212160, + "Composer": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 325694, + "Name": "Die With Your Boots On", + "TrackId": 1338, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5914624, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 369554, + "Name": "Where Eagles Dare", + "TrackId": 1335, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 6539264, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 408607, + "Name": "Revelations", + "TrackId": 1336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 7129264, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 445283, + "Name": "To Tame A Land", + "TrackId": 1343, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/973fe8ce33b9ec6a/request.json b/test-snapshots/query/973fe8ce33b9ec6a/request.json new file mode 100644 index 0000000..e92e350 --- /dev/null +++ b/test-snapshots/query/973fe8ce33b9ec6a/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9741323eac82e1c1/expected.json b/test-snapshots/query/9741323eac82e1c1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9741323eac82e1c1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9741323eac82e1c1/request.json b/test-snapshots/query/9741323eac82e1c1/request.json new file mode 100644 index 0000000..282f47f --- /dev/null +++ b/test-snapshots/query/9741323eac82e1c1/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9742e7518e9ef80/expected.json b/test-snapshots/query/9742e7518e9ef80/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9742e7518e9ef80/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9742e7518e9ef80/request.json b/test-snapshots/query/9742e7518e9ef80/request.json new file mode 100644 index 0000000..fbd204a --- /dev/null +++ b/test-snapshots/query/9742e7518e9ef80/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/975e1354d4e2a31c/expected.json b/test-snapshots/query/975e1354d4e2a31c/expected.json new file mode 100644 index 0000000..d79f6d3 --- /dev/null +++ b/test-snapshots/query/975e1354d4e2a31c/expected.json @@ -0,0 +1,110 @@ +[ + { + "rows": [ + { + "Address_3439": "590 Columbia Boulevard West", + "City_8405": "Lethbridge", + "Email_7796": "robert@chinookcorp.com", + "EmployeeId_7949": 7, + "Fax_8281": "+1 (403) 456-8485", + "FirstName_7840": "Robert", + "LastName_9207": "King", + "Phone_3153": "+1 (403) 456-9986", + "PostalCode_5380": "T1K 5N8", + "ReportsTo_5099": 6, + "State_6883": "AB" + }, + { + "Address_3439": "923 7 ST NW", + "City_8405": "Lethbridge", + "Email_7796": "laura@chinookcorp.com", + "EmployeeId_7949": 8, + "Fax_8281": "+1 (403) 467-8772", + "FirstName_7840": "Laura", + "LastName_9207": "Callahan", + "Phone_3153": "+1 (403) 467-3351", + "PostalCode_5380": "T1H 1Y8", + "ReportsTo_5099": 6, + "State_6883": "AB" + }, + { + "Address_3439": "1111 6 Ave SW", + "City_8405": "Calgary", + "Email_7796": "jane@chinookcorp.com", + "EmployeeId_7949": 3, + "Fax_8281": "+1 (403) 262-6712", + "FirstName_7840": "Jane", + "LastName_9207": "Peacock", + "Phone_3153": "+1 (403) 262-3443", + "PostalCode_5380": "T2P 5M5", + "ReportsTo_5099": 2, + "State_6883": "AB" + }, + { + "Address_3439": "683 10 Street SW", + "City_8405": "Calgary", + "Email_7796": "margaret@chinookcorp.com", + "EmployeeId_7949": 4, + "Fax_8281": "+1 (403) 263-4289", + "FirstName_7840": "Margaret", + "LastName_9207": "Park", + "Phone_3153": "+1 (403) 263-4423", + "PostalCode_5380": "T2P 5G3", + "ReportsTo_5099": 2, + "State_6883": "AB" + }, + { + "Address_3439": "7727B 41 Ave", + "City_8405": "Calgary", + "Email_7796": "steve@chinookcorp.com", + "EmployeeId_7949": 5, + "Fax_8281": "1 (780) 836-9543", + "FirstName_7840": "Steve", + "LastName_9207": "Johnson", + "Phone_3153": "1 (780) 836-9987", + "PostalCode_5380": "T3B 1Y7", + "ReportsTo_5099": 2, + "State_6883": "AB" + }, + { + "Address_3439": "825 8 Ave SW", + "City_8405": "Calgary", + "Email_7796": "nancy@chinookcorp.com", + "EmployeeId_7949": 2, + "Fax_8281": "+1 (403) 262-3322", + "FirstName_7840": "Nancy", + "LastName_9207": "Edwards", + "Phone_3153": "+1 (403) 262-3443", + "PostalCode_5380": "T2P 2T3", + "ReportsTo_5099": 1, + "State_6883": "AB" + }, + { + "Address_3439": "5827 Bowness Road NW", + "City_8405": "Calgary", + "Email_7796": "michael@chinookcorp.com", + "EmployeeId_7949": 6, + "Fax_8281": "+1 (403) 246-9899", + "FirstName_7840": "Michael", + "LastName_9207": "Mitchell", + "Phone_3153": "+1 (403) 246-9887", + "PostalCode_5380": "T3B 0C5", + "ReportsTo_5099": 1, + "State_6883": "AB" + }, + { + "Address_3439": "11120 Jasper Ave NW", + "City_8405": "Edmonton", + "Email_7796": "andrew@chinookcorp.com", + "EmployeeId_7949": 1, + "Fax_8281": "+1 (780) 428-3457", + "FirstName_7840": "Andrew", + "LastName_9207": "Adams", + "Phone_3153": "+1 (780) 428-9482", + "PostalCode_5380": "T5K 2N1", + "ReportsTo_5099": null, + "State_6883": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/975e1354d4e2a31c/request.json b/test-snapshots/query/975e1354d4e2a31c/request.json new file mode 100644 index 0000000..287a7b8 --- /dev/null +++ b/test-snapshots/query/975e1354d4e2a31c/request.json @@ -0,0 +1,93 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_3439": { + "type": "column", + "column": "Address", + "fields": null + }, + "PostalCode_5380": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "City_8405": { + "type": "column", + "column": "City", + "fields": null + }, + "ReportsTo_5099": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Email_7796": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_7949": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_8281": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7840": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "State_6883": { + "type": "column", + "column": "State", + "fields": null + }, + "LastName_9207": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_3153": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/97696c11141cf635/expected.json b/test-snapshots/query/97696c11141cf635/expected.json new file mode 100644 index 0000000..f2520e3 --- /dev/null +++ b/test-snapshots/query/97696c11141cf635/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 8, + "TrackId": 1001 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/97696c11141cf635/request.json b/test-snapshots/query/97696c11141cf635/request.json new file mode 100644 index 0000000..fb72f09 --- /dev/null +++ b/test-snapshots/query/97696c11141cf635/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/976dd6bbaf889da/expected.json b/test-snapshots/query/976dd6bbaf889da/expected.json new file mode 100644 index 0000000..1b426d8 --- /dev/null +++ b/test-snapshots/query/976dd6bbaf889da/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 105, + "Name": "Men At Work" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/976dd6bbaf889da/request.json b/test-snapshots/query/976dd6bbaf889da/request.json new file mode 100644 index 0000000..0e59732 --- /dev/null +++ b/test-snapshots/query/976dd6bbaf889da/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/979cd418b4e5fa6b/expected.json b/test-snapshots/query/979cd418b4e5fa6b/expected.json new file mode 100644 index 0000000..99682d0 --- /dev/null +++ b/test-snapshots/query/979cd418b4e5fa6b/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/979cd418b4e5fa6b/request.json b/test-snapshots/query/979cd418b4e5fa6b/request.json new file mode 100644 index 0000000..c39720c --- /dev/null +++ b/test-snapshots/query/979cd418b4e5fa6b/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/97b077dddde404ac/expected.json b/test-snapshots/query/97b077dddde404ac/expected.json new file mode 100644 index 0000000..85c1434 --- /dev/null +++ b/test-snapshots/query/97b077dddde404ac/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "ArtistId_count": 275, + "ArtistId_distinct_count": 275, + "Name_count": 275, + "Name_distinct_count": 275 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/97b077dddde404ac/request.json b/test-snapshots/query/97b077dddde404ac/request.json new file mode 100644 index 0000000..3d9da57 --- /dev/null +++ b/test-snapshots/query/97b077dddde404ac/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Artist", + "query": { + "aggregates": { + "ArtistId_count": { + "type": "column_count", + "column": "ArtistId", + "distinct": false + }, + "ArtistId_distinct_count": { + "type": "column_count", + "column": "ArtistId", + "distinct": true + }, + "Name_count": { + "type": "column_count", + "column": "Name", + "distinct": false + }, + "Name_distinct_count": { + "type": "column_count", + "column": "Name", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/97b09ad15ab4ba1a/expected.json b/test-snapshots/query/97b09ad15ab4ba1a/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/97b09ad15ab4ba1a/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/97b09ad15ab4ba1a/request.json b/test-snapshots/query/97b09ad15ab4ba1a/request.json new file mode 100644 index 0000000..9f54819 --- /dev/null +++ b/test-snapshots/query/97b09ad15ab4ba1a/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/97e02bf232b319/expected.json b/test-snapshots/query/97e02bf232b319/expected.json new file mode 100644 index 0000000..87b0141 --- /dev/null +++ b/test-snapshots/query/97e02bf232b319/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 312, + "InvoiceLineId": 1687, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/97e02bf232b319/request.json b/test-snapshots/query/97e02bf232b319/request.json new file mode 100644 index 0000000..ece5e99 --- /dev/null +++ b/test-snapshots/query/97e02bf232b319/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/98451310b08236aa/expected.json b/test-snapshots/query/98451310b08236aa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/98451310b08236aa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/98451310b08236aa/request.json b/test-snapshots/query/98451310b08236aa/request.json new file mode 100644 index 0000000..17e0281 --- /dev/null +++ b/test-snapshots/query/98451310b08236aa/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/98487e3064c4ffcd/expected.json b/test-snapshots/query/98487e3064c4ffcd/expected.json new file mode 100644 index 0000000..a9ff63e --- /dev/null +++ b/test-snapshots/query/98487e3064c4ffcd/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_0956": 1, + "Quantity_3025": 1, + "TrackId_1837": 2, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 1, + "Quantity_3025": 1, + "TrackId_1837": 4, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 10, + "Quantity_3025": 1, + "TrackId_1837": 248, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 10, + "Quantity_3025": 1, + "TrackId_1837": 252, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 10, + "Quantity_3025": 1, + "TrackId_1837": 256, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 10, + "Quantity_3025": 1, + "TrackId_1837": 260, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 10, + "Quantity_3025": 1, + "TrackId_1837": 264, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 10, + "Quantity_3025": 1, + "TrackId_1837": 268, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 100, + "Quantity_3025": 1, + "TrackId_1837": 3254, + "UnitPrice_4416": 0.99 + }, + { + "InvoiceId_0956": 100, + "Quantity_3025": 1, + "TrackId_1837": 3256, + "UnitPrice_4416": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/98487e3064c4ffcd/request.json b/test-snapshots/query/98487e3064c4ffcd/request.json new file mode 100644 index 0000000..9037f75 --- /dev/null +++ b/test-snapshots/query/98487e3064c4ffcd/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_0956": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "UnitPrice_4416": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Quantity_3025": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_1837": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/985100aceed97364/expected.json b/test-snapshots/query/985100aceed97364/expected.json new file mode 100644 index 0000000..1acdfa9 --- /dev/null +++ b/test-snapshots/query/985100aceed97364/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_0994": "Philip Glass Ensemble" + }, + { + "Name_0994": "Nash Ensemble" + }, + { + "Name_0994": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "Name_0994": "Emerson String Quartet" + }, + { + "Name_0994": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "Name_0994": "Gerald Moore" + }, + { + "Name_0994": "Michele Campanella" + }, + { + "Name_0994": "Itzhak Perlman" + }, + { + "Name_0994": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "Name_0994": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/985100aceed97364/request.json b/test-snapshots/query/985100aceed97364/request.json new file mode 100644 index 0000000..99782c0 --- /dev/null +++ b/test-snapshots/query/985100aceed97364/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_0994": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9880ace78ca323f4/expected.json b/test-snapshots/query/9880ace78ca323f4/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/9880ace78ca323f4/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9880ace78ca323f4/request.json b/test-snapshots/query/9880ace78ca323f4/request.json new file mode 100644 index 0000000..218fec5 --- /dev/null +++ b/test-snapshots/query/9880ace78ca323f4/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/98bbf3ccc2852162/expected.json b/test-snapshots/query/98bbf3ccc2852162/expected.json new file mode 100644 index 0000000..5d35789 --- /dev/null +++ b/test-snapshots/query/98bbf3ccc2852162/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/98bbf3ccc2852162/request.json b/test-snapshots/query/98bbf3ccc2852162/request.json new file mode 100644 index 0000000..d64e908 --- /dev/null +++ b/test-snapshots/query/98bbf3ccc2852162/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/98d147c2bc669701/expected.json b/test-snapshots/query/98d147c2bc669701/expected.json new file mode 100644 index 0000000..d46acc7 --- /dev/null +++ b/test-snapshots/query/98d147c2bc669701/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "InvoiceLineId_count_2930": 2240, + "Quantity_count_3031": 2240, + "Quantity_min_5998": 1, + "UnitPrice_count_2149": 2240 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/98d147c2bc669701/request.json b/test-snapshots/query/98d147c2bc669701/request.json new file mode 100644 index 0000000..ae91387 --- /dev/null +++ b/test-snapshots/query/98d147c2bc669701/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "InvoiceLineId_count_2930": { + "type": "single_column", + "column": "InvoiceLineId", + "function": "count" + }, + "Quantity_min_5998": { + "type": "single_column", + "column": "Quantity", + "function": "min" + }, + "Quantity_count_3031": { + "type": "single_column", + "column": "Quantity", + "function": "count" + }, + "UnitPrice_count_2149": { + "type": "single_column", + "column": "UnitPrice", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/98d3b7169b5dcd7a/expected.json b/test-snapshots/query/98d3b7169b5dcd7a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/98d3b7169b5dcd7a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/98d3b7169b5dcd7a/request.json b/test-snapshots/query/98d3b7169b5dcd7a/request.json new file mode 100644 index 0000000..22784be --- /dev/null +++ b/test-snapshots/query/98d3b7169b5dcd7a/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/990ea1699c0e5b3d/expected.json b/test-snapshots/query/990ea1699c0e5b3d/expected.json new file mode 100644 index 0000000..43273dd --- /dev/null +++ b/test-snapshots/query/990ea1699c0e5b3d/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_9881": 1, + "Name_1424": "MPEG audio file" + }, + { + "MediaTypeId_9881": 2, + "Name_1424": "Protected AAC audio file" + }, + { + "MediaTypeId_9881": 3, + "Name_1424": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_9881": 4, + "Name_1424": "Purchased AAC audio file" + }, + { + "MediaTypeId_9881": 5, + "Name_1424": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/990ea1699c0e5b3d/request.json b/test-snapshots/query/990ea1699c0e5b3d/request.json new file mode 100644 index 0000000..e342dd9 --- /dev/null +++ b/test-snapshots/query/990ea1699c0e5b3d/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_9881": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_1424": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/991e9dc626828a2f/expected.json b/test-snapshots/query/991e9dc626828a2f/expected.json new file mode 100644 index 0000000..7d9f7cf --- /dev/null +++ b/test-snapshots/query/991e9dc626828a2f/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/991e9dc626828a2f/request.json b/test-snapshots/query/991e9dc626828a2f/request.json new file mode 100644 index 0000000..7581ca1 --- /dev/null +++ b/test-snapshots/query/991e9dc626828a2f/request.json @@ -0,0 +1,75 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/99680ed9eb7cde7d/expected.json b/test-snapshots/query/99680ed9eb7cde7d/expected.json new file mode 100644 index 0000000..a00eeb1 --- /dev/null +++ b/test-snapshots/query/99680ed9eb7cde7d/expected.json @@ -0,0 +1,48 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/99680ed9eb7cde7d/request.json b/test-snapshots/query/99680ed9eb7cde7d/request.json new file mode 100644 index 0000000..5e97d2f --- /dev/null +++ b/test-snapshots/query/99680ed9eb7cde7d/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9974512ef49694d3/expected.json b/test-snapshots/query/9974512ef49694d3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9974512ef49694d3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9974512ef49694d3/request.json b/test-snapshots/query/9974512ef49694d3/request.json new file mode 100644 index 0000000..5dd5cfb --- /dev/null +++ b/test-snapshots/query/9974512ef49694d3/request.json @@ -0,0 +1,46 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/997707bcc551d77d/expected.json b/test-snapshots/query/997707bcc551d77d/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/997707bcc551d77d/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/997707bcc551d77d/request.json b/test-snapshots/query/997707bcc551d77d/request.json new file mode 100644 index 0000000..ed3eae0 --- /dev/null +++ b/test-snapshots/query/997707bcc551d77d/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/99cc446fd25bf10/expected.json b/test-snapshots/query/99cc446fd25bf10/expected.json new file mode 100644 index 0000000..ee2e783 --- /dev/null +++ b/test-snapshots/query/99cc446fd25bf10/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/99cc446fd25bf10/request.json b/test-snapshots/query/99cc446fd25bf10/request.json new file mode 100644 index 0000000..8f6aa38 --- /dev/null +++ b/test-snapshots/query/99cc446fd25bf10/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/99cd44d537e22b6a/expected.json b/test-snapshots/query/99cd44d537e22b6a/expected.json new file mode 100644 index 0000000..f940431 --- /dev/null +++ b/test-snapshots/query/99cd44d537e22b6a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/99cd44d537e22b6a/request.json b/test-snapshots/query/99cd44d537e22b6a/request.json new file mode 100644 index 0000000..6c59a5c --- /dev/null +++ b/test-snapshots/query/99cd44d537e22b6a/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/99e71ec80db7a129/expected.json b/test-snapshots/query/99e71ec80db7a129/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/99e71ec80db7a129/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/99e71ec80db7a129/request.json b/test-snapshots/query/99e71ec80db7a129/request.json new file mode 100644 index 0000000..16be611 --- /dev/null +++ b/test-snapshots/query/99e71ec80db7a129/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Andrew" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (780) 428-3457" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9a24dd026a37b447/expected.json b/test-snapshots/query/9a24dd026a37b447/expected.json new file mode 100644 index 0000000..b69d3de --- /dev/null +++ b/test-snapshots/query/9a24dd026a37b447/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1057 + }, + { + "PlaylistId": 1, + "TrackId": 1058 + }, + { + "PlaylistId": 1, + "TrackId": 1059 + }, + { + "PlaylistId": 1, + "TrackId": 1060 + }, + { + "PlaylistId": 1, + "TrackId": 1061 + }, + { + "PlaylistId": 1, + "TrackId": 1062 + }, + { + "PlaylistId": 1, + "TrackId": 1063 + }, + { + "PlaylistId": 1, + "TrackId": 1064 + }, + { + "PlaylistId": 1, + "TrackId": 1066 + }, + { + "PlaylistId": 1, + "TrackId": 1067 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9a24dd026a37b447/request.json b/test-snapshots/query/9a24dd026a37b447/request.json new file mode 100644 index 0000000..d23331c --- /dev/null +++ b/test-snapshots/query/9a24dd026a37b447/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9a3358aae5d11922/expected.json b/test-snapshots/query/9a3358aae5d11922/expected.json new file mode 100644 index 0000000..dbd164f --- /dev/null +++ b/test-snapshots/query/9a3358aae5d11922/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2009-10-07", + "InvoiceId_6911": 63, + "Total_7322": 1.98 + }, + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2010-01-09", + "InvoiceId_6911": 86, + "Total_7322": 3.96 + }, + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2010-04-13", + "InvoiceId_6911": 108, + "Total_7322": 5.94 + }, + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2010-12-02", + "InvoiceId_6911": 160, + "Total_7322": 0.99 + }, + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2012-05-25", + "InvoiceId_6911": 281, + "Total_7322": 1.98 + }, + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2012-07-05", + "InvoiceId_6911": 292, + "Total_7322": 13.86 + }, + { + "BillingAddress_5655": "Via Degli Scipioni, 43", + "BillingCity_7105": "Rome", + "BillingPostalCode_2304": "00192", + "BillingState_7377": "RM", + "InvoiceDate_4108": "2013-03-05", + "InvoiceId_6911": 347, + "Total_7322": 8.91 + }, + { + "BillingAddress_5655": "Ullevålsveien 14", + "BillingCity_7105": "Oslo", + "BillingPostalCode_2304": "0171", + "BillingState_7377": null, + "InvoiceDate_4108": "2009-01-02", + "InvoiceId_6911": 2, + "Total_7322": 3.96 + }, + { + "BillingAddress_5655": "Ullevålsveien 14", + "BillingCity_7105": "Oslo", + "BillingPostalCode_2304": "0171", + "BillingState_7377": null, + "InvoiceDate_4108": "2009-04-06", + "InvoiceId_6911": 24, + "Total_7322": 5.94 + }, + { + "BillingAddress_5655": "Ullevålsveien 14", + "BillingCity_7105": "Oslo", + "BillingPostalCode_2304": "0171", + "BillingState_7377": null, + "InvoiceDate_4108": "2009-11-25", + "InvoiceId_6911": 76, + "Total_7322": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9a3358aae5d11922/request.json b/test-snapshots/query/9a3358aae5d11922/request.json new file mode 100644 index 0000000..a2ab53b --- /dev/null +++ b/test-snapshots/query/9a3358aae5d11922/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_5655": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_7105": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "InvoiceId_6911": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingPostalCode_2304": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_7377": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "Total_7322": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceDate_4108": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9a37f12028e85bc1/expected.json b/test-snapshots/query/9a37f12028e85bc1/expected.json new file mode 100644 index 0000000..6de6ca3 --- /dev/null +++ b/test-snapshots/query/9a37f12028e85bc1/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "AlbumId_1760": 1, + "Bytes_6796": 11170334, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 343719, + "Name_9911": "For Those About To Rock (We Salute You)", + "TrackId_0727": 1, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 6566314, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 199836, + "Name_9911": "C.O.D.", + "TrackId_0727": 11, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 6599424, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 203102, + "Name_9911": "Snowballed", + "TrackId_0727": 9, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 6706347, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 205688, + "Name_9911": "Night Of The Long Knives", + "TrackId_0727": 13, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 6713451, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 205662, + "Name_9911": "Put The Finger On You", + "TrackId_0727": 6, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 6852860, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 210834, + "Name_9911": "Inject The Venom", + "TrackId_0727": 8, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 7636561, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 233926, + "Name_9911": "Let's Get It Up", + "TrackId_0727": 7, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 8596840, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 263288, + "Name_9911": "Breaking The Rules", + "TrackId_0727": 12, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 8611245, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 263497, + "Name_9911": "Evil Walks", + "TrackId_0727": 10, + "UnitPrice_4844": 0.99 + }, + { + "AlbumId_1760": 1, + "Bytes_6796": 8817038, + "Composer_8551": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "GenreId_7006": 1, + "MediaTypeId_7395": 1, + "Milliseconds_6828": 270863, + "Name_9911": "Spellbound", + "TrackId_0727": 14, + "UnitPrice_4844": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9a37f12028e85bc1/request.json b/test-snapshots/query/9a37f12028e85bc1/request.json new file mode 100644 index 0000000..db9587e --- /dev/null +++ b/test-snapshots/query/9a37f12028e85bc1/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_1760": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6796": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_8551": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_7006": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_7395": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_6828": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_9911": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_0727": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_4844": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9a926f36b5b84092/expected.json b/test-snapshots/query/9a926f36b5b84092/expected.json new file mode 100644 index 0000000..476f504 --- /dev/null +++ b/test-snapshots/query/9a926f36b5b84092/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9a926f36b5b84092/request.json b/test-snapshots/query/9a926f36b5b84092/request.json new file mode 100644 index 0000000..8e4fb56 --- /dev/null +++ b/test-snapshots/query/9a926f36b5b84092/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1600 Amphitheatre Parkway" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9ac199192ecbac43/expected.json b/test-snapshots/query/9ac199192ecbac43/expected.json new file mode 100644 index 0000000..9e86308 --- /dev/null +++ b/test-snapshots/query/9ac199192ecbac43/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "Bytes_7649": 7689713, + "TrackId_2841": 2505, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 3506308, + "TrackId_2841": 3273, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 12807979, + "TrackId_2841": 3028, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 9056902, + "TrackId_2841": 2926, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 11835367, + "TrackId_2841": 968, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 5032962, + "TrackId_2841": 2306, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 10426550, + "TrackId_2841": 2238, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 5267176, + "TrackId_2841": 2497, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 4781949, + "TrackId_2841": 981, + "UnitPrice_1571": 0.99 + }, + { + "Bytes_7649": 8331310, + "TrackId_2841": 2463, + "UnitPrice_1571": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9ac199192ecbac43/request.json b/test-snapshots/query/9ac199192ecbac43/request.json new file mode 100644 index 0000000..8d141a2 --- /dev/null +++ b/test-snapshots/query/9ac199192ecbac43/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "UnitPrice_1571": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Bytes_7649": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "TrackId_2841": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9aff7cf34afd2578/expected.json b/test-snapshots/query/9aff7cf34afd2578/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9aff7cf34afd2578/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9aff7cf34afd2578/request.json b/test-snapshots/query/9aff7cf34afd2578/request.json new file mode 100644 index 0000000..76ffb70 --- /dev/null +++ b/test-snapshots/query/9aff7cf34afd2578/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9b09a5c65113b077/expected.json b/test-snapshots/query/9b09a5c65113b077/expected.json new file mode 100644 index 0000000..a54ddaf --- /dev/null +++ b/test-snapshots/query/9b09a5c65113b077/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "Bytes_7936": 38747, + "Composer_7391": "Samuel Rosa", + "GenreId_7146": 1, + "Name_1902": "É Uma Partida De Futebol", + "TrackId_3660": 2461 + }, + { + "Bytes_7936": 161266, + "Composer_7391": null, + "GenreId_7146": 4, + "Name_1902": "Now Sports", + "TrackId_3660": 168 + }, + { + "Bytes_7936": 211997, + "Composer_7391": null, + "GenreId_7146": 4, + "Name_1902": "A Statistic", + "TrackId_3660": 170 + }, + { + "Bytes_7936": 224313, + "Composer_7391": null, + "GenreId_7146": 4, + "Name_1902": "Oprah", + "TrackId_3660": 178 + }, + { + "Bytes_7936": 319888, + "Composer_7391": "L. Muggerud", + "GenreId_7146": 17, + "Name_1902": "Commercial 1", + "TrackId_3660": 3304 + }, + { + "Bytes_7936": 387360, + "Composer_7391": null, + "GenreId_7146": 4, + "Name_1902": "The Real Problem", + "TrackId_3660": 172 + }, + { + "Bytes_7936": 850698, + "Composer_7391": "L. Muggerud", + "GenreId_7146": 17, + "Name_1902": "Commercial 2", + "TrackId_3660": 3310 + }, + { + "Bytes_7936": 967098, + "Composer_7391": null, + "GenreId_7146": 17, + "Name_1902": "Bossa", + "TrackId_3660": 2241 + }, + { + "Bytes_7936": 1039615, + "Composer_7391": "Gilberto Gil", + "GenreId_7146": 10, + "Name_1902": "Casinha Feliz", + "TrackId_3660": 1086 + }, + { + "Bytes_7936": 1095012, + "Composer_7391": null, + "GenreId_7146": 7, + "Name_1902": "Deixa Entrar", + "TrackId_3660": 975 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9b09a5c65113b077/request.json b/test-snapshots/query/9b09a5c65113b077/request.json new file mode 100644 index 0000000..eadc68b --- /dev/null +++ b/test-snapshots/query/9b09a5c65113b077/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_1902": { + "type": "column", + "column": "Name", + "fields": null + }, + "Bytes_7936": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_7391": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_7146": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "TrackId_3660": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9b9f069f7c0466af/expected.json b/test-snapshots/query/9b9f069f7c0466af/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9b9f069f7c0466af/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9b9f069f7c0466af/request.json b/test-snapshots/query/9b9f069f7c0466af/request.json new file mode 100644 index 0000000..93223f5 --- /dev/null +++ b/test-snapshots/query/9b9f069f7c0466af/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Brazilian Music" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9ba107dd905b6ce3/expected.json b/test-snapshots/query/9ba107dd905b6ce3/expected.json new file mode 100644 index 0000000..3f13240 --- /dev/null +++ b/test-snapshots/query/9ba107dd905b6ce3/expected.json @@ -0,0 +1,786 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10003747, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 299337, + "TrackId_9209": 218, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10012231, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 299102, + "TrackId_9209": 3159, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10019269, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 302733, + "TrackId_9209": 1115, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10030604, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 301113, + "TrackId_9209": 1062, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10037362, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 304692, + "TrackId_9209": 853, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10053718, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 300878, + "TrackId_9209": 1522, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10107269, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 307591, + "TrackId_9209": 1722, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10130685, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308401, + "TrackId_9209": 1695, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10211473, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 310073, + "TrackId_9209": 1506, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10251097, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 307095, + "TrackId_9209": 269, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 7, + "Name": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10003794, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308897, + "TrackId_9209": 2101, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10055959, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308610, + "TrackId_9209": 1810, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10110980, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308035, + "TrackId_9209": 82, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10141785, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 311327, + "TrackId_9209": 1838, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10159725, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 311719, + "TrackId_9209": 1876, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10199789, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 313103, + "TrackId_9209": 1866, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10229577, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 312424, + "TrackId_9209": 1853, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10232537, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 314017, + "TrackId_9209": 1891, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10302828, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 313991, + "TrackId_9209": 1901, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10326997, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 317074, + "TrackId_9209": 3140, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 3, + "Name": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10005675, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 306337, + "TrackId_9209": 2712, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10026371, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 306442, + "TrackId_9209": 1015, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10029406, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 309786, + "TrackId_9209": 110, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10094743, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 311353, + "TrackId_9209": 1014, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10180103, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 310831, + "TrackId_9209": 939, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10295199, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 315559, + "TrackId_9209": 2708, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10333123, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 316055, + "TrackId_9209": 966, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10351152, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 317257, + "TrackId_9209": 2726, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10351778, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 317231, + "TrackId_9209": 2722, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10489139, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 317936, + "TrackId_9209": 169, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 4, + "Name": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10009697, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 309995, + "TrackId_9209": 2140, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10014683, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308950, + "TrackId_9209": 3078, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10019861, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 302080, + "TrackId_9209": 2653, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10022428, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 306860, + "TrackId_9209": 810, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10034711, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 303934, + "TrackId_9209": 2443, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10035180, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 307905, + "TrackId_9209": 769, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10056995, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 309263, + "TrackId_9209": 29, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10077337, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308532, + "TrackId_9209": 2297, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10078197, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 307226, + "TrackId_9209": 1592, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10110351, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 306390, + "TrackId_9209": 2459, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 1, + "Name": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10020122, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 296254, + "TrackId_9209": 373, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 1039615, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 32287, + "TrackId_9209": 1086, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10867860, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 328228, + "TrackId_9209": 2127, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10939131, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 330266, + "TrackId_9209": 2125, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11064884, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 340767, + "TrackId_9209": 2131, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 12727928, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 383764, + "TrackId_9209": 2128, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 3305164, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 206005, + "TrackId_9209": 3503, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 3884133, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 120816, + "TrackId_9209": 2129, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 4888292, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 148636, + "TrackId_9209": 1083, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 5851053, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 180166, + "TrackId_9209": 2135, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10056970, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 298396, + "TrackId_9209": 299, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10078050, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 304352, + "TrackId_9209": 287, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10319296, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 309733, + "TrackId_9209": 2227, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10728099, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 319582, + "TrackId_9209": 3050, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11193602, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 334524, + "TrackId_9209": 3040, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11346114, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 341498, + "TrackId_9209": 3047, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11812170, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 353671, + "TrackId_9209": 2224, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 12086524, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 366733, + "TrackId_9209": 2228, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 5748424, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 173008, + "TrackId_9209": 294, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 5950952, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 178155, + "TrackId_9209": 307, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 8, + "Name": "Reggae" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10085867, + "MediaTypeId_9730": 4, + "Milliseconds_8781": 306687, + "TrackId_9209": 3414, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10887931, + "MediaTypeId_9730": 4, + "Milliseconds_8781": 339567, + "TrackId_9209": 3479, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 1189062, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 66639, + "TrackId_9209": 3501, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 1208080, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 69194, + "TrackId_9209": 3448, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 16454937, + "MediaTypeId_9730": 4, + "Milliseconds_8781": 493573, + "TrackId_9209": 3498, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 1973559, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 110266, + "TrackId_9209": 3483, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 2081895, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 120463, + "TrackId_9209": 3408, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 2189002, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 132932, + "TrackId_9209": 3447, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 2193734, + "MediaTypeId_9730": 2, + "Milliseconds_8781": 120000, + "TrackId_9209": 3449, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 2229617, + "MediaTypeId_9730": 4, + "Milliseconds_8781": 51780, + "TrackId_9209": 3496, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 24, + "Name": "Classical" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10115556, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 308401, + "TrackId_9209": 2581, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10276872, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 428016, + "TrackId_9209": 1272, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10331216, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 314409, + "TrackId_9209": 2587, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10894406, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 328724, + "TrackId_9209": 913, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11049098, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 337084, + "TrackId_9209": 2590, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11085915, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 336927, + "TrackId_9209": 2538, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11740886, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 359314, + "TrackId_9209": 2582, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11837342, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 361978, + "TrackId_9209": 2585, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 12047978, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 368300, + "TrackId_9209": 2577, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 12222116, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 372636, + "TrackId_9209": 2578, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 6, + "Name": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10181692, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 254484, + "TrackId_9209": 3331, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10334529, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 309995, + "TrackId_9209": 1460, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10791921, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 269740, + "TrackId_9209": 3322, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10843832, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 322455, + "TrackId_9209": 1463, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10988338, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 274651, + "TrackId_9209": 3334, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11043559, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 329534, + "TrackId_9209": 1461, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11431382, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 285727, + "TrackId_9209": 3325, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 11796244, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 354560, + "TrackId_9209": 1458, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 12024875, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 300564, + "TrackId_9209": 3319, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 12168015, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 304143, + "TrackId_9209": 3323, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5949": 10218398, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 318328, + "TrackId_9209": 1907, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10317185, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 310778, + "TrackId_9209": 463, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10429398, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 316865, + "TrackId_9209": 464, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10518284, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 315219, + "TrackId_9209": 457, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10529483, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 316682, + "TrackId_9209": 616, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10553155, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 320078, + "TrackId_9209": 2531, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10602166, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 319373, + "TrackId_9209": 844, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10630578, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 318066, + "TrackId_9209": 128, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10653494, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 321358, + "TrackId_9209": 842, + "UnitPrice_0536": 0.99 + }, + { + "Bytes_5949": 10720741, + "MediaTypeId_9730": 1, + "Milliseconds_8781": 321123, + "TrackId_9209": 1190, + "UnitPrice_0536": 0.99 + } + ] + }, + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9ba107dd905b6ce3/request.json b/test-snapshots/query/9ba107dd905b6ce3/request.json new file mode 100644 index 0000000..4f35b72 --- /dev/null +++ b/test-snapshots/query/9ba107dd905b6ce3/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "UnitPrice_0536": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Bytes_5949": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "TrackId_9209": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Milliseconds_8781": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "MediaTypeId_9730": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9bb827c769d8b804/expected.json b/test-snapshots/query/9bb827c769d8b804/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/9bb827c769d8b804/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9bb827c769d8b804/request.json b/test-snapshots/query/9bb827c769d8b804/request.json new file mode 100644 index 0000000..2b392c2 --- /dev/null +++ b/test-snapshots/query/9bb827c769d8b804/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9bd4c5dffb4cebfd/expected.json b/test-snapshots/query/9bd4c5dffb4cebfd/expected.json new file mode 100644 index 0000000..8f1580f --- /dev/null +++ b/test-snapshots/query/9bd4c5dffb4cebfd/expected.json @@ -0,0 +1,616 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 15 + }, + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 210 + }, + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 233 + }, + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 255 + }, + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 26 + }, + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 307 + }, + { + "BillingCity_8857": "Cupertino", + "BillingPostalCode_8643": "95014", + "CustomerId_7431": 19, + "InvoiceId_3939": 81 + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 111 + }, + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 14 + }, + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 232 + }, + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 243 + }, + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 298 + }, + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 37 + }, + { + "BillingCity_8857": "Redmond", + "BillingPostalCode_8643": "98052-8300", + "CustomerId_7431": 17, + "InvoiceId_3939": 59 + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 168 + }, + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 191 + }, + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 213 + }, + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 265 + }, + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 386 + }, + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 397 + }, + { + "BillingCity_8857": "Tucson", + "BillingPostalCode_8643": "85719", + "CustomerId_7431": 27, + "InvoiceId_3939": 39 + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 106 + }, + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 117 + }, + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 172 + }, + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 301 + }, + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 324 + }, + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 346 + }, + { + "BillingCity_8857": "Lyon", + "BillingPostalCode_8643": "69002", + "CustomerId_7431": 41, + "InvoiceId_3939": 398 + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 141 + }, + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 152 + }, + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 207 + }, + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 20 + }, + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 336 + }, + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 359 + }, + { + "BillingCity_8857": "Edinburgh ", + "BillingPostalCode_8643": "EH4 1HH", + "CustomerId_7431": 54, + "InvoiceId_3939": 381 + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 109 + }, + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 238 + }, + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 261 + }, + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 283 + }, + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 335 + }, + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 43 + }, + { + "BillingCity_8857": "London", + "BillingPostalCode_8643": "SW1V 3EN", + "CustomerId_7431": 53, + "InvoiceId_3939": 54 + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 120 + }, + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 131 + }, + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 186 + }, + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 315 + }, + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 338 + }, + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 360 + }, + { + "BillingCity_8857": "Delhi", + "BillingPostalCode_8643": "110017", + "CustomerId_7431": 58, + "InvoiceId_3939": 412 + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 114 + }, + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 136 + }, + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 188 + }, + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 309 + }, + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 320 + }, + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 375 + }, + { + "BillingCity_8857": "Orlando", + "BillingPostalCode_8643": "32801", + "CustomerId_7431": 22, + "InvoiceId_3939": 91 + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 110 + }, + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 165 + }, + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 294 + }, + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 317 + }, + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 339 + }, + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 391 + }, + { + "BillingCity_8857": "Montréal", + "BillingPostalCode_8643": "H2G 1A7", + "CustomerId_7431": 3, + "InvoiceId_3939": 99 + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 134 + }, + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 13 + }, + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 145 + }, + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 200 + }, + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 329 + }, + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 352 + }, + { + "BillingCity_8857": "Mountain View", + "BillingPostalCode_8643": "94043-1351", + "CustomerId_7431": 16, + "InvoiceId_3939": 374 + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9bd4c5dffb4cebfd/request.json b/test-snapshots/query/9bd4c5dffb4cebfd/request.json new file mode 100644 index 0000000..414e1aa --- /dev/null +++ b/test-snapshots/query/9bd4c5dffb4cebfd/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "CustomerId_7431": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "BillingCity_8857": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "InvoiceId_3939": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingPostalCode_8643": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9bd9daa8d7789509/expected.json b/test-snapshots/query/9bd9daa8d7789509/expected.json new file mode 100644 index 0000000..13f8ad6 --- /dev/null +++ b/test-snapshots/query/9bd9daa8d7789509/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_0173": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "Title_0173": "Mozart: Chamber Music" + }, + { + "Title_0173": "Monteverdi: L'Orfeo" + }, + { + "Title_0173": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "Title_0173": "Respighi:Pines of Rome" + }, + { + "Title_0173": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "Title_0173": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "Title_0173": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "Title_0173": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "Title_0173": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9bd9daa8d7789509/request.json b/test-snapshots/query/9bd9daa8d7789509/request.json new file mode 100644 index 0000000..5e28b6e --- /dev/null +++ b/test-snapshots/query/9bd9daa8d7789509/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_0173": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9bf71b8ffe830a8a/expected.json b/test-snapshots/query/9bf71b8ffe830a8a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9bf71b8ffe830a8a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9bf71b8ffe830a8a/request.json b/test-snapshots/query/9bf71b8ffe830a8a/request.json new file mode 100644 index 0000000..2a1ad47 --- /dev/null +++ b/test-snapshots/query/9bf71b8ffe830a8a/request.json @@ -0,0 +1,188 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "nancy@chinookcorp.com" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9bfc252d2888d153/expected.json b/test-snapshots/query/9bfc252d2888d153/expected.json new file mode 100644 index 0000000..a95fc1d --- /dev/null +++ b/test-snapshots/query/9bfc252d2888d153/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9bfc252d2888d153/request.json b/test-snapshots/query/9bfc252d2888d153/request.json new file mode 100644 index 0000000..550423d --- /dev/null +++ b/test-snapshots/query/9bfc252d2888d153/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 46 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c111c2bed3a40cf/expected.json b/test-snapshots/query/9c111c2bed3a40cf/expected.json new file mode 100644 index 0000000..b1f6aa8 --- /dev/null +++ b/test-snapshots/query/9c111c2bed3a40cf/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "Composer_1878": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "Name_8151": "I Guess You're Right", + "TrackId_2014": 3353, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "Name_8151": "Love Comes", + "TrackId_2014": 3355, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Aaron Goldberg", + "Name_8151": "OAM's Blues", + "TrackId_2014": 3357, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Andrea Dulbecco", + "Name_8151": "Despertar", + "TrackId_2014": 3350, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Luca Gusella", + "Name_8151": "Amanda", + "TrackId_2014": 3349, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Luciana Souza", + "Name_8151": "Muita Bobeira", + "TrackId_2014": 3356, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Karsh Kale", + "Name_8151": "One Step Beyond", + "TrackId_2014": 3358, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Karsh Kale/Vishal Vaid", + "Name_8151": "Distance", + "TrackId_2014": 3352, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Habib Koité", + "Name_8151": "Din Din Wo (Little Child)", + "TrackId_2014": 3351, + "UnitPrice_1862": 0.99 + }, + { + "Composer_1878": "Habib Koité", + "Name_8151": "I Ka Barra (Your Work)", + "TrackId_2014": 3354, + "UnitPrice_1862": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c111c2bed3a40cf/request.json b/test-snapshots/query/9c111c2bed3a40cf/request.json new file mode 100644 index 0000000..d012f66 --- /dev/null +++ b/test-snapshots/query/9c111c2bed3a40cf/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_8151": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_2014": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Composer_1878": { + "type": "column", + "column": "Composer", + "fields": null + }, + "UnitPrice_1862": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9c272ec0f7014e86/expected.json b/test-snapshots/query/9c272ec0f7014e86/expected.json new file mode 100644 index 0000000..b69d3de --- /dev/null +++ b/test-snapshots/query/9c272ec0f7014e86/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1057 + }, + { + "PlaylistId": 1, + "TrackId": 1058 + }, + { + "PlaylistId": 1, + "TrackId": 1059 + }, + { + "PlaylistId": 1, + "TrackId": 1060 + }, + { + "PlaylistId": 1, + "TrackId": 1061 + }, + { + "PlaylistId": 1, + "TrackId": 1062 + }, + { + "PlaylistId": 1, + "TrackId": 1063 + }, + { + "PlaylistId": 1, + "TrackId": 1064 + }, + { + "PlaylistId": 1, + "TrackId": 1066 + }, + { + "PlaylistId": 1, + "TrackId": 1067 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c272ec0f7014e86/request.json b/test-snapshots/query/9c272ec0f7014e86/request.json new file mode 100644 index 0000000..4e5bf9f --- /dev/null +++ b/test-snapshots/query/9c272ec0f7014e86/request.json @@ -0,0 +1,46 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c2cf620d9ee1547/expected.json b/test-snapshots/query/9c2cf620d9ee1547/expected.json new file mode 100644 index 0000000..adf7af5 --- /dev/null +++ b/test-snapshots/query/9c2cf620d9ee1547/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 81, + "Bytes": 8665545, + "Composer": "Foo Fighters", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 263653, + "Name": "All My Life", + "TrackId": 1009, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c2cf620d9ee1547/request.json b/test-snapshots/query/9c2cf620d9ee1547/request.json new file mode 100644 index 0000000..34f2afd --- /dev/null +++ b/test-snapshots/query/9c2cf620d9ee1547/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1009 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c2dc896dc265b95/expected.json b/test-snapshots/query/9c2dc896dc265b95/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9c2dc896dc265b95/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c2dc896dc265b95/request.json b/test-snapshots/query/9c2dc896dc265b95/request.json new file mode 100644 index 0000000..e346293 --- /dev/null +++ b/test-snapshots/query/9c2dc896dc265b95/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c4ad90174becf8d/expected.json b/test-snapshots/query/9c4ad90174becf8d/expected.json new file mode 100644 index 0000000..b3e6bd3 --- /dev/null +++ b/test-snapshots/query/9c4ad90174becf8d/expected.json @@ -0,0 +1,140 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 1, + "ArtistId_9164": 1, + "Title_9018": "For Those About To Rock We Salute You" + }, + { + "AlbumId_7047": 4, + "ArtistId_9164": 1, + "Title_9018": "Let There Be Rock" + } + ] + }, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 13, + "ArtistId_9164": 10, + "Title_9018": "The Best Of Billy Cobham" + } + ] + }, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 141, + "ArtistId_9164": 100, + "Title_9018": "Greatest Hits" + } + ] + }, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 142, + "ArtistId_9164": 101, + "Title_9018": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId_7047": 143, + "ArtistId_9164": 101, + "Title_9018": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + }, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 144, + "ArtistId_9164": 102, + "Title_9018": "Misplaced Childhood" + } + ] + }, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 145, + "ArtistId_9164": 103, + "Title_9018": "Barulhinho Bom" + } + ] + }, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 146, + "ArtistId_9164": 104, + "Title_9018": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + }, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 147, + "ArtistId_9164": 105, + "Title_9018": "The Best Of Men At Work" + } + ] + }, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_7047": 160, + "ArtistId_9164": 106, + "Title_9018": "Ace Of Spades" + } + ] + }, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c4ad90174becf8d/request.json b/test-snapshots/query/9c4ad90174becf8d/request.json new file mode 100644 index 0000000..6c574f2 --- /dev/null +++ b/test-snapshots/query/9c4ad90174becf8d/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_7047": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_9164": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_9018": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c4e2beaa4f2569a/expected.json b/test-snapshots/query/9c4e2beaa4f2569a/expected.json new file mode 100644 index 0000000..b8a13a6 --- /dev/null +++ b/test-snapshots/query/9c4e2beaa4f2569a/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_6167": 1, + "ArtistId_0671": 1 + }, + { + "AlbumId_6167": 2, + "ArtistId_0671": 2 + }, + { + "AlbumId_6167": 3, + "ArtistId_0671": 2 + }, + { + "AlbumId_6167": 4, + "ArtistId_0671": 1 + }, + { + "AlbumId_6167": 5, + "ArtistId_0671": 3 + }, + { + "AlbumId_6167": 6, + "ArtistId_0671": 4 + }, + { + "AlbumId_6167": 7, + "ArtistId_0671": 5 + }, + { + "AlbumId_6167": 8, + "ArtistId_0671": 6 + }, + { + "AlbumId_6167": 9, + "ArtistId_0671": 7 + }, + { + "AlbumId_6167": 10, + "ArtistId_0671": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c4e2beaa4f2569a/request.json b/test-snapshots/query/9c4e2beaa4f2569a/request.json new file mode 100644 index 0000000..9779a2b --- /dev/null +++ b/test-snapshots/query/9c4e2beaa4f2569a/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_6167": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_0671": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9c4ff96cdd350ffc/expected.json b/test-snapshots/query/9c4ff96cdd350ffc/expected.json new file mode 100644 index 0000000..9ffc4dc --- /dev/null +++ b/test-snapshots/query/9c4ff96cdd350ffc/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c4ff96cdd350ffc/request.json b/test-snapshots/query/9c4ff96cdd350ffc/request.json new file mode 100644 index 0000000..6d6941b --- /dev/null +++ b/test-snapshots/query/9c4ff96cdd350ffc/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9c5508de697f62a0/expected.json b/test-snapshots/query/9c5508de697f62a0/expected.json new file mode 100644 index 0000000..cfe3131 --- /dev/null +++ b/test-snapshots/query/9c5508de697f62a0/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c5508de697f62a0/request.json b/test-snapshots/query/9c5508de697f62a0/request.json new file mode 100644 index 0000000..1a55f29 --- /dev/null +++ b/test-snapshots/query/9c5508de697f62a0/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c58b17a4d262fd5/expected.json b/test-snapshots/query/9c58b17a4d262fd5/expected.json new file mode 100644 index 0000000..1aa14ce --- /dev/null +++ b/test-snapshots/query/9c58b17a4d262fd5/expected.json @@ -0,0 +1,236 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 3, + "PostalCode_2737": "T2P 5M5" + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 5, + "PostalCode_2737": "T3B 1Y7" + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 4, + "PostalCode_2737": "T2P 5G3" + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 5, + "PostalCode_2737": "T3B 1Y7" + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 5, + "PostalCode_2737": "T3B 1Y7" + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 3, + "PostalCode_2737": "T2P 5M5" + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 3, + "PostalCode_2737": "T2P 5M5" + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 4, + "PostalCode_2737": "T2P 5G3" + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 3, + "PostalCode_2737": "T2P 5M5" + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "EmployeeId_9848": 4, + "PostalCode_2737": "T2P 5G3" + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c58b17a4d262fd5/request.json b/test-snapshots/query/9c58b17a4d262fd5/request.json new file mode 100644 index 0000000..daddb6b --- /dev/null +++ b/test-snapshots/query/9c58b17a4d262fd5/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "EmployeeId_9848": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "PostalCode_2737": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9c5a1f397fc91b52/expected.json b/test-snapshots/query/9c5a1f397fc91b52/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9c5a1f397fc91b52/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c5a1f397fc91b52/request.json b/test-snapshots/query/9c5a1f397fc91b52/request.json new file mode 100644 index 0000000..0cdcbc2 --- /dev/null +++ b/test-snapshots/query/9c5a1f397fc91b52/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9c6bebf9c33af6dd/expected.json b/test-snapshots/query/9c6bebf9c33af6dd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9c6bebf9c33af6dd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9c6bebf9c33af6dd/request.json b/test-snapshots/query/9c6bebf9c33af6dd/request.json new file mode 100644 index 0000000..b13cfea --- /dev/null +++ b/test-snapshots/query/9c6bebf9c33af6dd/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9cb60b7405a312d1/expected.json b/test-snapshots/query/9cb60b7405a312d1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9cb60b7405a312d1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9cb60b7405a312d1/request.json b/test-snapshots/query/9cb60b7405a312d1/request.json new file mode 100644 index 0000000..28517d3 --- /dev/null +++ b/test-snapshots/query/9cb60b7405a312d1/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9d0550a11cb76f/expected.json b/test-snapshots/query/9d0550a11cb76f/expected.json new file mode 100644 index 0000000..92ae407 --- /dev/null +++ b/test-snapshots/query/9d0550a11cb76f/expected.json @@ -0,0 +1,136 @@ +[ + { + "rows": [ + { + "Address_4761": "3,Raj Bhavan Road", + "City_7743": "Bangalore", + "Company_7416": null, + "Country_4340": "India", + "CustomerId_2749": 59, + "Email_9346": "puja_srivastava@yahoo.in", + "Fax_8993": null, + "FirstName_2776": "Puja", + "PostalCode_7170": "560001", + "State_9616": null, + "SupportRepId_2537": 3 + }, + { + "Address_4761": "12,Community Centre", + "City_7743": "Delhi", + "Company_7416": null, + "Country_4340": "India", + "CustomerId_2749": 58, + "Email_9346": "manoj.pareek@rediff.com", + "Fax_8993": null, + "FirstName_2776": "Manoj", + "PostalCode_7170": "110017", + "State_9616": null, + "SupportRepId_2537": 3 + }, + { + "Address_4761": "421 Bourke Street", + "City_7743": "Sidney", + "Company_7416": null, + "Country_4340": "Australia", + "CustomerId_2749": 55, + "Email_9346": "mark.taylor@yahoo.au", + "Fax_8993": null, + "FirstName_2776": "Mark", + "PostalCode_7170": "2010", + "State_9616": "NSW", + "SupportRepId_2537": 4 + }, + { + "Address_4761": "Calle Lira, 198", + "City_7743": "Santiago", + "Company_7416": null, + "Country_4340": "Chile", + "CustomerId_2749": 57, + "Email_9346": "luisrojas@yahoo.cl", + "Fax_8993": null, + "FirstName_2776": "Luis", + "PostalCode_7170": null, + "State_9616": null, + "SupportRepId_2537": 5 + }, + { + "Address_4761": "Qe 7 Bloco G", + "City_7743": "Brasília", + "Company_7416": null, + "Country_4340": "Brazil", + "CustomerId_2749": 13, + "Email_9346": "fernadaramos4@uol.com.br", + "Fax_8993": "+55 (61) 3363-7855", + "FirstName_2776": "Fernanda", + "PostalCode_7170": "71020-677", + "State_9616": "DF", + "SupportRepId_2537": 4 + }, + { + "Address_4761": "Praça Pio X, 119", + "City_7743": "Rio de Janeiro", + "Company_7416": "Riotur", + "Country_4340": "Brazil", + "CustomerId_2749": 12, + "Email_9346": "roberto.almeida@riotur.gov.br", + "Fax_8993": "+55 (21) 2271-7070", + "FirstName_2776": "Roberto", + "PostalCode_7170": "20040-020", + "State_9616": "RJ", + "SupportRepId_2537": 3 + }, + { + "Address_4761": "Av. Brigadeiro Faria Lima, 2170", + "City_7743": "São José dos Campos", + "Company_7416": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_4340": "Brazil", + "CustomerId_2749": 1, + "Email_9346": "luisg@embraer.com.br", + "Fax_8993": "+55 (12) 3923-5566", + "FirstName_2776": "Luís", + "PostalCode_7170": "12227-000", + "State_9616": "SP", + "SupportRepId_2537": 3 + }, + { + "Address_4761": "Av. Paulista, 2022", + "City_7743": "São Paulo", + "Company_7416": "Banco do Brasil S.A.", + "Country_4340": "Brazil", + "CustomerId_2749": 11, + "Email_9346": "alero@uol.com.br", + "Fax_8993": "+55 (11) 3055-8131", + "FirstName_2776": "Alexandre", + "PostalCode_7170": "01310-200", + "State_9616": "SP", + "SupportRepId_2537": 5 + }, + { + "Address_4761": "Rua Dr. Falcão Filho, 155", + "City_7743": "São Paulo", + "Company_7416": "Woodstock Discos", + "Country_4340": "Brazil", + "CustomerId_2749": 10, + "Email_9346": "eduardo@woodstock.com.br", + "Fax_8993": "+55 (11) 3033-4564", + "FirstName_2776": "Eduardo", + "PostalCode_7170": "01007-010", + "State_9616": "SP", + "SupportRepId_2537": 4 + }, + { + "Address_4761": "307 Macacha Güemes", + "City_7743": "Buenos Aires", + "Company_7416": null, + "Country_4340": "Argentina", + "CustomerId_2749": 56, + "Email_9346": "diego.gutierrez@yahoo.ar", + "Fax_8993": null, + "FirstName_2776": "Diego", + "PostalCode_7170": "1106", + "State_9616": null, + "SupportRepId_2537": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d0550a11cb76f/request.json b/test-snapshots/query/9d0550a11cb76f/request.json new file mode 100644 index 0000000..7605fd2 --- /dev/null +++ b/test-snapshots/query/9d0550a11cb76f/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_4761": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_7743": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_7416": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_4340": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_2749": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_9346": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_8993": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_2776": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "SupportRepId_2537": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "State_9616": { + "type": "column", + "column": "State", + "fields": null + }, + "PostalCode_7170": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9d255cac08d4852b/expected.json b/test-snapshots/query/9d255cac08d4852b/expected.json new file mode 100644 index 0000000..6877a1e --- /dev/null +++ b/test-snapshots/query/9d255cac08d4852b/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d255cac08d4852b/request.json b/test-snapshots/query/9d255cac08d4852b/request.json new file mode 100644 index 0000000..031fc3f --- /dev/null +++ b/test-snapshots/query/9d255cac08d4852b/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9d79882cd07999c6/expected.json b/test-snapshots/query/9d79882cd07999c6/expected.json new file mode 100644 index 0000000..e3d8bbf --- /dev/null +++ b/test-snapshots/query/9d79882cd07999c6/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_5600": 208, + "ArtistId_0026": 136 + }, + { + "AlbumId_5600": 240, + "ArtistId_0026": 150 + }, + { + "AlbumId_5600": 267, + "ArtistId_0026": 202 + }, + { + "AlbumId_5600": 334, + "ArtistId_0026": 264 + }, + { + "AlbumId_5600": 8, + "ArtistId_0026": 6 + }, + { + "AlbumId_5600": 239, + "ArtistId_0026": 150 + }, + { + "AlbumId_5600": 175, + "ArtistId_0026": 115 + }, + { + "AlbumId_5600": 287, + "ArtistId_0026": 221 + }, + { + "AlbumId_5600": 182, + "ArtistId_0026": 118 + }, + { + "AlbumId_5600": 53, + "ArtistId_0026": 21 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d79882cd07999c6/request.json b/test-snapshots/query/9d79882cd07999c6/request.json new file mode 100644 index 0000000..f92e329 --- /dev/null +++ b/test-snapshots/query/9d79882cd07999c6/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_5600": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_0026": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9d7d79ab1362475c/expected.json b/test-snapshots/query/9d7d79ab1362475c/expected.json new file mode 100644 index 0000000..b4d2f75 --- /dev/null +++ b/test-snapshots/query/9d7d79ab1362475c/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9929799, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 302994, + "Name": "What If I Do?", + "TrackId": 1000, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d7d79ab1362475c/request.json b/test-snapshots/query/9d7d79ab1362475c/request.json new file mode 100644 index 0000000..208975e --- /dev/null +++ b/test-snapshots/query/9d7d79ab1362475c/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9d823046144bc4ee/expected.json b/test-snapshots/query/9d823046144bc4ee/expected.json new file mode 100644 index 0000000..f321a58 --- /dev/null +++ b/test-snapshots/query/9d823046144bc4ee/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 1, + "TrackId_9229": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 17, + "TrackId_9229": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 8, + "TrackId_9229": 1 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 1, + "TrackId_9229": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 8, + "TrackId_9229": 11 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 1, + "TrackId_9229": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 8, + "TrackId_9229": 9 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 1, + "TrackId_9229": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 8, + "TrackId_9229": 13 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "PlaylistId_9908": 1, + "TrackId_9229": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d823046144bc4ee/request.json b/test-snapshots/query/9d823046144bc4ee/request.json new file mode 100644 index 0000000..7bcadc6 --- /dev/null +++ b/test-snapshots/query/9d823046144bc4ee/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_9908": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_9229": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9d85d16b47455e2d/expected.json b/test-snapshots/query/9d85d16b47455e2d/expected.json new file mode 100644 index 0000000..dbc1ba3 --- /dev/null +++ b/test-snapshots/query/9d85d16b47455e2d/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "ArtistId_avg_8304": 138, + "ArtistId_max_4630": 275, + "ArtistId_median_8959": 138, + "Name_min_4421": "A Cor Do Som" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d85d16b47455e2d/request.json b/test-snapshots/query/9d85d16b47455e2d/request.json new file mode 100644 index 0000000..d853e4a --- /dev/null +++ b/test-snapshots/query/9d85d16b47455e2d/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Artist", + "query": { + "aggregates": { + "Name_min_4421": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "ArtistId_avg_8304": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + }, + "ArtistId_max_4630": { + "type": "single_column", + "column": "ArtistId", + "function": "max" + }, + "ArtistId_median_8959": { + "type": "single_column", + "column": "ArtistId", + "function": "median" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9d8e24461bb3e9b4/expected.json b/test-snapshots/query/9d8e24461bb3e9b4/expected.json new file mode 100644 index 0000000..1d526aa --- /dev/null +++ b/test-snapshots/query/9d8e24461bb3e9b4/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2012-07-05" + }, + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2013-03-05" + }, + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2010-04-13" + }, + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2010-01-09" + }, + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2009-10-07" + }, + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2012-05-25" + }, + { + "BillingCountry_5568": "Italy", + "BillingPostalCode_7839": "00192", + "InvoiceDate_9698": "2010-12-02" + }, + { + "BillingCountry_5568": "Norway", + "BillingPostalCode_7839": "0171", + "InvoiceDate_9698": "2011-06-29" + }, + { + "BillingCountry_5568": "Norway", + "BillingPostalCode_7839": "0171", + "InvoiceDate_9698": "2012-02-27" + }, + { + "BillingCountry_5568": "Norway", + "BillingPostalCode_7839": "0171", + "InvoiceDate_9698": "2009-04-06" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9d8e24461bb3e9b4/request.json b/test-snapshots/query/9d8e24461bb3e9b4/request.json new file mode 100644 index 0000000..df366e7 --- /dev/null +++ b/test-snapshots/query/9d8e24461bb3e9b4/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingPostalCode_7839": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "InvoiceDate_9698": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "BillingCountry_5568": { + "type": "column", + "column": "BillingCountry", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9dcb50fa46c945cb/expected.json b/test-snapshots/query/9dcb50fa46c945cb/expected.json new file mode 100644 index 0000000..69a46df --- /dev/null +++ b/test-snapshots/query/9dcb50fa46c945cb/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "City_7657": "Buenos Aires", + "Company_3746": null, + "Country_0208": "Argentina", + "CustomerId_3032": 56, + "Email_5179": "diego.gutierrez@yahoo.ar", + "Fax_7790": null, + "LastName_5773": "Gutiérrez", + "Phone_0978": "+54 (0)11 4311 4333", + "PostalCode_7463": "1106", + "State_0043": null + }, + { + "City_7657": "Sidney", + "Company_3746": null, + "Country_0208": "Australia", + "CustomerId_3032": 55, + "Email_5179": "mark.taylor@yahoo.au", + "Fax_7790": null, + "LastName_5773": "Taylor", + "Phone_0978": "+61 (02) 9332 3633", + "PostalCode_7463": "2010", + "State_0043": "NSW" + }, + { + "City_7657": "Vienne", + "Company_3746": null, + "Country_0208": "Austria", + "CustomerId_3032": 7, + "Email_5179": "astrid.gruber@apple.at", + "Fax_7790": null, + "LastName_5773": "Gruber", + "Phone_0978": "+43 01 5134505", + "PostalCode_7463": "1010", + "State_0043": null + }, + { + "City_7657": "Brussels", + "Company_3746": null, + "Country_0208": "Belgium", + "CustomerId_3032": 8, + "Email_5179": "daan_peeters@apple.be", + "Fax_7790": null, + "LastName_5773": "Peeters", + "Phone_0978": "+32 02 219 03 03", + "PostalCode_7463": "1000", + "State_0043": null + }, + { + "City_7657": "Brasília", + "Company_3746": null, + "Country_0208": "Brazil", + "CustomerId_3032": 13, + "Email_5179": "fernadaramos4@uol.com.br", + "Fax_7790": "+55 (61) 3363-7855", + "LastName_5773": "Ramos", + "Phone_0978": "+55 (61) 3363-5547", + "PostalCode_7463": "71020-677", + "State_0043": "DF" + }, + { + "City_7657": "Rio de Janeiro", + "Company_3746": "Riotur", + "Country_0208": "Brazil", + "CustomerId_3032": 12, + "Email_5179": "roberto.almeida@riotur.gov.br", + "Fax_7790": "+55 (21) 2271-7070", + "LastName_5773": "Almeida", + "Phone_0978": "+55 (21) 2271-7000", + "PostalCode_7463": "20040-020", + "State_0043": "RJ" + }, + { + "City_7657": "São José dos Campos", + "Company_3746": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_0208": "Brazil", + "CustomerId_3032": 1, + "Email_5179": "luisg@embraer.com.br", + "Fax_7790": "+55 (12) 3923-5566", + "LastName_5773": "Gonçalves", + "Phone_0978": "+55 (12) 3923-5555", + "PostalCode_7463": "12227-000", + "State_0043": "SP" + }, + { + "City_7657": "São Paulo", + "Company_3746": "Banco do Brasil S.A.", + "Country_0208": "Brazil", + "CustomerId_3032": 11, + "Email_5179": "alero@uol.com.br", + "Fax_7790": "+55 (11) 3055-8131", + "LastName_5773": "Rocha", + "Phone_0978": "+55 (11) 3055-3278", + "PostalCode_7463": "01310-200", + "State_0043": "SP" + }, + { + "City_7657": "São Paulo", + "Company_3746": "Woodstock Discos", + "Country_0208": "Brazil", + "CustomerId_3032": 10, + "Email_5179": "eduardo@woodstock.com.br", + "Fax_7790": "+55 (11) 3033-4564", + "LastName_5773": "Martins", + "Phone_0978": "+55 (11) 3033-5446", + "PostalCode_7463": "01007-010", + "State_0043": "SP" + }, + { + "City_7657": "Edmonton", + "Company_3746": "Telus", + "Country_0208": "Canada", + "CustomerId_3032": 14, + "Email_5179": "mphilips12@shaw.ca", + "Fax_7790": "+1 (780) 434-5565", + "LastName_5773": "Philips", + "Phone_0978": "+1 (780) 434-4554", + "PostalCode_7463": "T6G 2C7", + "State_0043": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9dcb50fa46c945cb/request.json b/test-snapshots/query/9dcb50fa46c945cb/request.json new file mode 100644 index 0000000..721560b --- /dev/null +++ b/test-snapshots/query/9dcb50fa46c945cb/request.json @@ -0,0 +1,72 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "PostalCode_7463": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "City_7657": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_3746": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_0208": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_3032": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_5179": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_7790": { + "type": "column", + "column": "Fax", + "fields": null + }, + "State_0043": { + "type": "column", + "column": "State", + "fields": null + }, + "LastName_5773": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_0978": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9dcedebfd3ae0bd2/expected.json b/test-snapshots/query/9dcedebfd3ae0bd2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9dcedebfd3ae0bd2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9dcedebfd3ae0bd2/request.json b/test-snapshots/query/9dcedebfd3ae0bd2/request.json new file mode 100644 index 0000000..09f2885 --- /dev/null +++ b/test-snapshots/query/9dcedebfd3ae0bd2/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9ddcff38b9733af7/expected.json b/test-snapshots/query/9ddcff38b9733af7/expected.json new file mode 100644 index 0000000..8ba3e26 --- /dev/null +++ b/test-snapshots/query/9ddcff38b9733af7/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2009-03-04", + "Total_4016": 1.98 + }, + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2009-04-14", + "Total_4016": 13.86 + }, + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2009-12-13", + "Total_4016": 8.91 + }, + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2011-07-20", + "Total_4016": 1.98 + }, + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2011-10-22", + "Total_4016": 3.96 + }, + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2012-01-24", + "Total_4016": 5.94 + }, + { + "BillingAddress_2892": "1 Infinite Loop", + "BillingCity_7659": "Cupertino", + "BillingCountry_4891": "USA", + "CustomerId_9839": 19, + "InvoiceDate_3186": "2012-09-13", + "Total_4016": 1.99 + }, + { + "BillingAddress_2892": "1 Microsoft Way", + "BillingCity_7659": "Redmond", + "BillingCountry_4891": "USA", + "CustomerId_9839": 17, + "InvoiceDate_3186": "2009-03-04", + "Total_4016": 1.98 + }, + { + "BillingAddress_2892": "1 Microsoft Way", + "BillingCity_7659": "Redmond", + "BillingCountry_4891": "USA", + "CustomerId_9839": 17, + "InvoiceDate_3186": "2009-06-06", + "Total_4016": 3.96 + }, + { + "BillingAddress_2892": "1 Microsoft Way", + "BillingCity_7659": "Redmond", + "BillingCountry_4891": "USA", + "CustomerId_9839": 17, + "InvoiceDate_3186": "2009-09-08", + "Total_4016": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9ddcff38b9733af7/request.json b/test-snapshots/query/9ddcff38b9733af7/request.json new file mode 100644 index 0000000..2b59fc8 --- /dev/null +++ b/test-snapshots/query/9ddcff38b9733af7/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_2892": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_7659": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_4891": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "Total_4016": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceDate_3186": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "CustomerId_9839": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9de347631c4a510d/expected.json b/test-snapshots/query/9de347631c4a510d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9de347631c4a510d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9de347631c4a510d/request.json b/test-snapshots/query/9de347631c4a510d/request.json new file mode 100644 index 0000000..2381f85 --- /dev/null +++ b/test-snapshots/query/9de347631c4a510d/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9e031c2c1bedb12b/expected.json b/test-snapshots/query/9e031c2c1bedb12b/expected.json new file mode 100644 index 0000000..728229f --- /dev/null +++ b/test-snapshots/query/9e031c2c1bedb12b/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e031c2c1bedb12b/request.json b/test-snapshots/query/9e031c2c1bedb12b/request.json new file mode 100644 index 0000000..f965bb4 --- /dev/null +++ b/test-snapshots/query/9e031c2c1bedb12b/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9e21396e363bcfa6/expected.json b/test-snapshots/query/9e21396e363bcfa6/expected.json new file mode 100644 index 0000000..b0384a7 --- /dev/null +++ b/test-snapshots/query/9e21396e363bcfa6/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_7499": 137, + "Bytes_2422": 52490554, + "Composer_5699": "Jimmy Page", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 1612329, + "Name_5983": "Dazed And Confused", + "TrackId_9577": 1666, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 50, + "Bytes_2422": 39267613, + "Composer_5699": "Blackmore/Gillan/Glover/Lord/Paice", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 1196094, + "Name_5983": "Space Truckin'", + "TrackId_9577": 620, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 127, + "Bytes_2422": 36052247, + "Composer_5699": "Jimmy Page/Led Zeppelin", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 1116734, + "Name_5983": "Dazed And Confused", + "TrackId_9577": 1581, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 198, + "Bytes_2422": 34618222, + "Composer_5699": null, + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 1070027, + "Name_5983": "We've Got To Get Together/Jingo", + "TrackId_9577": 2429, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 198, + "Bytes_2422": 30200730, + "Composer_5699": null, + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 934791, + "Name_5983": "Funky Piano", + "TrackId_9577": 2432, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 50, + "Bytes_2422": 29846063, + "Composer_5699": "Gillan/Glover/Lord/Nix - Blackmore/Paice", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 913658, + "Name_5983": "Going Down / Highway Star", + "TrackId_9577": 621, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 197, + "Bytes_2422": 29207100, + "Composer_5699": "Carlos Santana", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 882834, + "Name_5983": "Santana Jam", + "TrackId_9577": 2427, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 208, + "Bytes_2422": 29008407, + "Composer_5699": "Terry Bozzio, Steve Stevens, Tony Levin", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 880640, + "Name_5983": "The Sun Road", + "TrackId_9577": 2565, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 138, + "Bytes_2422": 28191437, + "Composer_5699": "John Bonham/John Paul Jones/Robert Plant/Willie Dixon", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 863895, + "Name_5983": "Whole Lotta Love", + "TrackId_9577": 1670, + "UnitPrice_9103": 0.99 + }, + { + "AlbumId_7499": 50, + "Bytes_2422": 27775442, + "Composer_5699": "Blackmore/Coverdale", + "GenreId_1023": 1, + "MediaTypeId_6529": 1, + "Milliseconds_3246": 854700, + "Name_5983": "Mistreated (Alternate Version)", + "TrackId_9577": 622, + "UnitPrice_9103": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e21396e363bcfa6/request.json b/test-snapshots/query/9e21396e363bcfa6/request.json new file mode 100644 index 0000000..f6c39f7 --- /dev/null +++ b/test-snapshots/query/9e21396e363bcfa6/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_7499": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_2422": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_5699": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_1023": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_6529": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_3246": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_5983": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_9577": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_9103": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9e48abc874f50508/expected.json b/test-snapshots/query/9e48abc874f50508/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/9e48abc874f50508/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e48abc874f50508/request.json b/test-snapshots/query/9e48abc874f50508/request.json new file mode 100644 index 0000000..d8e31e4 --- /dev/null +++ b/test-snapshots/query/9e48abc874f50508/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9e4988d9ac8e1577/expected.json b/test-snapshots/query/9e4988d9ac8e1577/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9e4988d9ac8e1577/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e4988d9ac8e1577/request.json b/test-snapshots/query/9e4988d9ac8e1577/request.json new file mode 100644 index 0000000..bf7424f --- /dev/null +++ b/test-snapshots/query/9e4988d9ac8e1577/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9e4d001b58ea9d84/expected.json b/test-snapshots/query/9e4d001b58ea9d84/expected.json new file mode 100644 index 0000000..a003226 --- /dev/null +++ b/test-snapshots/query/9e4d001b58ea9d84/expected.json @@ -0,0 +1,140 @@ +[ + { + "rows": [ + { + "ArtistId_2640": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + }, + "Name_0517": "AC/DC" + }, + { + "ArtistId_2640": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 13, + "ArtistId": 10, + "Title": "The Best Of Billy Cobham" + } + ] + }, + "Name_0517": "Billy Cobham" + }, + { + "ArtistId_2640": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 141, + "ArtistId": 100, + "Title": "Greatest Hits" + } + ] + }, + "Name_0517": "Lenny Kravitz" + }, + { + "ArtistId_2640": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 142, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId": 143, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + }, + "Name_0517": "Lulu Santos" + }, + { + "ArtistId_2640": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 144, + "ArtistId": 102, + "Title": "Misplaced Childhood" + } + ] + }, + "Name_0517": "Marillion" + }, + { + "ArtistId_2640": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 145, + "ArtistId": 103, + "Title": "Barulhinho Bom" + } + ] + }, + "Name_0517": "Marisa Monte" + }, + { + "ArtistId_2640": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 146, + "ArtistId": 104, + "Title": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + }, + "Name_0517": "Marvin Gaye" + }, + { + "ArtistId_2640": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 147, + "ArtistId": 105, + "Title": "The Best Of Men At Work" + } + ] + }, + "Name_0517": "Men At Work" + }, + { + "ArtistId_2640": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId": 160, + "ArtistId": 106, + "Title": "Ace Of Spades" + } + ] + }, + "Name_0517": "Motörhead" + }, + { + "ArtistId_2640": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name_0517": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e4d001b58ea9d84/request.json b/test-snapshots/query/9e4d001b58ea9d84/request.json new file mode 100644 index 0000000..af226ee --- /dev/null +++ b/test-snapshots/query/9e4d001b58ea9d84/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_2640": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_0517": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9e6034d03bb54716/expected.json b/test-snapshots/query/9e6034d03bb54716/expected.json new file mode 100644 index 0000000..6e17da8 --- /dev/null +++ b/test-snapshots/query/9e6034d03bb54716/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_0819": "696 Osborne Street", + "City_8693": "Winnipeg", + "Company_6017": null, + "Country_5693": "Canada", + "Email_1285": "aaronmitchell@yahoo.ca", + "LastName_3309": "Mitchell", + "Phone_1112": "+1 (204) 452-6452", + "PostalCode_8366": "R3L 2B9", + "State_4169": "MB", + "SupportRepId_8858": 4 + }, + { + "Address_0819": "Av. Paulista, 2022", + "City_8693": "São Paulo", + "Company_6017": "Banco do Brasil S.A.", + "Country_5693": "Brazil", + "Email_1285": "alero@uol.com.br", + "LastName_3309": "Rocha", + "Phone_1112": "+55 (11) 3055-3278", + "PostalCode_8366": "01310-200", + "State_4169": "SP", + "SupportRepId_8858": 5 + }, + { + "Address_0819": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_8693": "Vienne", + "Company_6017": null, + "Country_5693": "Austria", + "Email_1285": "astrid.gruber@apple.at", + "LastName_3309": "Gruber", + "Phone_1112": "+43 01 5134505", + "PostalCode_8366": "1010", + "State_4169": null, + "SupportRepId_8858": 5 + }, + { + "Address_0819": "Ullevålsveien 14", + "City_8693": "Oslo", + "Company_6017": null, + "Country_5693": "Norway", + "Email_1285": "bjorn.hansen@yahoo.no", + "LastName_3309": "Hansen", + "Phone_1112": "+47 22 44 22 22", + "PostalCode_8366": "0171", + "State_4169": null, + "SupportRepId_8858": 4 + }, + { + "Address_0819": "4, Rue Milton", + "City_8693": "Paris", + "Company_6017": null, + "Country_5693": "France", + "Email_1285": "camille.bernard@yahoo.fr", + "LastName_3309": "Bernard", + "Phone_1112": "+33 01 49 70 65 65", + "PostalCode_8366": "75009", + "State_4169": null, + "SupportRepId_8858": 4 + }, + { + "Address_0819": "Grétrystraat 63", + "City_8693": "Brussels", + "Company_6017": null, + "Country_5693": "Belgium", + "Email_1285": "daan_peeters@apple.be", + "LastName_3309": "Peeters", + "Phone_1112": "+32 02 219 03 03", + "PostalCode_8366": "1000", + "State_4169": null, + "SupportRepId_8858": 4 + }, + { + "Address_0819": "307 Macacha Güemes", + "City_8693": "Buenos Aires", + "Company_6017": null, + "Country_5693": "Argentina", + "Email_1285": "diego.gutierrez@yahoo.ar", + "LastName_3309": "Gutiérrez", + "Phone_1112": "+54 (0)11 4311 4333", + "PostalCode_8366": "1106", + "State_4169": null, + "SupportRepId_8858": 4 + }, + { + "Address_0819": "541 Del Medio Avenue", + "City_8693": "Mountain View", + "Company_6017": null, + "Country_5693": "USA", + "Email_1285": "dmiller@comcast.com", + "LastName_3309": "Miller", + "Phone_1112": "+1 (650) 644-3358", + "PostalCode_8366": "94040-111", + "State_4169": "CA", + "SupportRepId_8858": 4 + }, + { + "Address_0819": "8, Rue Hanovre", + "City_8693": "Paris", + "Company_6017": null, + "Country_5693": "France", + "Email_1285": "dominiquelefebvre@gmail.com", + "LastName_3309": "Lefebvre", + "Phone_1112": "+33 01 47 42 71 71", + "PostalCode_8366": "75002", + "State_4169": null, + "SupportRepId_8858": 4 + }, + { + "Address_0819": "230 Elgin Street", + "City_8693": "Ottawa", + "Company_6017": null, + "Country_5693": "Canada", + "Email_1285": "edfrancis@yachoo.ca", + "LastName_3309": "Francis", + "Phone_1112": "+1 (613) 234-3322", + "PostalCode_8366": "K2P 1L7", + "State_4169": "ON", + "SupportRepId_8858": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e6034d03bb54716/request.json b/test-snapshots/query/9e6034d03bb54716/request.json new file mode 100644 index 0000000..9bcb58d --- /dev/null +++ b/test-snapshots/query/9e6034d03bb54716/request.json @@ -0,0 +1,80 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_0819": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_8693": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_6017": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_5693": { + "type": "column", + "column": "Country", + "fields": null + }, + "SupportRepId_8858": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Email_1285": { + "type": "column", + "column": "Email", + "fields": null + }, + "PostalCode_8366": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_4169": { + "type": "column", + "column": "State", + "fields": null + }, + "LastName_3309": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1112": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9e6db4cbe6a635a2/expected.json b/test-snapshots/query/9e6db4cbe6a635a2/expected.json new file mode 100644 index 0000000..7a1ddfa --- /dev/null +++ b/test-snapshots/query/9e6db4cbe6a635a2/expected.json @@ -0,0 +1,206 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 108, + "Quantity_6658": 1, + "TrackId_7367": 1 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 108, + "Quantity_6658": 1, + "TrackId_7367": 9 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 319, + "Quantity_6658": 1, + "TrackId_7367": 9 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 108, + "Quantity_6658": 1, + "TrackId_7367": 13 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 2, + "Quantity_6658": 1, + "TrackId_7367": 6 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 2, + "Quantity_6658": 1, + "TrackId_7367": 8 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 214, + "Quantity_6658": 1, + "TrackId_7367": 8 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 2, + "Quantity_6658": 1, + "TrackId_7367": 12 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 2, + "Quantity_6658": 1, + "TrackId_7367": 10 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_9992": 214, + "Quantity_6658": 1, + "TrackId_7367": 14 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e6db4cbe6a635a2/request.json b/test-snapshots/query/9e6db4cbe6a635a2/request.json new file mode 100644 index 0000000..1f2efa8 --- /dev/null +++ b/test-snapshots/query/9e6db4cbe6a635a2/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_9992": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "TrackId_7367": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Quantity_6658": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9e733093c76ab132/expected.json b/test-snapshots/query/9e733093c76ab132/expected.json new file mode 100644 index 0000000..8f990b9 --- /dev/null +++ b/test-snapshots/query/9e733093c76ab132/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "Quantity_8410": 1, + "UnitPrice_5733": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9e733093c76ab132/request.json b/test-snapshots/query/9e733093c76ab132/request.json new file mode 100644 index 0000000..e5db4a9 --- /dev/null +++ b/test-snapshots/query/9e733093c76ab132/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "UnitPrice_5733": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Quantity_8410": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9eae7fe2c919d781/expected.json b/test-snapshots/query/9eae7fe2c919d781/expected.json new file mode 100644 index 0000000..fc752c5 --- /dev/null +++ b/test-snapshots/query/9eae7fe2c919d781/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 3, + "Bytes": 4331779, + "Composer": "F. Baltes, R.A. Smith-Diesel, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 252051, + "Name": "Restless and Wild", + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9eae7fe2c919d781/request.json b/test-snapshots/query/9eae7fe2c919d781/request.json new file mode 100644 index 0000000..3103898 --- /dev/null +++ b/test-snapshots/query/9eae7fe2c919d781/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9eb0e2735d0f375f/expected.json b/test-snapshots/query/9eb0e2735d0f375f/expected.json new file mode 100644 index 0000000..c5b4c4f --- /dev/null +++ b/test-snapshots/query/9eb0e2735d0f375f/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 226, + "Bytes": 490750393, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622250, + "Name": "Battlestar Galactica: The Story So Far", + "TrackId": 2819, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 1054423946, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 5286953, + "Name": "Occupation / Precipice", + "TrackId": 2820, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 462818231, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2620245, + "Name": "A Day In the Life", + "TrackId": 2833, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 466820021, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2618000, + "Name": "Exodus, Pt. 2", + "TrackId": 2822, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 475079441, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2621708, + "Name": "Exodus, Pt. 1", + "TrackId": 2821, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 483484911, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2626626, + "Name": "Collaborators", + "TrackId": 2823, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 486233524, + "Composer": null, + "GenreId": 20, + "MediaTypeId": 3, + "Milliseconds": 2622622, + "Name": "Crossroads, Pt. 1", + "TrackId": 2837, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 489715554, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2563938, + "Name": "A Measure of Salvation", + "TrackId": 2825, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 490375760, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2623875, + "Name": "The Passage", + "TrackId": 2828, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 492700163, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624207, + "Name": "Taking a Break from All Your Worries", + "TrackId": 2831, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9eb0e2735d0f375f/request.json b/test-snapshots/query/9eb0e2735d0f375f/request.json new file mode 100644 index 0000000..ed067fb --- /dev/null +++ b/test-snapshots/query/9eb0e2735d0f375f/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9ec090228043a4b/expected.json b/test-snapshots/query/9ec090228043a4b/expected.json new file mode 100644 index 0000000..8a40bd3 --- /dev/null +++ b/test-snapshots/query/9ec090228043a4b/expected.json @@ -0,0 +1,176 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9ec090228043a4b/request.json b/test-snapshots/query/9ec090228043a4b/request.json new file mode 100644 index 0000000..f92e700 --- /dev/null +++ b/test-snapshots/query/9ec090228043a4b/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9ee0b54d2f0e2d47/expected.json b/test-snapshots/query/9ee0b54d2f0e2d47/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9ee0b54d2f0e2d47/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9ee0b54d2f0e2d47/request.json b/test-snapshots/query/9ee0b54d2f0e2d47/request.json new file mode 100644 index 0000000..23f1a9c --- /dev/null +++ b/test-snapshots/query/9ee0b54d2f0e2d47/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "michael@chinookcorp.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9f0e2d9c0394aadd/expected.json b/test-snapshots/query/9f0e2d9c0394aadd/expected.json new file mode 100644 index 0000000..2419323 --- /dev/null +++ b/test-snapshots/query/9f0e2d9c0394aadd/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 101, + "Name": "Lulu Santos" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9f0e2d9c0394aadd/request.json b/test-snapshots/query/9f0e2d9c0394aadd/request.json new file mode 100644 index 0000000..b60fefc --- /dev/null +++ b/test-snapshots/query/9f0e2d9c0394aadd/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9f1a8caf0ad35290/expected.json b/test-snapshots/query/9f1a8caf0ad35290/expected.json new file mode 100644 index 0000000..09ef815 --- /dev/null +++ b/test-snapshots/query/9f1a8caf0ad35290/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9f1a8caf0ad35290/request.json b/test-snapshots/query/9f1a8caf0ad35290/request.json new file mode 100644 index 0000000..a4678af --- /dev/null +++ b/test-snapshots/query/9f1a8caf0ad35290/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9f4a228ee7d05a36/expected.json b/test-snapshots/query/9f4a228ee7d05a36/expected.json new file mode 100644 index 0000000..08fe287 --- /dev/null +++ b/test-snapshots/query/9f4a228ee7d05a36/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_7959": 102, + "InvoiceLineId_7988": 553, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 103, + "InvoiceLineId_7988": 554, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 103, + "InvoiceLineId_7988": 563, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 193, + "InvoiceLineId_7988": 1042, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 193, + "InvoiceLineId_7988": 1043, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 193, + "InvoiceLineId_7988": 1044, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 193, + "InvoiceLineId_7988": 1045, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 193, + "InvoiceLineId_7988": 1046, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 193, + "InvoiceLineId_7988": 1047, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + }, + { + "InvoiceId_7959": 194, + "InvoiceLineId_7988": 1048, + "Quantity_1200": 1, + "UnitPrice_8217": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9f4a228ee7d05a36/request.json b/test-snapshots/query/9f4a228ee7d05a36/request.json new file mode 100644 index 0000000..d19a087 --- /dev/null +++ b/test-snapshots/query/9f4a228ee7d05a36/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_7959": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_7988": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_1200": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "UnitPrice_8217": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/9f5ff7a650dea60c/expected.json b/test-snapshots/query/9f5ff7a650dea60c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/9f5ff7a650dea60c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9f5ff7a650dea60c/request.json b/test-snapshots/query/9f5ff7a650dea60c/request.json new file mode 100644 index 0000000..5d54ea3 --- /dev/null +++ b/test-snapshots/query/9f5ff7a650dea60c/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Manager" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9fac27a5c5671723/expected.json b/test-snapshots/query/9fac27a5c5671723/expected.json new file mode 100644 index 0000000..7d9f7cf --- /dev/null +++ b/test-snapshots/query/9fac27a5c5671723/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9fac27a5c5671723/request.json b/test-snapshots/query/9fac27a5c5671723/request.json new file mode 100644 index 0000000..d7da4ab --- /dev/null +++ b/test-snapshots/query/9fac27a5c5671723/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/9fba305c8acb7416/expected.json b/test-snapshots/query/9fba305c8acb7416/expected.json new file mode 100644 index 0000000..4443c31 --- /dev/null +++ b/test-snapshots/query/9fba305c8acb7416/expected.json @@ -0,0 +1,289 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Company_1095": "Apple Inc.", + "Country_6255": "USA" + }, + { + "Company_1095": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_6255": "Brazil" + }, + { + "Company_1095": "Riotur", + "Country_6255": "Brazil" + }, + { + "Company_1095": "Rogers Canada", + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Finland" + }, + { + "Company_1095": null, + "Country_6255": "France" + } + ] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Company_1095": "Google Inc.", + "Country_6255": "USA" + }, + { + "Company_1095": "JetBrains s.r.o.", + "Country_6255": "Czech Republic" + }, + { + "Company_1095": "Woodstock Discos", + "Country_6255": "Brazil" + }, + { + "Company_1095": null, + "Country_6255": "Argentina" + }, + { + "Company_1095": null, + "Country_6255": "Australia" + }, + { + "Company_1095": null, + "Country_6255": "Belgium" + }, + { + "Company_1095": null, + "Country_6255": "Brazil" + }, + { + "Company_1095": null, + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Denmark" + }, + { + "Company_1095": null, + "Country_6255": "France" + } + ] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_CustomerSupportRepId": { + "rows": [ + { + "Company_1095": "Banco do Brasil S.A.", + "Country_6255": "Brazil" + }, + { + "Company_1095": "Microsoft Corporation", + "Country_6255": "USA" + }, + { + "Company_1095": "Telus", + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Austria" + }, + { + "Company_1095": null, + "Country_6255": "Canada" + }, + { + "Company_1095": null, + "Country_6255": "Chile" + }, + { + "Company_1095": null, + "Country_6255": "Czech Republic" + }, + { + "Company_1095": null, + "Country_6255": "France" + }, + { + "Company_1095": null, + "Country_6255": "Germany" + }, + { + "Company_1095": null, + "Country_6255": "Germany" + } + ] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/9fba305c8acb7416/request.json b/test-snapshots/query/9fba305c8acb7416/request.json new file mode 100644 index 0000000..823f430 --- /dev/null +++ b/test-snapshots/query/9fba305c8acb7416/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Company_1095": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_6255": { + "type": "column", + "column": "Country", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a027bed9d10153d2/expected.json b/test-snapshots/query/a027bed9d10153d2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a027bed9d10153d2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a027bed9d10153d2/request.json b/test-snapshots/query/a027bed9d10153d2/request.json new file mode 100644 index 0000000..341ead2 --- /dev/null +++ b/test-snapshots/query/a027bed9d10153d2/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11170334 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a05a129b750680be/expected.json b/test-snapshots/query/a05a129b750680be/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a05a129b750680be/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a05a129b750680be/request.json b/test-snapshots/query/a05a129b750680be/request.json new file mode 100644 index 0000000..3c53e27 --- /dev/null +++ b/test-snapshots/query/a05a129b750680be/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a08fff45d0bf5a35/expected.json b/test-snapshots/query/a08fff45d0bf5a35/expected.json new file mode 100644 index 0000000..2765a9f --- /dev/null +++ b/test-snapshots/query/a08fff45d0bf5a35/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Name_3800": "MPEG audio file" + }, + { + "Name_3800": "Protected AAC audio file" + }, + { + "Name_3800": "Protected MPEG-4 video file" + }, + { + "Name_3800": "Purchased AAC audio file" + }, + { + "Name_3800": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a08fff45d0bf5a35/request.json b/test-snapshots/query/a08fff45d0bf5a35/request.json new file mode 100644 index 0000000..e3afc1c --- /dev/null +++ b/test-snapshots/query/a08fff45d0bf5a35/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "Name_3800": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a1010dfd95e452a8/expected.json b/test-snapshots/query/a1010dfd95e452a8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a1010dfd95e452a8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a1010dfd95e452a8/request.json b/test-snapshots/query/a1010dfd95e452a8/request.json new file mode 100644 index 0000000..6f4dd7d --- /dev/null +++ b/test-snapshots/query/a1010dfd95e452a8/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a1043f389afc1c54/expected.json b/test-snapshots/query/a1043f389afc1c54/expected.json new file mode 100644 index 0000000..f703114 --- /dev/null +++ b/test-snapshots/query/a1043f389afc1c54/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "TrackId_5886": 597 + }, + { + "TrackId_5886": 1278 + }, + { + "TrackId_5886": 1283 + }, + { + "TrackId_5886": 1335 + }, + { + "TrackId_5886": 1345 + }, + { + "TrackId_5886": 1380 + }, + { + "TrackId_5886": 1392 + }, + { + "TrackId_5886": 152 + }, + { + "TrackId_5886": 160 + }, + { + "TrackId_5886": 1801 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a1043f389afc1c54/request.json b/test-snapshots/query/a1043f389afc1c54/request.json new file mode 100644 index 0000000..55d10a3 --- /dev/null +++ b/test-snapshots/query/a1043f389afc1c54/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "TrackId_5886": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a104d662109fe7ee/expected.json b/test-snapshots/query/a104d662109fe7ee/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a104d662109fe7ee/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a104d662109fe7ee/request.json b/test-snapshots/query/a104d662109fe7ee/request.json new file mode 100644 index 0000000..9f58b27 --- /dev/null +++ b/test-snapshots/query/a104d662109fe7ee/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "steve@chinookcorp.com" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jane" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a11794457ac42806/expected.json b/test-snapshots/query/a11794457ac42806/expected.json new file mode 100644 index 0000000..0c458d9 --- /dev/null +++ b/test-snapshots/query/a11794457ac42806/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a11794457ac42806/request.json b/test-snapshots/query/a11794457ac42806/request.json new file mode 100644 index 0000000..277321d --- /dev/null +++ b/test-snapshots/query/a11794457ac42806/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a12f0bf42dc28acc/expected.json b/test-snapshots/query/a12f0bf42dc28acc/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/a12f0bf42dc28acc/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a12f0bf42dc28acc/request.json b/test-snapshots/query/a12f0bf42dc28acc/request.json new file mode 100644 index 0000000..eaee911 --- /dev/null +++ b/test-snapshots/query/a12f0bf42dc28acc/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a13d7253e9ca77e4/expected.json b/test-snapshots/query/a13d7253e9ca77e4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a13d7253e9ca77e4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a13d7253e9ca77e4/request.json b/test-snapshots/query/a13d7253e9ca77e4/request.json new file mode 100644 index 0000000..58fc1ae --- /dev/null +++ b/test-snapshots/query/a13d7253e9ca77e4/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a185d09da13594d9/expected.json b/test-snapshots/query/a185d09da13594d9/expected.json new file mode 100644 index 0000000..1076cda --- /dev/null +++ b/test-snapshots/query/a185d09da13594d9/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Country_7705": "USA", + "Fax_2772": "+1 (408) 996-1011", + "LastName_9402": "Goyer", + "Phone_6924": "+1 (408) 996-1010", + "PostalCode_8437": "95014", + "SupportRepId_6053": 3 + }, + { + "Country_7705": "USA", + "Fax_2772": "+1 (425) 882-8081", + "LastName_9402": "Smith", + "Phone_6924": "+1 (425) 882-8080", + "PostalCode_8437": "98052-8300", + "SupportRepId_6053": 5 + }, + { + "Country_7705": "USA", + "Fax_2772": null, + "LastName_9402": "Gray", + "Phone_6924": "+1 (520) 622-4200", + "PostalCode_8437": "85719", + "SupportRepId_6053": 4 + }, + { + "Country_7705": "France", + "Fax_2772": null, + "LastName_9402": "Dubois", + "Phone_6924": "+33 04 78 30 30 30", + "PostalCode_8437": "69002", + "SupportRepId_6053": 5 + }, + { + "Country_7705": "United Kingdom", + "Fax_2772": null, + "LastName_9402": "Murray", + "Phone_6924": "+44 0131 315 3300", + "PostalCode_8437": "EH4 1HH", + "SupportRepId_6053": 5 + }, + { + "Country_7705": "United Kingdom", + "Fax_2772": null, + "LastName_9402": "Hughes", + "Phone_6924": "+44 020 7976 5722", + "PostalCode_8437": "SW1V 3EN", + "SupportRepId_6053": 3 + }, + { + "Country_7705": "India", + "Fax_2772": null, + "LastName_9402": "Pareek", + "Phone_6924": "+91 0124 39883988", + "PostalCode_8437": "110017", + "SupportRepId_6053": 3 + }, + { + "Country_7705": "USA", + "Fax_2772": null, + "LastName_9402": "Leacock", + "Phone_6924": "+1 (407) 999-7788", + "PostalCode_8437": "32801", + "SupportRepId_6053": 4 + }, + { + "Country_7705": "Canada", + "Fax_2772": null, + "LastName_9402": "Tremblay", + "Phone_6924": "+1 (514) 721-4711", + "PostalCode_8437": "H2G 1A7", + "SupportRepId_6053": 3 + }, + { + "Country_7705": "USA", + "Fax_2772": "+1 (650) 253-0000", + "LastName_9402": "Harris", + "Phone_6924": "+1 (650) 253-0000", + "PostalCode_8437": "94043-1351", + "SupportRepId_6053": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a185d09da13594d9/request.json b/test-snapshots/query/a185d09da13594d9/request.json new file mode 100644 index 0000000..f747ea8 --- /dev/null +++ b/test-snapshots/query/a185d09da13594d9/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_6053": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "PostalCode_8437": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Fax_2772": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Country_7705": { + "type": "column", + "column": "Country", + "fields": null + }, + "LastName_9402": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_6924": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a18efd347e1635b1/expected.json b/test-snapshots/query/a18efd347e1635b1/expected.json new file mode 100644 index 0000000..e865864 --- /dev/null +++ b/test-snapshots/query/a18efd347e1635b1/expected.json @@ -0,0 +1,13 @@ +[ + { + "aggregates": { + "InvoiceLineId_avg_3732": 1120.5, + "InvoiceLineId_count_2851": 2240, + "Quantity_count_2767": 2240, + "Quantity_median_5088": 1, + "Quantity_std_8389": 0, + "TrackId_min_4263": 1, + "UnitPrice_median_7157": 0.99 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/a18efd347e1635b1/request.json b/test-snapshots/query/a18efd347e1635b1/request.json new file mode 100644 index 0000000..a4d3720 --- /dev/null +++ b/test-snapshots/query/a18efd347e1635b1/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "UnitPrice_median_7157": { + "type": "single_column", + "column": "UnitPrice", + "function": "median" + }, + "Quantity_std_8389": { + "type": "single_column", + "column": "Quantity", + "function": "std" + }, + "Quantity_count_2767": { + "type": "single_column", + "column": "Quantity", + "function": "count" + }, + "TrackId_min_4263": { + "type": "single_column", + "column": "TrackId", + "function": "min" + }, + "InvoiceLineId_avg_3732": { + "type": "single_column", + "column": "InvoiceLineId", + "function": "avg" + }, + "Quantity_median_5088": { + "type": "single_column", + "column": "Quantity", + "function": "median" + }, + "InvoiceLineId_count_2851": { + "type": "single_column", + "column": "InvoiceLineId", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a19ad8cf77efe7bd/expected.json b/test-snapshots/query/a19ad8cf77efe7bd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a19ad8cf77efe7bd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a19ad8cf77efe7bd/request.json b/test-snapshots/query/a19ad8cf77efe7bd/request.json new file mode 100644 index 0000000..8a0ed8e --- /dev/null +++ b/test-snapshots/query/a19ad8cf77efe7bd/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marisa Monte" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a1a9bc7e0a8f2a92/expected.json b/test-snapshots/query/a1a9bc7e0a8f2a92/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a1a9bc7e0a8f2a92/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a1a9bc7e0a8f2a92/request.json b/test-snapshots/query/a1a9bc7e0a8f2a92/request.json new file mode 100644 index 0000000..384f1d3 --- /dev/null +++ b/test-snapshots/query/a1a9bc7e0a8f2a92/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Adams" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "jane@chinookcorp.com" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a1d7597375e353bc/expected.json b/test-snapshots/query/a1d7597375e353bc/expected.json new file mode 100644 index 0000000..012c3e4 --- /dev/null +++ b/test-snapshots/query/a1d7597375e353bc/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "Bytes_9771": 10003747, + "Composer_1138": "Caetano Veloso - Djavan", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 220, + "InvoiceLineId": 1189, + "Quantity": 1, + "TrackId": 218, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 299337, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10003794, + "Composer_1138": "O. Osbourne, R. Daisley, R. Rhoads", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 171, + "InvoiceLineId": 924, + "Quantity": 1, + "TrackId": 2101, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 308897, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10005675, + "Composer_1138": "The Tea Party", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 306337, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10009697, + "Composer_1138": "Paul Di'Anno/Steve Harris", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 309995, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10012231, + "Composer_1138": "Acyi Marques/Arlindo Bruz/Braço, Beto Sem/Zeca Pagodinho", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 306, + "InvoiceLineId": 1666, + "Quantity": 1, + "TrackId": 3159, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 299102, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10014683, + "Composer_1138": "Edward Van Halen, Alex Van Halen, Michael Anthony,/Edward Van Halen, Alex Van Halen, Michael Anthony, Sammy Hagar", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 306, + "InvoiceLineId": 1657, + "Quantity": 1, + "TrackId": 3078, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 308950, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10019269, + "Composer_1138": "Gilberto Gil", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 353, + "InvoiceLineId": 1909, + "Quantity": 1, + "TrackId": 1115, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 302733, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10019861, + "Composer_1138": "G M Sumner", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 302080, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10020122, + "Composer_1138": null, + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 296254, + "UnitPrice_2519": 0.99 + }, + { + "Bytes_9771": 10022428, + "Composer_1138": "D.Coverdal/G.Hughes/Glenn Hughes/I.Paice/Ian Paice/J.Lord/John Lord", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "MediaTypeId_7818": 1, + "Milliseconds_3955": 306860, + "UnitPrice_2519": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a1d7597375e353bc/request.json b/test-snapshots/query/a1d7597375e353bc/request.json new file mode 100644 index 0000000..6cab04d --- /dev/null +++ b/test-snapshots/query/a1d7597375e353bc/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "UnitPrice_2519": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Bytes_9771": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_1138": { + "type": "column", + "column": "Composer", + "fields": null + }, + "Milliseconds_3955": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "MediaTypeId_7818": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a1eca6fbd9b2111d/expected.json b/test-snapshots/query/a1eca6fbd9b2111d/expected.json new file mode 100644 index 0000000..742e8e5 --- /dev/null +++ b/test-snapshots/query/a1eca6fbd9b2111d/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 262, + "Bytes": 4011615, + "Composer": "Luca Gusella", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 246503, + "Name": "Amanda", + "TrackId": 3349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 262, + "Bytes": 4821485, + "Composer": "Andrea Dulbecco", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 307385, + "Name": "Despertar", + "TrackId": 3350, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4615841, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 285837, + "Name": "Din Din Wo (Little Child)", + "TrackId": 3351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4855457, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 300605, + "Name": "I Ka Barra (Your Work)", + "TrackId": 3354, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 5327463, + "Composer": "Karsh Kale/Vishal Vaid", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 327122, + "Name": "Distance", + "TrackId": 3352, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 6034098, + "Composer": "Karsh Kale", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 366085, + "Name": "One Step Beyond", + "TrackId": 3358, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3240609, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 199923, + "Name": "Love Comes", + "TrackId": 3355, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3453849, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 212044, + "Name": "I Guess You're Right", + "TrackId": 3353, + "UnitPrice": 0.99 + }, + { + "AlbumId": 266, + "Bytes": 2775071, + "Composer": "Luciana Souza", + "GenreId": 7, + "MediaTypeId": 5, + "Milliseconds": 172710, + "Name": "Muita Bobeira", + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "AlbumId": 267, + "Bytes": 4292028, + "Composer": "Aaron Goldberg", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 266936, + "Name": "OAM's Blues", + "TrackId": 3357, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a1eca6fbd9b2111d/request.json b/test-snapshots/query/a1eca6fbd9b2111d/request.json new file mode 100644 index 0000000..7fdfd24 --- /dev/null +++ b/test-snapshots/query/a1eca6fbd9b2111d/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a1ff59956375286a/expected.json b/test-snapshots/query/a1ff59956375286a/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/a1ff59956375286a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a1ff59956375286a/request.json b/test-snapshots/query/a1ff59956375286a/request.json new file mode 100644 index 0000000..e5842fc --- /dev/null +++ b/test-snapshots/query/a1ff59956375286a/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1005 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a21df9dfc276f9bd/expected.json b/test-snapshots/query/a21df9dfc276f9bd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a21df9dfc276f9bd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a21df9dfc276f9bd/request.json b/test-snapshots/query/a21df9dfc276f9bd/request.json new file mode 100644 index 0000000..5615819 --- /dev/null +++ b/test-snapshots/query/a21df9dfc276f9bd/request.json @@ -0,0 +1,112 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 58 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jack" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a248985f77f70e87/expected.json b/test-snapshots/query/a248985f77f70e87/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a248985f77f70e87/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a248985f77f70e87/request.json b/test-snapshots/query/a248985f77f70e87/request.json new file mode 100644 index 0000000..ffe2aed --- /dev/null +++ b/test-snapshots/query/a248985f77f70e87/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 9 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a26a71a7775abeef/expected.json b/test-snapshots/query/a26a71a7775abeef/expected.json new file mode 100644 index 0000000..89df90f --- /dev/null +++ b/test-snapshots/query/a26a71a7775abeef/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_6468": "Berger Straße 10", + "City_1607": "Frankfurt", + "Company_9575": null, + "Country_8425": "Germany", + "Email_3140": "fzimmermann@yahoo.de", + "Fax_0343": null, + "LastName_8635": "Zimmermann", + "PostalCode_0250": "60316", + "State_7533": null, + "SupportRepId_1076": 3 + }, + { + "Address_6468": "Ordynacka 10", + "City_1607": "Warsaw", + "Company_9575": null, + "Country_8425": "Poland", + "Email_3140": "stanisław.wójcik@wp.pl", + "Fax_0343": null, + "LastName_8635": "Wójcik", + "PostalCode_0250": "00-358", + "State_7533": null, + "SupportRepId_1076": 4 + }, + { + "Address_6468": "Klanova 9/506", + "City_1607": "Prague", + "Company_9575": "JetBrains s.r.o.", + "Country_8425": "Czech Republic", + "Email_3140": "frantisekw@jetbrains.com", + "Fax_0343": "+420 2 4172 5555", + "LastName_8635": "Wichterlová", + "PostalCode_0250": "14700", + "State_7533": null, + "SupportRepId_1076": 4 + }, + { + "Address_6468": "Lijnbaansgracht 120bg", + "City_1607": "Amsterdam", + "Company_9575": null, + "Country_8425": "Netherlands", + "Email_3140": "johavanderberg@yahoo.nl", + "Fax_0343": null, + "LastName_8635": "Van der Berg", + "PostalCode_0250": "1016", + "State_7533": "VV", + "SupportRepId_1076": 5 + }, + { + "Address_6468": "1498 rue Bélanger", + "City_1607": "Montréal", + "Company_9575": null, + "Country_8425": "Canada", + "Email_3140": "ftremblay@gmail.com", + "Fax_0343": null, + "LastName_8635": "Tremblay", + "PostalCode_0250": "H2G 1A7", + "State_7533": "QC", + "SupportRepId_1076": 3 + }, + { + "Address_6468": "421 Bourke Street", + "City_1607": "Sidney", + "Company_9575": null, + "Country_8425": "Australia", + "Email_3140": "mark.taylor@yahoo.au", + "Fax_0343": null, + "LastName_8635": "Taylor", + "PostalCode_0250": "2010", + "State_7533": "NSW", + "SupportRepId_1076": 4 + }, + { + "Address_6468": "5112 48 Street", + "City_1607": "Yellowknife", + "Company_9575": null, + "Country_8425": "Canada", + "Email_3140": "ellie.sullivan@shaw.ca", + "Fax_0343": null, + "LastName_8635": "Sullivan", + "PostalCode_0250": "X1A 1N6", + "State_7533": "NT", + "SupportRepId_1076": 3 + }, + { + "Address_6468": "319 N. Frances Street", + "City_1607": "Madison", + "Company_9575": null, + "Country_8425": "USA", + "Email_3140": "vstevens@yahoo.com", + "Fax_0343": null, + "LastName_8635": "Stevens", + "PostalCode_0250": "53703", + "State_7533": "WI", + "SupportRepId_1076": 5 + }, + { + "Address_6468": "3,Raj Bhavan Road", + "City_1607": "Bangalore", + "Company_9575": null, + "Country_8425": "India", + "Email_3140": "puja_srivastava@yahoo.in", + "Fax_0343": null, + "LastName_8635": "Srivastava", + "PostalCode_0250": "560001", + "State_7533": null, + "SupportRepId_1076": 3 + }, + { + "Address_6468": "1 Microsoft Way", + "City_1607": "Redmond", + "Company_9575": "Microsoft Corporation", + "Country_8425": "USA", + "Email_3140": "jacksmith@microsoft.com", + "Fax_0343": "+1 (425) 882-8081", + "LastName_8635": "Smith", + "PostalCode_0250": "98052-8300", + "State_7533": "WA", + "SupportRepId_1076": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a26a71a7775abeef/request.json b/test-snapshots/query/a26a71a7775abeef/request.json new file mode 100644 index 0000000..4babdca --- /dev/null +++ b/test-snapshots/query/a26a71a7775abeef/request.json @@ -0,0 +1,72 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_6468": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_1607": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_9575": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_8425": { + "type": "column", + "column": "Country", + "fields": null + }, + "State_7533": { + "type": "column", + "column": "State", + "fields": null + }, + "Email_3140": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_0343": { + "type": "column", + "column": "Fax", + "fields": null + }, + "PostalCode_0250": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "LastName_8635": { + "type": "column", + "column": "LastName", + "fields": null + }, + "SupportRepId_1076": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a2755cc1432931f3/expected.json b/test-snapshots/query/a2755cc1432931f3/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/a2755cc1432931f3/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a2755cc1432931f3/request.json b/test-snapshots/query/a2755cc1432931f3/request.json new file mode 100644 index 0000000..e92f79f --- /dev/null +++ b/test-snapshots/query/a2755cc1432931f3/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a2e7c5af814900de/expected.json b/test-snapshots/query/a2e7c5af814900de/expected.json new file mode 100644 index 0000000..f369263 --- /dev/null +++ b/test-snapshots/query/a2e7c5af814900de/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 8, + "TrackId": 1000 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a2e7c5af814900de/request.json b/test-snapshots/query/a2e7c5af814900de/request.json new file mode 100644 index 0000000..16a102a --- /dev/null +++ b/test-snapshots/query/a2e7c5af814900de/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a31838584c8e7a37/expected.json b/test-snapshots/query/a31838584c8e7a37/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a31838584c8e7a37/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a31838584c8e7a37/request.json b/test-snapshots/query/a31838584c8e7a37/request.json new file mode 100644 index 0000000..8c27f1d --- /dev/null +++ b/test-snapshots/query/a31838584c8e7a37/request.json @@ -0,0 +1,93 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a3a5b775a675ee48/expected.json b/test-snapshots/query/a3a5b775a675ee48/expected.json new file mode 100644 index 0000000..4b09134 --- /dev/null +++ b/test-snapshots/query/a3a5b775a675ee48/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_0802": "90’s Music" + }, + { + "Name_0802": "Audiobooks" + }, + { + "Name_0802": "Audiobooks" + }, + { + "Name_0802": "Brazilian Music" + }, + { + "Name_0802": "Classical" + }, + { + "Name_0802": "Classical 101 - Deep Cuts" + }, + { + "Name_0802": "Classical 101 - Next Steps" + }, + { + "Name_0802": "Classical 101 - The Basics" + }, + { + "Name_0802": "Grunge" + }, + { + "Name_0802": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3a5b775a675ee48/request.json b/test-snapshots/query/a3a5b775a675ee48/request.json new file mode 100644 index 0000000..a3ae7bc --- /dev/null +++ b/test-snapshots/query/a3a5b775a675ee48/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_0802": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a3b89aed0a6be6b8/expected.json b/test-snapshots/query/a3b89aed0a6be6b8/expected.json new file mode 100644 index 0000000..2a9723e --- /dev/null +++ b/test-snapshots/query/a3b89aed0a6be6b8/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Audiobooks", + "PlaylistId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3b89aed0a6be6b8/request.json b/test-snapshots/query/a3b89aed0a6be6b8/request.json new file mode 100644 index 0000000..7f4dbe5 --- /dev/null +++ b/test-snapshots/query/a3b89aed0a6be6b8/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a3cb40f74fb697a9/expected.json b/test-snapshots/query/a3cb40f74fb697a9/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/a3cb40f74fb697a9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3cb40f74fb697a9/request.json b/test-snapshots/query/a3cb40f74fb697a9/request.json new file mode 100644 index 0000000..086706e --- /dev/null +++ b/test-snapshots/query/a3cb40f74fb697a9/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a3cd562680bdf370/expected.json b/test-snapshots/query/a3cd562680bdf370/expected.json new file mode 100644 index 0000000..3c536e8 --- /dev/null +++ b/test-snapshots/query/a3cd562680bdf370/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "Address_9765": "1 Infinite Loop", + "Country_5514": "USA", + "CustomerId_5753": 19, + "Email_9228": "tgoyer@apple.com", + "Phone_2721": "+1 (408) 996-1010", + "State_4243": "CA", + "SupportRepId_5992": 3 + }, + { + "Address_9765": "162 E Superior Street", + "Country_5514": "USA", + "CustomerId_5753": 24, + "Email_9228": "fralston@gmail.com", + "Phone_2721": "+1 (312) 332-3232", + "State_4243": "IL", + "SupportRepId_5992": 3 + }, + { + "Address_9765": "627 Broadway", + "Country_5514": "USA", + "CustomerId_5753": 18, + "Email_9228": "michelleb@aol.com", + "Phone_2721": "+1 (212) 221-3546", + "State_4243": "NY", + "SupportRepId_5992": 3 + }, + { + "Address_9765": "1033 N Park Ave", + "Country_5514": "USA", + "CustomerId_5753": 27, + "Email_9228": "patrick.gray@aol.com", + "Phone_2721": "+1 (520) 622-4200", + "State_4243": "AZ", + "SupportRepId_5992": 4 + }, + { + "Address_9765": "1600 Amphitheatre Parkway", + "Country_5514": "USA", + "CustomerId_5753": 16, + "Email_9228": "fharris@google.com", + "Phone_2721": "+1 (650) 253-0000", + "State_4243": "CA", + "SupportRepId_5992": 4 + }, + { + "Address_9765": "541 Del Medio Avenue", + "Country_5514": "USA", + "CustomerId_5753": 20, + "Email_9228": "dmiller@comcast.com", + "Phone_2721": "+1 (650) 644-3358", + "State_4243": "CA", + "SupportRepId_5992": 4 + }, + { + "Address_9765": "120 S Orange Ave", + "Country_5514": "USA", + "CustomerId_5753": 22, + "Email_9228": "hleacock@gmail.com", + "Phone_2721": "+1 (407) 999-7788", + "State_4243": "FL", + "SupportRepId_5992": 4 + }, + { + "Address_9765": "69 Salem Street", + "Country_5514": "USA", + "CustomerId_5753": 23, + "Email_9228": "johngordon22@yahoo.com", + "Phone_2721": "+1 (617) 522-1333", + "State_4243": "MA", + "SupportRepId_5992": 4 + }, + { + "Address_9765": "2211 W Berry Street", + "Country_5514": "USA", + "CustomerId_5753": 26, + "Email_9228": "ricunningham@hotmail.com", + "Phone_2721": "+1 (817) 924-7272", + "State_4243": "TX", + "SupportRepId_5992": 4 + }, + { + "Address_9765": "801 W 4th Street", + "Country_5514": "USA", + "CustomerId_5753": 21, + "Email_9228": "kachase@hotmail.com", + "Phone_2721": "+1 (775) 223-7665", + "State_4243": "NV", + "SupportRepId_5992": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3cd562680bdf370/request.json b/test-snapshots/query/a3cd562680bdf370/request.json new file mode 100644 index 0000000..455bb3e --- /dev/null +++ b/test-snapshots/query/a3cd562680bdf370/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_9765": { + "type": "column", + "column": "Address", + "fields": null + }, + "State_4243": { + "type": "column", + "column": "State", + "fields": null + }, + "Phone_2721": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Country_5514": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_5753": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_9228": { + "type": "column", + "column": "Email", + "fields": null + }, + "SupportRepId_5992": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "SupportRepId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a3cf7404acda1428/expected.json b/test-snapshots/query/a3cf7404acda1428/expected.json new file mode 100644 index 0000000..c149a54 --- /dev/null +++ b/test-snapshots/query/a3cf7404acda1428/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3cf7404acda1428/request.json b/test-snapshots/query/a3cf7404acda1428/request.json new file mode 100644 index 0000000..50250f9 --- /dev/null +++ b/test-snapshots/query/a3cf7404acda1428/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a3cfdb556e7bd033/expected.json b/test-snapshots/query/a3cfdb556e7bd033/expected.json new file mode 100644 index 0000000..8e0f545 --- /dev/null +++ b/test-snapshots/query/a3cfdb556e7bd033/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Address_8359": "11, Place Bellecour", + "City_2728": "Lyon", + "FirstName_4497": "Marc", + "PostalCode_9789": "69002", + "State_3154": null, + "SupportRepId_5216": 5 + }, + { + "Address_8359": "110 Raeburn Pl", + "City_2728": "Edinburgh ", + "FirstName_4497": "Steve", + "PostalCode_9789": "EH4 1HH", + "State_3154": null, + "SupportRepId_5216": 5 + }, + { + "Address_8359": "113 Lupus St", + "City_2728": "London", + "FirstName_4497": "Phil", + "PostalCode_9789": "SW1V 3EN", + "State_3154": null, + "SupportRepId_5216": 3 + }, + { + "Address_8359": "12,Community Centre", + "City_2728": "Delhi", + "FirstName_4497": "Manoj", + "PostalCode_9789": "110017", + "State_3154": null, + "SupportRepId_5216": 3 + }, + { + "Address_8359": "202 Hoxton Street", + "City_2728": "London", + "FirstName_4497": "Emma", + "PostalCode_9789": "N1 5LH", + "State_3154": null, + "SupportRepId_5216": 3 + }, + { + "Address_8359": "3,Raj Bhavan Road", + "City_2728": "Bangalore", + "FirstName_4497": "Puja", + "PostalCode_9789": "560001", + "State_3154": null, + "SupportRepId_5216": 3 + }, + { + "Address_8359": "307 Macacha Güemes", + "City_2728": "Buenos Aires", + "FirstName_4497": "Diego", + "PostalCode_9789": "1106", + "State_3154": null, + "SupportRepId_5216": 4 + }, + { + "Address_8359": "4, Rue Milton", + "City_2728": "Paris", + "FirstName_4497": "Camille", + "PostalCode_9789": "75009", + "State_3154": null, + "SupportRepId_5216": 4 + }, + { + "Address_8359": "68, Rue Jouvence", + "City_2728": "Dijon", + "FirstName_4497": "Isabelle", + "PostalCode_9789": "21000", + "State_3154": null, + "SupportRepId_5216": 3 + }, + { + "Address_8359": "8, Rue Hanovre", + "City_2728": "Paris", + "FirstName_4497": "Dominique", + "PostalCode_9789": "75002", + "State_3154": null, + "SupportRepId_5216": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3cfdb556e7bd033/request.json b/test-snapshots/query/a3cfdb556e7bd033/request.json new file mode 100644 index 0000000..f47709e --- /dev/null +++ b/test-snapshots/query/a3cfdb556e7bd033/request.json @@ -0,0 +1,52 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_8359": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_2728": { + "type": "column", + "column": "City", + "fields": null + }, + "State_3154": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId_5216": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "PostalCode_9789": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "FirstName_4497": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a3d45cf73376042/expected.json b/test-snapshots/query/a3d45cf73376042/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a3d45cf73376042/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3d45cf73376042/request.json b/test-snapshots/query/a3d45cf73376042/request.json new file mode 100644 index 0000000..e897553 --- /dev/null +++ b/test-snapshots/query/a3d45cf73376042/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a3dbf3a1af2fbcf4/expected.json b/test-snapshots/query/a3dbf3a1af2fbcf4/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/a3dbf3a1af2fbcf4/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3dbf3a1af2fbcf4/request.json b/test-snapshots/query/a3dbf3a1af2fbcf4/request.json new file mode 100644 index 0000000..38af22b --- /dev/null +++ b/test-snapshots/query/a3dbf3a1af2fbcf4/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a3ddb4349eb7541e/expected.json b/test-snapshots/query/a3ddb4349eb7541e/expected.json new file mode 100644 index 0000000..287d25b --- /dev/null +++ b/test-snapshots/query/a3ddb4349eb7541e/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + }, + { + "Quantity_0347": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a3ddb4349eb7541e/request.json b/test-snapshots/query/a3ddb4349eb7541e/request.json new file mode 100644 index 0000000..0e508c4 --- /dev/null +++ b/test-snapshots/query/a3ddb4349eb7541e/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_0347": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a43db6d6727efb28/expected.json b/test-snapshots/query/a43db6d6727efb28/expected.json new file mode 100644 index 0000000..e809380 --- /dev/null +++ b/test-snapshots/query/a43db6d6727efb28/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_1685": 5, + "Name_9191": "AAC audio file" + }, + { + "MediaTypeId_1685": 4, + "Name_9191": "Purchased AAC audio file" + }, + { + "MediaTypeId_1685": 3, + "Name_9191": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_1685": 2, + "Name_9191": "Protected AAC audio file" + }, + { + "MediaTypeId_1685": 1, + "Name_9191": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a43db6d6727efb28/request.json b/test-snapshots/query/a43db6d6727efb28/request.json new file mode 100644 index 0000000..bb3b8dd --- /dev/null +++ b/test-snapshots/query/a43db6d6727efb28/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_1685": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_9191": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a4406187dcca541/expected.json b/test-snapshots/query/a4406187dcca541/expected.json new file mode 100644 index 0000000..2ce6e95 --- /dev/null +++ b/test-snapshots/query/a4406187dcca541/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a4406187dcca541/request.json b/test-snapshots/query/a4406187dcca541/request.json new file mode 100644 index 0000000..5284e78 --- /dev/null +++ b/test-snapshots/query/a4406187dcca541/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a4409a1de7bc569a/expected.json b/test-snapshots/query/a4409a1de7bc569a/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/a4409a1de7bc569a/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a4409a1de7bc569a/request.json b/test-snapshots/query/a4409a1de7bc569a/request.json new file mode 100644 index 0000000..06454ab --- /dev/null +++ b/test-snapshots/query/a4409a1de7bc569a/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a474e72e4fe6dc76/expected.json b/test-snapshots/query/a474e72e4fe6dc76/expected.json new file mode 100644 index 0000000..a95fc1d --- /dev/null +++ b/test-snapshots/query/a474e72e4fe6dc76/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a474e72e4fe6dc76/request.json b/test-snapshots/query/a474e72e4fe6dc76/request.json new file mode 100644 index 0000000..5098c4a --- /dev/null +++ b/test-snapshots/query/a474e72e4fe6dc76/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 46 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a47cb192dfbe07a0/expected.json b/test-snapshots/query/a47cb192dfbe07a0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a47cb192dfbe07a0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a47cb192dfbe07a0/request.json b/test-snapshots/query/a47cb192dfbe07a0/request.json new file mode 100644 index 0000000..b734858 --- /dev/null +++ b/test-snapshots/query/a47cb192dfbe07a0/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a497015f2ac903a7/expected.json b/test-snapshots/query/a497015f2ac903a7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a497015f2ac903a7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a497015f2ac903a7/request.json b/test-snapshots/query/a497015f2ac903a7/request.json new file mode 100644 index 0000000..ed7ba13 --- /dev/null +++ b/test-snapshots/query/a497015f2ac903a7/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a4b39e80766ce6f2/expected.json b/test-snapshots/query/a4b39e80766ce6f2/expected.json new file mode 100644 index 0000000..03669cb --- /dev/null +++ b/test-snapshots/query/a4b39e80766ce6f2/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "#9 Dream", + "TrackId_0846": 3254 + } + ] + }, + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "'Round Midnight", + "TrackId_0846": 602 + } + ] + }, + "InvoiceId": 334, + "InvoiceLineId": 1820, + "Quantity": 1, + "TrackId": 602, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "(Anesthesia) Pulling Teeth", + "TrackId_0846": 1833 + } + ] + }, + "InvoiceId": 161, + "InvoiceLineId": 874, + "Quantity": 1, + "TrackId": 1833, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "(White Man) In Hammersmith Palais", + "TrackId_0846": 2595 + } + ] + }, + "InvoiceId": 186, + "InvoiceLineId": 1005, + "Quantity": 1, + "TrackId": 2595, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "(Wish I Could) Hideaway", + "TrackId_0846": 709 + } + ] + }, + "InvoiceId": 129, + "InvoiceLineId": 696, + "Quantity": 1, + "TrackId": 709, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "...And Found", + "TrackId_0846": 2869 + } + ] + }, + "InvoiceId": 194, + "InvoiceLineId": 1049, + "Quantity": 1, + "TrackId": 2869, + "UnitPrice": 1.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "...And Justice For All", + "TrackId_0846": 1894 + } + ] + }, + "InvoiceId": 270, + "InvoiceLineId": 1464, + "Quantity": 1, + "TrackId": 1894, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "01 - Prowler", + "TrackId_0846": 1268 + } + ] + }, + "InvoiceId": 40, + "InvoiceLineId": 213, + "Quantity": 1, + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "04 - Running Free", + "TrackId_0846": 1271 + } + ] + }, + "InvoiceId": 355, + "InvoiceLineId": 1931, + "Quantity": 1, + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "Name_4106": "05 - Phantom of the Opera", + "TrackId_0846": 1272 + } + ] + }, + "InvoiceId": 145, + "InvoiceLineId": 786, + "Quantity": 1, + "TrackId": 1272, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a4b39e80766ce6f2/request.json b/test-snapshots/query/a4b39e80766ce6f2/request.json new file mode 100644 index 0000000..907cfa3 --- /dev/null +++ b/test-snapshots/query/a4b39e80766ce6f2/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "TrackId_0846": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Name_4106": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a4cf06b69f4d311a/expected.json b/test-snapshots/query/a4cf06b69f4d311a/expected.json new file mode 100644 index 0000000..f940431 --- /dev/null +++ b/test-snapshots/query/a4cf06b69f4d311a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a4cf06b69f4d311a/request.json b/test-snapshots/query/a4cf06b69f4d311a/request.json new file mode 100644 index 0000000..b243104 --- /dev/null +++ b/test-snapshots/query/a4cf06b69f4d311a/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a520af1bab9e88e4/expected.json b/test-snapshots/query/a520af1bab9e88e4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a520af1bab9e88e4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a520af1bab9e88e4/request.json b/test-snapshots/query/a520af1bab9e88e4/request.json new file mode 100644 index 0000000..319e97e --- /dev/null +++ b/test-snapshots/query/a520af1bab9e88e4/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a5219cfe92f6871e/expected.json b/test-snapshots/query/a5219cfe92f6871e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a5219cfe92f6871e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5219cfe92f6871e/request.json b/test-snapshots/query/a5219cfe92f6871e/request.json new file mode 100644 index 0000000..21cda02 --- /dev/null +++ b/test-snapshots/query/a5219cfe92f6871e/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a52f030988b3a306/expected.json b/test-snapshots/query/a52f030988b3a306/expected.json new file mode 100644 index 0000000..94aad32 --- /dev/null +++ b/test-snapshots/query/a52f030988b3a306/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "Address_7291": "11120 Jasper Ave NW", + "BirthDate_3338": "1962-02-18", + "City_1466": "Edmonton", + "Country_4936": "Canada", + "Email_5844": "andrew@chinookcorp.com", + "EmployeeId_1670": 1, + "Fax_2515": "+1 (780) 428-3457", + "FirstName_0231": "Andrew", + "HireDate_7846": "2002-08-14", + "LastName_3593": "Adams", + "Phone_0927": "+1 (780) 428-9482", + "PostalCode_0148": "T5K 2N1", + "ReportsTo_2703": null, + "State_1708": "AB", + "Title_1376": "General Manager" + }, + { + "Address_7291": "1111 6 Ave SW", + "BirthDate_3338": "1973-08-29", + "City_1466": "Calgary", + "Country_4936": "Canada", + "Email_5844": "jane@chinookcorp.com", + "EmployeeId_1670": 3, + "Fax_2515": "+1 (403) 262-6712", + "FirstName_0231": "Jane", + "HireDate_7846": "2002-04-01", + "LastName_3593": "Peacock", + "Phone_0927": "+1 (403) 262-3443", + "PostalCode_0148": "T2P 5M5", + "ReportsTo_2703": 2, + "State_1708": "AB", + "Title_1376": "Sales Support Agent" + }, + { + "Address_7291": "923 7 ST NW", + "BirthDate_3338": "1968-01-09", + "City_1466": "Lethbridge", + "Country_4936": "Canada", + "Email_5844": "laura@chinookcorp.com", + "EmployeeId_1670": 8, + "Fax_2515": "+1 (403) 467-8772", + "FirstName_0231": "Laura", + "HireDate_7846": "2004-03-04", + "LastName_3593": "Callahan", + "Phone_0927": "+1 (403) 467-3351", + "PostalCode_0148": "T1H 1Y8", + "ReportsTo_2703": 6, + "State_1708": "AB", + "Title_1376": "IT Staff" + }, + { + "Address_7291": "683 10 Street SW", + "BirthDate_3338": "1947-09-19", + "City_1466": "Calgary", + "Country_4936": "Canada", + "Email_5844": "margaret@chinookcorp.com", + "EmployeeId_1670": 4, + "Fax_2515": "+1 (403) 263-4289", + "FirstName_0231": "Margaret", + "HireDate_7846": "2003-05-03", + "LastName_3593": "Park", + "Phone_0927": "+1 (403) 263-4423", + "PostalCode_0148": "T2P 5G3", + "ReportsTo_2703": 2, + "State_1708": "AB", + "Title_1376": "Sales Support Agent" + }, + { + "Address_7291": "5827 Bowness Road NW", + "BirthDate_3338": "1973-07-01", + "City_1466": "Calgary", + "Country_4936": "Canada", + "Email_5844": "michael@chinookcorp.com", + "EmployeeId_1670": 6, + "Fax_2515": "+1 (403) 246-9899", + "FirstName_0231": "Michael", + "HireDate_7846": "2003-10-17", + "LastName_3593": "Mitchell", + "Phone_0927": "+1 (403) 246-9887", + "PostalCode_0148": "T3B 0C5", + "ReportsTo_2703": 1, + "State_1708": "AB", + "Title_1376": "IT Manager" + }, + { + "Address_7291": "825 8 Ave SW", + "BirthDate_3338": "1958-12-08", + "City_1466": "Calgary", + "Country_4936": "Canada", + "Email_5844": "nancy@chinookcorp.com", + "EmployeeId_1670": 2, + "Fax_2515": "+1 (403) 262-3322", + "FirstName_0231": "Nancy", + "HireDate_7846": "2002-05-01", + "LastName_3593": "Edwards", + "Phone_0927": "+1 (403) 262-3443", + "PostalCode_0148": "T2P 2T3", + "ReportsTo_2703": 1, + "State_1708": "AB", + "Title_1376": "Sales Manager" + }, + { + "Address_7291": "590 Columbia Boulevard West", + "BirthDate_3338": "1970-05-29", + "City_1466": "Lethbridge", + "Country_4936": "Canada", + "Email_5844": "robert@chinookcorp.com", + "EmployeeId_1670": 7, + "Fax_2515": "+1 (403) 456-8485", + "FirstName_0231": "Robert", + "HireDate_7846": "2004-01-02", + "LastName_3593": "King", + "Phone_0927": "+1 (403) 456-9986", + "PostalCode_0148": "T1K 5N8", + "ReportsTo_2703": 6, + "State_1708": "AB", + "Title_1376": "IT Staff" + }, + { + "Address_7291": "7727B 41 Ave", + "BirthDate_3338": "1965-03-03", + "City_1466": "Calgary", + "Country_4936": "Canada", + "Email_5844": "steve@chinookcorp.com", + "EmployeeId_1670": 5, + "Fax_2515": "1 (780) 836-9543", + "FirstName_0231": "Steve", + "HireDate_7846": "2003-10-17", + "LastName_3593": "Johnson", + "Phone_0927": "1 (780) 836-9987", + "PostalCode_0148": "T3B 1Y7", + "ReportsTo_2703": 2, + "State_1708": "AB", + "Title_1376": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a52f030988b3a306/request.json b/test-snapshots/query/a52f030988b3a306/request.json new file mode 100644 index 0000000..add9618 --- /dev/null +++ b/test-snapshots/query/a52f030988b3a306/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_7291": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_3338": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_1466": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_4936": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_5844": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_1670": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_2515": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_0231": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_7846": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_3593": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_0927": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_0148": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_2703": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_1708": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_1376": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a53634b5c27eab42/expected.json b/test-snapshots/query/a53634b5c27eab42/expected.json new file mode 100644 index 0000000..21a36b5 --- /dev/null +++ b/test-snapshots/query/a53634b5c27eab42/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1001 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a53634b5c27eab42/request.json b/test-snapshots/query/a53634b5c27eab42/request.json new file mode 100644 index 0000000..bca738c --- /dev/null +++ b/test-snapshots/query/a53634b5c27eab42/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a547818928d7bae5/expected.json b/test-snapshots/query/a547818928d7bae5/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/a547818928d7bae5/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a547818928d7bae5/request.json b/test-snapshots/query/a547818928d7bae5/request.json new file mode 100644 index 0000000..f78c71e --- /dev/null +++ b/test-snapshots/query/a547818928d7bae5/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a55737e95e4456e5/expected.json b/test-snapshots/query/a55737e95e4456e5/expected.json new file mode 100644 index 0000000..8cc323e --- /dev/null +++ b/test-snapshots/query/a55737e95e4456e5/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 542, + "Quantity": 1, + "TrackId": 3276, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 543, + "Quantity": 1, + "TrackId": 3280, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 101, + "InvoiceLineId": 544, + "Quantity": 1, + "TrackId": 3284, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 545, + "Quantity": 1, + "TrackId": 3290, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 546, + "Quantity": 1, + "TrackId": 3296, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 580, + "Quantity": 1, + "TrackId": 5, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a55737e95e4456e5/request.json b/test-snapshots/query/a55737e95e4456e5/request.json new file mode 100644 index 0000000..3a8a370 --- /dev/null +++ b/test-snapshots/query/a55737e95e4456e5/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a5a36524fb59d4c/expected.json b/test-snapshots/query/a5a36524fb59d4c/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/a5a36524fb59d4c/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5a36524fb59d4c/request.json b/test-snapshots/query/a5a36524fb59d4c/request.json new file mode 100644 index 0000000..b1c8634 --- /dev/null +++ b/test-snapshots/query/a5a36524fb59d4c/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 307 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a5aec6e01dbfe868/expected.json b/test-snapshots/query/a5aec6e01dbfe868/expected.json new file mode 100644 index 0000000..fc9707f --- /dev/null +++ b/test-snapshots/query/a5aec6e01dbfe868/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5aec6e01dbfe868/request.json b/test-snapshots/query/a5aec6e01dbfe868/request.json new file mode 100644 index 0000000..d58b218 --- /dev/null +++ b/test-snapshots/query/a5aec6e01dbfe868/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "fharris@google.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a5b86eb75cdbba62/expected.json b/test-snapshots/query/a5b86eb75cdbba62/expected.json new file mode 100644 index 0000000..9ba7956 --- /dev/null +++ b/test-snapshots/query/a5b86eb75cdbba62/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5b86eb75cdbba62/request.json b/test-snapshots/query/a5b86eb75cdbba62/request.json new file mode 100644 index 0000000..c1a654f --- /dev/null +++ b/test-snapshots/query/a5b86eb75cdbba62/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Snowballed" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a5c4b276d5a7c500/expected.json b/test-snapshots/query/a5c4b276d5a7c500/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/a5c4b276d5a7c500/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5c4b276d5a7c500/request.json b/test-snapshots/query/a5c4b276d5a7c500/request.json new file mode 100644 index 0000000..0b0e76b --- /dev/null +++ b/test-snapshots/query/a5c4b276d5a7c500/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a5e481a4d361e4ff/expected.json b/test-snapshots/query/a5e481a4d361e4ff/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/a5e481a4d361e4ff/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5e481a4d361e4ff/request.json b/test-snapshots/query/a5e481a4d361e4ff/request.json new file mode 100644 index 0000000..8d8e1ce --- /dev/null +++ b/test-snapshots/query/a5e481a4d361e4ff/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a5e494cff4c6ea87/expected.json b/test-snapshots/query/a5e494cff4c6ea87/expected.json new file mode 100644 index 0000000..3c9bfaf --- /dev/null +++ b/test-snapshots/query/a5e494cff4c6ea87/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress_7081": "12,Community Centre", + "BillingCity_5318": "Delhi", + "BillingCountry_7277": "India", + "BillingPostalCode_8084": "110017", + "BillingState_2611": null, + "CustomerId_4617": 58, + "InvoiceDate_1851": "2013-12-22", + "InvoiceId_4475": 412, + "Total_4827": 1.99 + }, + { + "BillingAddress_7081": "Porthaninkatu 9", + "BillingCity_5318": "Helsinki", + "BillingCountry_7277": "Finland", + "BillingPostalCode_8084": "00530", + "BillingState_2611": null, + "CustomerId_4617": 44, + "InvoiceDate_1851": "2013-12-14", + "InvoiceId_4475": 411, + "Total_4827": 13.86 + }, + { + "BillingAddress_7081": "Rua dos Campeões Europeus de Viena, 4350", + "BillingCity_5318": "Porto", + "BillingCountry_7277": "Portugal", + "BillingPostalCode_8084": null, + "BillingState_2611": null, + "CustomerId_4617": 35, + "InvoiceDate_1851": "2013-12-09", + "InvoiceId_4475": 410, + "Total_4827": 8.91 + }, + { + "BillingAddress_7081": "796 Dundas Street West", + "BillingCity_5318": "Toronto", + "BillingCountry_7277": "Canada", + "BillingPostalCode_8084": "M6J 1V1", + "BillingState_2611": "ON", + "CustomerId_4617": 29, + "InvoiceDate_1851": "2013-12-06", + "InvoiceId_4475": 409, + "Total_4827": 5.94 + }, + { + "BillingAddress_7081": "319 N. Frances Street", + "BillingCity_5318": "Madison", + "BillingCountry_7277": "USA", + "BillingPostalCode_8084": "53703", + "BillingState_2611": "WI", + "CustomerId_4617": 25, + "InvoiceDate_1851": "2013-12-05", + "InvoiceId_4475": 408, + "Total_4827": 3.96 + }, + { + "BillingAddress_7081": "69 Salem Street", + "BillingCity_5318": "Boston", + "BillingCountry_7277": "USA", + "BillingPostalCode_8084": "2113", + "BillingState_2611": "MA", + "CustomerId_4617": 23, + "InvoiceDate_1851": "2013-12-04", + "InvoiceId_4475": 407, + "Total_4827": 1.98 + }, + { + "BillingAddress_7081": "801 W 4th Street", + "BillingCity_5318": "Reno", + "BillingCountry_7277": "USA", + "BillingPostalCode_8084": "89503", + "BillingState_2611": "NV", + "CustomerId_4617": 21, + "InvoiceDate_1851": "2013-12-04", + "InvoiceId_4475": 406, + "Total_4827": 1.98 + }, + { + "BillingAddress_7081": "541 Del Medio Avenue", + "BillingCity_5318": "Mountain View", + "BillingCountry_7277": "USA", + "BillingPostalCode_8084": "94040-111", + "BillingState_2611": "CA", + "CustomerId_4617": 20, + "InvoiceDate_1851": "2013-11-21", + "InvoiceId_4475": 405, + "Total_4827": 0.99 + }, + { + "BillingAddress_7081": "Rilská 3174/6", + "BillingCity_5318": "Prague", + "BillingCountry_7277": "Czech Republic", + "BillingPostalCode_8084": "14300", + "BillingState_2611": null, + "CustomerId_4617": 6, + "InvoiceDate_1851": "2013-11-13", + "InvoiceId_4475": 404, + "Total_4827": 25.86 + }, + { + "BillingAddress_7081": "307 Macacha Güemes", + "BillingCity_5318": "Buenos Aires", + "BillingCountry_7277": "Argentina", + "BillingPostalCode_8084": "1106", + "BillingState_2611": null, + "CustomerId_4617": 56, + "InvoiceDate_1851": "2013-11-08", + "InvoiceId_4475": 403, + "Total_4827": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a5e494cff4c6ea87/request.json b/test-snapshots/query/a5e494cff4c6ea87/request.json new file mode 100644 index 0000000..875ec08 --- /dev/null +++ b/test-snapshots/query/a5e494cff4c6ea87/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_7081": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_5318": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_7277": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_8084": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_2611": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_4617": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_1851": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_4475": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_4827": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a61ca68f4fd1142b/expected.json b/test-snapshots/query/a61ca68f4fd1142b/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/a61ca68f4fd1142b/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a61ca68f4fd1142b/request.json b/test-snapshots/query/a61ca68f4fd1142b/request.json new file mode 100644 index 0000000..33a19e2 --- /dev/null +++ b/test-snapshots/query/a61ca68f4fd1142b/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1007 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a61d0ec6e9780466/expected.json b/test-snapshots/query/a61d0ec6e9780466/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a61d0ec6e9780466/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a61d0ec6e9780466/request.json b/test-snapshots/query/a61d0ec6e9780466/request.json new file mode 100644 index 0000000..ca1319b --- /dev/null +++ b/test-snapshots/query/a61d0ec6e9780466/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "WA" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a65e3af40d0f5193/expected.json b/test-snapshots/query/a65e3af40d0f5193/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a65e3af40d0f5193/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a65e3af40d0f5193/request.json b/test-snapshots/query/a65e3af40d0f5193/request.json new file mode 100644 index 0000000..a0334f1 --- /dev/null +++ b/test-snapshots/query/a65e3af40d0f5193/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a664131a48e77692/expected.json b/test-snapshots/query/a664131a48e77692/expected.json new file mode 100644 index 0000000..607a546 --- /dev/null +++ b/test-snapshots/query/a664131a48e77692/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "BillingCity_7212": "Delhi", + "CustomerId_7594": 58, + "Total_8932": 1.99 + }, + { + "BillingCity_7212": "Helsinki", + "CustomerId_7594": 44, + "Total_8932": 13.86 + }, + { + "BillingCity_7212": "Porto", + "CustomerId_7594": 35, + "Total_8932": 8.91 + }, + { + "BillingCity_7212": "Toronto", + "CustomerId_7594": 29, + "Total_8932": 5.94 + }, + { + "BillingCity_7212": "Madison", + "CustomerId_7594": 25, + "Total_8932": 3.96 + }, + { + "BillingCity_7212": "Boston", + "CustomerId_7594": 23, + "Total_8932": 1.98 + }, + { + "BillingCity_7212": "Reno", + "CustomerId_7594": 21, + "Total_8932": 1.98 + }, + { + "BillingCity_7212": "Mountain View", + "CustomerId_7594": 20, + "Total_8932": 0.99 + }, + { + "BillingCity_7212": "Prague", + "CustomerId_7594": 6, + "Total_8932": 25.86 + }, + { + "BillingCity_7212": "Buenos Aires", + "CustomerId_7594": 56, + "Total_8932": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a664131a48e77692/request.json b/test-snapshots/query/a664131a48e77692/request.json new file mode 100644 index 0000000..27f43ef --- /dev/null +++ b/test-snapshots/query/a664131a48e77692/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "Total_8932": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingCity_7212": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "CustomerId_7594": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a68ef3fe52ef5985/expected.json b/test-snapshots/query/a68ef3fe52ef5985/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/a68ef3fe52ef5985/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a68ef3fe52ef5985/request.json b/test-snapshots/query/a68ef3fe52ef5985/request.json new file mode 100644 index 0000000..067a1b7 --- /dev/null +++ b/test-snapshots/query/a68ef3fe52ef5985/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a69705af0086ee67/expected.json b/test-snapshots/query/a69705af0086ee67/expected.json new file mode 100644 index 0000000..0f80991 --- /dev/null +++ b/test-snapshots/query/a69705af0086ee67/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Title_6902": "[1997] Black Light Syndrome" + }, + { + "Title_6902": "Zooropa" + }, + { + "Title_6902": "Worlds" + }, + { + "Title_6902": "Weill: The Seven Deadly Sins" + }, + { + "Title_6902": "Warner 25 Anos" + }, + { + "Title_6902": "War" + }, + { + "Title_6902": "Walking Into Clarksdale" + }, + { + "Title_6902": "Wagner: Favourite Overtures" + }, + { + "Title_6902": "Vs." + }, + { + "Title_6902": "Vozes do MPB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a69705af0086ee67/request.json b/test-snapshots/query/a69705af0086ee67/request.json new file mode 100644 index 0000000..fd3154e --- /dev/null +++ b/test-snapshots/query/a69705af0086ee67/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_6902": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a6c210e7f76cebbc/expected.json b/test-snapshots/query/a6c210e7f76cebbc/expected.json new file mode 100644 index 0000000..728229f --- /dev/null +++ b/test-snapshots/query/a6c210e7f76cebbc/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a6c210e7f76cebbc/request.json b/test-snapshots/query/a6c210e7f76cebbc/request.json new file mode 100644 index 0000000..c985fb2 --- /dev/null +++ b/test-snapshots/query/a6c210e7f76cebbc/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a6ceec32bf9fe835/expected.json b/test-snapshots/query/a6ceec32bf9fe835/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a6ceec32bf9fe835/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a6ceec32bf9fe835/request.json b/test-snapshots/query/a6ceec32bf9fe835/request.json new file mode 100644 index 0000000..a4fb42c --- /dev/null +++ b/test-snapshots/query/a6ceec32bf9fe835/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a6e414adb6ab261d/expected.json b/test-snapshots/query/a6e414adb6ab261d/expected.json new file mode 100644 index 0000000..92545f8 --- /dev/null +++ b/test-snapshots/query/a6e414adb6ab261d/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_9924": 1 + }, + { + "MediaTypeId_9924": 2 + }, + { + "MediaTypeId_9924": 3 + }, + { + "MediaTypeId_9924": 4 + }, + { + "MediaTypeId_9924": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a6e414adb6ab261d/request.json b/test-snapshots/query/a6e414adb6ab261d/request.json new file mode 100644 index 0000000..a51684a --- /dev/null +++ b/test-snapshots/query/a6e414adb6ab261d/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_9924": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a6f87a4f695fd35b/expected.json b/test-snapshots/query/a6f87a4f695fd35b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a6f87a4f695fd35b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a6f87a4f695fd35b/request.json b/test-snapshots/query/a6f87a4f695fd35b/request.json new file mode 100644 index 0000000..01397ce --- /dev/null +++ b/test-snapshots/query/a6f87a4f695fd35b/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "France" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 27 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a70143caa10d3a96/expected.json b/test-snapshots/query/a70143caa10d3a96/expected.json new file mode 100644 index 0000000..ee04541 --- /dev/null +++ b/test-snapshots/query/a70143caa10d3a96/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a70143caa10d3a96/request.json b/test-snapshots/query/a70143caa10d3a96/request.json new file mode 100644 index 0000000..4c3da30 --- /dev/null +++ b/test-snapshots/query/a70143caa10d3a96/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a7093b417509a3f3/expected.json b/test-snapshots/query/a7093b417509a3f3/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/a7093b417509a3f3/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a7093b417509a3f3/request.json b/test-snapshots/query/a7093b417509a3f3/request.json new file mode 100644 index 0000000..b97af32 --- /dev/null +++ b/test-snapshots/query/a7093b417509a3f3/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a71a09523e2675a5/expected.json b/test-snapshots/query/a71a09523e2675a5/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/a71a09523e2675a5/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a71a09523e2675a5/request.json b/test-snapshots/query/a71a09523e2675a5/request.json new file mode 100644 index 0000000..3453aca --- /dev/null +++ b/test-snapshots/query/a71a09523e2675a5/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a73e0c3364ad61ee/expected.json b/test-snapshots/query/a73e0c3364ad61ee/expected.json new file mode 100644 index 0000000..dbffd53 --- /dev/null +++ b/test-snapshots/query/a73e0c3364ad61ee/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1020 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1021 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1022 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1023 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1024 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1025 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1026 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1027 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1028 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_4686": "90’s Music", + "PlaylistId_1031": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a73e0c3364ad61ee/request.json b/test-snapshots/query/a73e0c3364ad61ee/request.json new file mode 100644 index 0000000..d1d5af7 --- /dev/null +++ b/test-snapshots/query/a73e0c3364ad61ee/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name_4686": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_1031": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a73fcea3d1bb5fb4/expected.json b/test-snapshots/query/a73fcea3d1bb5fb4/expected.json new file mode 100644 index 0000000..ab0fbfc --- /dev/null +++ b/test-snapshots/query/a73fcea3d1bb5fb4/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "AlbumId": 2, + "Bytes": 5510424, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 342562, + "Name": "Balls to the Wall", + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "AlbumId": 3, + "Bytes": 4331779, + "Composer": "F. Baltes, R.A. Smith-Diesel, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 252051, + "Name": "Restless and Wild", + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a73fcea3d1bb5fb4/request.json b/test-snapshots/query/a73fcea3d1bb5fb4/request.json new file mode 100644 index 0000000..cdbf073 --- /dev/null +++ b/test-snapshots/query/a73fcea3d1bb5fb4/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a74fe6e17d95364/expected.json b/test-snapshots/query/a74fe6e17d95364/expected.json new file mode 100644 index 0000000..3512dbd --- /dev/null +++ b/test-snapshots/query/a74fe6e17d95364/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a74fe6e17d95364/request.json b/test-snapshots/query/a74fe6e17d95364/request.json new file mode 100644 index 0000000..f0b732f --- /dev/null +++ b/test-snapshots/query/a74fe6e17d95364/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a7a50fe878f9fb43/expected.json b/test-snapshots/query/a7a50fe878f9fb43/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a7a50fe878f9fb43/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a7a50fe878f9fb43/request.json b/test-snapshots/query/a7a50fe878f9fb43/request.json new file mode 100644 index 0000000..e00d72a --- /dev/null +++ b/test-snapshots/query/a7a50fe878f9fb43/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a7c07ddd1cfacbbb/expected.json b/test-snapshots/query/a7c07ddd1cfacbbb/expected.json new file mode 100644 index 0000000..65a3604 --- /dev/null +++ b/test-snapshots/query/a7c07ddd1cfacbbb/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a7c07ddd1cfacbbb/request.json b/test-snapshots/query/a7c07ddd1cfacbbb/request.json new file mode 100644 index 0000000..0e32429 --- /dev/null +++ b/test-snapshots/query/a7c07ddd1cfacbbb/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a7e5577b7e3b2280/expected.json b/test-snapshots/query/a7e5577b7e3b2280/expected.json new file mode 100644 index 0000000..139da0b --- /dev/null +++ b/test-snapshots/query/a7e5577b7e3b2280/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a7e5577b7e3b2280/request.json b/test-snapshots/query/a7e5577b7e3b2280/request.json new file mode 100644 index 0000000..6335253 --- /dev/null +++ b/test-snapshots/query/a7e5577b7e3b2280/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a81f506f7cd5a662/expected.json b/test-snapshots/query/a81f506f7cd5a662/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/a81f506f7cd5a662/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a81f506f7cd5a662/request.json b/test-snapshots/query/a81f506f7cd5a662/request.json new file mode 100644 index 0000000..38396ce --- /dev/null +++ b/test-snapshots/query/a81f506f7cd5a662/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a86df9f5e385e308/expected.json b/test-snapshots/query/a86df9f5e385e308/expected.json new file mode 100644 index 0000000..851a602 --- /dev/null +++ b/test-snapshots/query/a86df9f5e385e308/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 142, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 01" + }, + { + "AlbumId": 143, + "ArtistId": 101, + "Title": "Lulu Santos - RCA 100 Anos De Música - Álbum 02" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a86df9f5e385e308/request.json b/test-snapshots/query/a86df9f5e385e308/request.json new file mode 100644 index 0000000..c284401 --- /dev/null +++ b/test-snapshots/query/a86df9f5e385e308/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a88db444949da6ae/expected.json b/test-snapshots/query/a88db444949da6ae/expected.json new file mode 100644 index 0000000..175fd4f --- /dev/null +++ b/test-snapshots/query/a88db444949da6ae/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_8136": 347, + "ArtistId_5530": 275, + "Title_5700": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_8136": 346, + "ArtistId_5530": 274, + "Title_5700": "Mozart: Chamber Music" + }, + { + "AlbumId_8136": 345, + "ArtistId_5530": 273, + "Title_5700": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_8136": 344, + "ArtistId_5530": 272, + "Title_5700": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_8136": 343, + "ArtistId_5530": 226, + "Title_5700": "Respighi:Pines of Rome" + }, + { + "AlbumId_8136": 342, + "ArtistId_5530": 271, + "Title_5700": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_8136": 341, + "ArtistId_5530": 270, + "Title_5700": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_8136": 340, + "ArtistId_5530": 269, + "Title_5700": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_8136": 339, + "ArtistId_5530": 268, + "Title_5700": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_8136": 338, + "ArtistId_5530": 267, + "Title_5700": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a88db444949da6ae/request.json b/test-snapshots/query/a88db444949da6ae/request.json new file mode 100644 index 0000000..4b19c1c --- /dev/null +++ b/test-snapshots/query/a88db444949da6ae/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_8136": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_5530": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_5700": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a89163b75eeb8c26/expected.json b/test-snapshots/query/a89163b75eeb8c26/expected.json new file mode 100644 index 0000000..2db15e7 --- /dev/null +++ b/test-snapshots/query/a89163b75eeb8c26/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + }, + { + "Quantity_2720": 1, + "UnitPrice_1287": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a89163b75eeb8c26/request.json b/test-snapshots/query/a89163b75eeb8c26/request.json new file mode 100644 index 0000000..a17a9a7 --- /dev/null +++ b/test-snapshots/query/a89163b75eeb8c26/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_2720": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "UnitPrice_1287": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a8b17c54a1231f1b/expected.json b/test-snapshots/query/a8b17c54a1231f1b/expected.json new file mode 100644 index 0000000..a726b78 --- /dev/null +++ b/test-snapshots/query/a8b17c54a1231f1b/expected.json @@ -0,0 +1,226 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "InvoiceId_2005": 15, + "InvoiceLineId_0699": 77, + "Quantity_9907": 1, + "TrackId_4390": 466, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "InvoiceId_2005": 15, + "InvoiceLineId_0699": 78, + "Quantity_9907": 1, + "TrackId_4390": 468, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 136, + "Quantity_9907": 1, + "TrackId_4390": 795, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 137, + "Quantity_9907": 1, + "TrackId_4390": 804, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 138, + "Quantity_9907": 1, + "TrackId_4390": 813, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 139, + "Quantity_9907": 1, + "TrackId_4390": 822, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 140, + "Quantity_9907": 1, + "TrackId_4390": 831, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 141, + "Quantity_9907": 1, + "TrackId_4390": 840, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 142, + "Quantity_9907": 1, + "TrackId_4390": 849, + "UnitPrice_5959": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceId_2005": 26, + "InvoiceLineId_0699": 143, + "Quantity_9907": 1, + "TrackId_4390": 858, + "UnitPrice_5959": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a8b17c54a1231f1b/request.json b/test-snapshots/query/a8b17c54a1231f1b/request.json new file mode 100644 index 0000000..acd0f96 --- /dev/null +++ b/test-snapshots/query/a8b17c54a1231f1b/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_2005": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_0699": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_9907": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_4390": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_5959": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a8c1a6bc491a8546/expected.json b/test-snapshots/query/a8c1a6bc491a8546/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/a8c1a6bc491a8546/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a8c1a6bc491a8546/request.json b/test-snapshots/query/a8c1a6bc491a8546/request.json new file mode 100644 index 0000000..993c89e --- /dev/null +++ b/test-snapshots/query/a8c1a6bc491a8546/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a8df8aae68d67060/expected.json b/test-snapshots/query/a8df8aae68d67060/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a8df8aae68d67060/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a8df8aae68d67060/request.json b/test-snapshots/query/a8df8aae68d67060/request.json new file mode 100644 index 0000000..309d337 --- /dev/null +++ b/test-snapshots/query/a8df8aae68d67060/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a8faac4ef66f66ad/expected.json b/test-snapshots/query/a8faac4ef66f66ad/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a8faac4ef66f66ad/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a8faac4ef66f66ad/request.json b/test-snapshots/query/a8faac4ef66f66ad/request.json new file mode 100644 index 0000000..90cb517 --- /dev/null +++ b/test-snapshots/query/a8faac4ef66f66ad/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-09-08" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a915b5d8eb3c941b/expected.json b/test-snapshots/query/a915b5d8eb3c941b/expected.json new file mode 100644 index 0000000..e62a282 --- /dev/null +++ b/test-snapshots/query/a915b5d8eb3c941b/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "AlbumId_0507": 200, + "Bytes_7591": 38747, + "Composer_6450": "Samuel Rosa", + "GenreId_4353": 1, + "MediaTypeId_3852": 1, + "TrackId_1970": 2461, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 18, + "Bytes_7591": 161266, + "Composer_6450": null, + "GenreId_4353": 4, + "MediaTypeId_3852": 1, + "TrackId_1970": 168, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 18, + "Bytes_7591": 211997, + "Composer_6450": null, + "GenreId_4353": 4, + "MediaTypeId_3852": 1, + "TrackId_1970": 170, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 18, + "Bytes_7591": 224313, + "Composer_6450": null, + "GenreId_4353": 4, + "MediaTypeId_3852": 1, + "TrackId_1970": 178, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 258, + "Bytes_7591": 319888, + "Composer_6450": "L. Muggerud", + "GenreId_4353": 17, + "MediaTypeId_3852": 1, + "TrackId_1970": 3304, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 18, + "Bytes_7591": 387360, + "Composer_6450": null, + "GenreId_4353": 4, + "MediaTypeId_3852": 1, + "TrackId_1970": 172, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 258, + "Bytes_7591": 850698, + "Composer_6450": "L. Muggerud", + "GenreId_4353": 17, + "MediaTypeId_3852": 1, + "TrackId_1970": 3310, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 184, + "Bytes_7591": 967098, + "Composer_6450": null, + "GenreId_4353": 17, + "MediaTypeId_3852": 1, + "TrackId_1970": 2241, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 85, + "Bytes_7591": 1039615, + "Composer_6450": "Gilberto Gil", + "GenreId_4353": 10, + "MediaTypeId_3852": 1, + "TrackId_1970": 1086, + "UnitPrice_9068": 0.99 + }, + { + "AlbumId_0507": 24, + "Bytes_7591": 1103013, + "Composer_6450": "Chico Science", + "GenreId_4353": 7, + "MediaTypeId_3852": 1, + "TrackId_1970": 246, + "UnitPrice_9068": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a915b5d8eb3c941b/request.json b/test-snapshots/query/a915b5d8eb3c941b/request.json new file mode 100644 index 0000000..ef52b27 --- /dev/null +++ b/test-snapshots/query/a915b5d8eb3c941b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_0507": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7591": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_6450": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_4353": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_3852": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "UnitPrice_9068": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "TrackId_1970": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a92d739d4568a56a/expected.json b/test-snapshots/query/a92d739d4568a56a/expected.json new file mode 100644 index 0000000..ed226db --- /dev/null +++ b/test-snapshots/query/a92d739d4568a56a/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + }, + { + "Name": "Music", + "PlaylistId": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a92d739d4568a56a/request.json b/test-snapshots/query/a92d739d4568a56a/request.json new file mode 100644 index 0000000..ba25b2a --- /dev/null +++ b/test-snapshots/query/a92d739d4568a56a/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a93b37fa88222abc/expected.json b/test-snapshots/query/a93b37fa88222abc/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/a93b37fa88222abc/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a93b37fa88222abc/request.json b/test-snapshots/query/a93b37fa88222abc/request.json new file mode 100644 index 0000000..23fdfae --- /dev/null +++ b/test-snapshots/query/a93b37fa88222abc/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 260 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a93c47b99646edd4/expected.json b/test-snapshots/query/a93c47b99646edd4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a93c47b99646edd4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a93c47b99646edd4/request.json b/test-snapshots/query/a93c47b99646edd4/request.json new file mode 100644 index 0000000..7d32ec5 --- /dev/null +++ b/test-snapshots/query/a93c47b99646edd4/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-8772" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Adams" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a9417af90fb28755/expected.json b/test-snapshots/query/a9417af90fb28755/expected.json new file mode 100644 index 0000000..addd6ca --- /dev/null +++ b/test-snapshots/query/a9417af90fb28755/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 184, + "Bytes": 10426550, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 315637, + "Name": "ZeroVinteUm", + "TrackId": 2238, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 13559173, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 410409, + "Name": "Se Liga", + "TrackId": 2253, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 3304738, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 100858, + "Name": "Seus Amigos", + "TrackId": 2247, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 3947664, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 121704, + "Name": "Quem Me Cobrou?", + "TrackId": 2252, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 4116536, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 121808, + "Name": "Nega Do Cabelo Duro", + "TrackId": 2250, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 4991935, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 151536, + "Name": "Hip Hop Rio", + "TrackId": 2240, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 5407744, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 165146, + "Name": "100% HardCore", + "TrackId": 2242, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 5683369, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 171964, + "Name": "O Bicho Tá Pregando", + "TrackId": 2245, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 5723677, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 172591, + "Name": "Queimando Tudo", + "TrackId": 2239, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 6009946, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 185103, + "Name": "Adoled (Ocean)", + "TrackId": 2246, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9417af90fb28755/request.json b/test-snapshots/query/a9417af90fb28755/request.json new file mode 100644 index 0000000..6b0e572 --- /dev/null +++ b/test-snapshots/query/a9417af90fb28755/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Hip Hop/Rap" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a9615cc5e3738a13/expected.json b/test-snapshots/query/a9615cc5e3738a13/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a9615cc5e3738a13/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9615cc5e3738a13/request.json b/test-snapshots/query/a9615cc5e3738a13/request.json new file mode 100644 index 0000000..19dd574 --- /dev/null +++ b/test-snapshots/query/a9615cc5e3738a13/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a9753a8cb2f0f572/expected.json b/test-snapshots/query/a9753a8cb2f0f572/expected.json new file mode 100644 index 0000000..116bd11 --- /dev/null +++ b/test-snapshots/query/a9753a8cb2f0f572/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9753a8cb2f0f572/request.json b/test-snapshots/query/a9753a8cb2f0f572/request.json new file mode 100644 index 0000000..f64951b --- /dev/null +++ b/test-snapshots/query/a9753a8cb2f0f572/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Phil" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a97ef67e98bf0dac/expected.json b/test-snapshots/query/a97ef67e98bf0dac/expected.json new file mode 100644 index 0000000..8e4ed76 --- /dev/null +++ b/test-snapshots/query/a97ef67e98bf0dac/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 8752670, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 265848, + "Name": "Another Round", + "TrackId": 1002, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a97ef67e98bf0dac/request.json b/test-snapshots/query/a97ef67e98bf0dac/request.json new file mode 100644 index 0000000..03b7625 --- /dev/null +++ b/test-snapshots/query/a97ef67e98bf0dac/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1002 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a9875e237e6bea6c/expected.json b/test-snapshots/query/a9875e237e6bea6c/expected.json new file mode 100644 index 0000000..0cc5350 --- /dev/null +++ b/test-snapshots/query/a9875e237e6bea6c/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 144, + "Quantity": 1, + "TrackId": 867, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 145, + "Quantity": 1, + "TrackId": 876, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9875e237e6bea6c/request.json b/test-snapshots/query/a9875e237e6bea6c/request.json new file mode 100644 index 0000000..35722e5 --- /dev/null +++ b/test-snapshots/query/a9875e237e6bea6c/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-04-14" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a98d63a4a761b479/expected.json b/test-snapshots/query/a98d63a4a761b479/expected.json new file mode 100644 index 0000000..9300bea --- /dev/null +++ b/test-snapshots/query/a98d63a4a761b479/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 14, + "Name": "R&B/Soul" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a98d63a4a761b479/request.json b/test-snapshots/query/a98d63a4a761b479/request.json new file mode 100644 index 0000000..10d6a2d --- /dev/null +++ b/test-snapshots/query/a98d63a4a761b479/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a99cc9d6ae12d4e4/expected.json b/test-snapshots/query/a99cc9d6ae12d4e4/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/a99cc9d6ae12d4e4/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a99cc9d6ae12d4e4/request.json b/test-snapshots/query/a99cc9d6ae12d4e4/request.json new file mode 100644 index 0000000..eb302e3 --- /dev/null +++ b/test-snapshots/query/a99cc9d6ae12d4e4/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/a9a95e833e47febf/expected.json b/test-snapshots/query/a9a95e833e47febf/expected.json new file mode 100644 index 0000000..586a570 --- /dev/null +++ b/test-snapshots/query/a9a95e833e47febf/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "AlbumId_0550": 1 + }, + { + "AlbumId_0550": 2 + }, + { + "AlbumId_0550": 3 + }, + { + "AlbumId_0550": 4 + }, + { + "AlbumId_0550": 5 + }, + { + "AlbumId_0550": 6 + }, + { + "AlbumId_0550": 7 + }, + { + "AlbumId_0550": 8 + }, + { + "AlbumId_0550": 9 + }, + { + "AlbumId_0550": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9a95e833e47febf/request.json b/test-snapshots/query/a9a95e833e47febf/request.json new file mode 100644 index 0000000..52eed25 --- /dev/null +++ b/test-snapshots/query/a9a95e833e47febf/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_0550": { + "type": "column", + "column": "AlbumId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a9bdc3277b2ea17e/expected.json b/test-snapshots/query/a9bdc3277b2ea17e/expected.json new file mode 100644 index 0000000..708dd71 --- /dev/null +++ b/test-snapshots/query/a9bdc3277b2ea17e/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "Address_1296": "Qe 7 Bloco G", + "Company_8780": null, + "FirstName_3330": "Fernanda", + "SupportRepId_0846": 4 + }, + { + "Address_1296": "Praça Pio X, 119", + "Company_8780": "Riotur", + "FirstName_3330": "Roberto", + "SupportRepId_0846": 3 + }, + { + "Address_1296": "Av. Brigadeiro Faria Lima, 2170", + "Company_8780": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "FirstName_3330": "Luís", + "SupportRepId_0846": 3 + }, + { + "Address_1296": "Av. Paulista, 2022", + "Company_8780": "Banco do Brasil S.A.", + "FirstName_3330": "Alexandre", + "SupportRepId_0846": 5 + }, + { + "Address_1296": "Rua Dr. Falcão Filho, 155", + "Company_8780": "Woodstock Discos", + "FirstName_3330": "Eduardo", + "SupportRepId_0846": 4 + }, + { + "Address_1296": "Klanova 9/506", + "Company_8780": "JetBrains s.r.o.", + "FirstName_3330": "František", + "SupportRepId_0846": 4 + }, + { + "Address_1296": "8210 111 ST NW", + "Company_8780": "Telus", + "FirstName_3330": "Mark", + "SupportRepId_0846": 5 + }, + { + "Address_1296": "1600 Amphitheatre Parkway", + "Company_8780": "Google Inc.", + "FirstName_3330": "Frank", + "SupportRepId_0846": 4 + }, + { + "Address_1296": "700 W Pender Street", + "Company_8780": "Rogers Canada", + "FirstName_3330": "Jennifer", + "SupportRepId_0846": 3 + }, + { + "Address_1296": "1 Microsoft Way", + "Company_8780": "Microsoft Corporation", + "FirstName_3330": "Jack", + "SupportRepId_0846": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9bdc3277b2ea17e/request.json b/test-snapshots/query/a9bdc3277b2ea17e/request.json new file mode 100644 index 0000000..54990cb --- /dev/null +++ b/test-snapshots/query/a9bdc3277b2ea17e/request.json @@ -0,0 +1,58 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_1296": { + "type": "column", + "column": "Address", + "fields": null + }, + "FirstName_3330": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Company_8780": { + "type": "column", + "column": "Company", + "fields": null + }, + "SupportRepId_0846": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a9cf8e71edfb397b/expected.json b/test-snapshots/query/a9cf8e71edfb397b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/a9cf8e71edfb397b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9cf8e71edfb397b/request.json b/test-snapshots/query/a9cf8e71edfb397b/request.json new file mode 100644 index 0000000..5dd7ddd --- /dev/null +++ b/test-snapshots/query/a9cf8e71edfb397b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/a9d2cb08cfd147af/expected.json b/test-snapshots/query/a9d2cb08cfd147af/expected.json new file mode 100644 index 0000000..5244df9 --- /dev/null +++ b/test-snapshots/query/a9d2cb08cfd147af/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_5469": 412, + "Quantity_6967": 1, + "TrackId_2255": 3177, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2922, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2913, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2904, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2895, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2886, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2877, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2868, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2859, + "UnitPrice_9834": 1.99 + }, + { + "InvoiceId_5469": 404, + "Quantity_6967": 1, + "TrackId_2255": 2850, + "UnitPrice_9834": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/a9d2cb08cfd147af/request.json b/test-snapshots/query/a9d2cb08cfd147af/request.json new file mode 100644 index 0000000..8a06aa0 --- /dev/null +++ b/test-snapshots/query/a9d2cb08cfd147af/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_5469": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "UnitPrice_9834": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Quantity_6967": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_2255": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/aa2b726880a09383/expected.json b/test-snapshots/query/aa2b726880a09383/expected.json new file mode 100644 index 0000000..f940431 --- /dev/null +++ b/test-snapshots/query/aa2b726880a09383/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/aa2b726880a09383/request.json b/test-snapshots/query/aa2b726880a09383/request.json new file mode 100644 index 0000000..2d83b49 --- /dev/null +++ b/test-snapshots/query/aa2b726880a09383/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/aa49d766bf3dfb41/expected.json b/test-snapshots/query/aa49d766bf3dfb41/expected.json new file mode 100644 index 0000000..fa11b7a --- /dev/null +++ b/test-snapshots/query/aa49d766bf3dfb41/expected.json @@ -0,0 +1,8 @@ +[ + { + "aggregates": { + "BillingAddress_max_4869": "Via Degli Scipioni, 43", + "CustomerId_min_3111": 1 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/aa49d766bf3dfb41/request.json b/test-snapshots/query/aa49d766bf3dfb41/request.json new file mode 100644 index 0000000..50ebf75 --- /dev/null +++ b/test-snapshots/query/aa49d766bf3dfb41/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.Invoice", + "query": { + "aggregates": { + "CustomerId_min_3111": { + "type": "single_column", + "column": "CustomerId", + "function": "min" + }, + "BillingAddress_max_4869": { + "type": "single_column", + "column": "BillingAddress", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/aa6cae0c99c3e645/expected.json b/test-snapshots/query/aa6cae0c99c3e645/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/aa6cae0c99c3e645/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/aa6cae0c99c3e645/request.json b/test-snapshots/query/aa6cae0c99c3e645/request.json new file mode 100644 index 0000000..ae56420 --- /dev/null +++ b/test-snapshots/query/aa6cae0c99c3e645/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Inject The Venom" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/aae8aad7a3cc372c/expected.json b/test-snapshots/query/aae8aad7a3cc372c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/aae8aad7a3cc372c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/aae8aad7a3cc372c/request.json b/test-snapshots/query/aae8aad7a3cc372c/request.json new file mode 100644 index 0000000..03aebdb --- /dev/null +++ b/test-snapshots/query/aae8aad7a3cc372c/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Adams" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1947-09-19" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/aaec276f7e0452b7/expected.json b/test-snapshots/query/aaec276f7e0452b7/expected.json new file mode 100644 index 0000000..6d4f591 --- /dev/null +++ b/test-snapshots/query/aaec276f7e0452b7/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_8132": "AC/DC" + }, + { + "Name_8132": "Accept" + }, + { + "Name_8132": "Aerosmith" + }, + { + "Name_8132": "Alanis Morissette" + }, + { + "Name_8132": "Alice In Chains" + }, + { + "Name_8132": "Antônio Carlos Jobim" + }, + { + "Name_8132": "Apocalyptica" + }, + { + "Name_8132": "Audioslave" + }, + { + "Name_8132": "BackBeat" + }, + { + "Name_8132": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/aaec276f7e0452b7/request.json b/test-snapshots/query/aaec276f7e0452b7/request.json new file mode 100644 index 0000000..d8e9d09 --- /dev/null +++ b/test-snapshots/query/aaec276f7e0452b7/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_8132": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/aafbc1f9d88614ac/expected.json b/test-snapshots/query/aafbc1f9d88614ac/expected.json new file mode 100644 index 0000000..900eca7 --- /dev/null +++ b/test-snapshots/query/aafbc1f9d88614ac/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 10 + }, + { + "PlaylistId": 1, + "TrackId": 11 + }, + { + "PlaylistId": 1, + "TrackId": 12 + }, + { + "PlaylistId": 1, + "TrackId": 13 + }, + { + "PlaylistId": 1, + "TrackId": 14 + }, + { + "PlaylistId": 1, + "TrackId": 1 + }, + { + "PlaylistId": 1, + "TrackId": 6 + }, + { + "PlaylistId": 1, + "TrackId": 7 + }, + { + "PlaylistId": 1, + "TrackId": 8 + }, + { + "PlaylistId": 1, + "TrackId": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/aafbc1f9d88614ac/request.json b/test-snapshots/query/aafbc1f9d88614ac/request.json new file mode 100644 index 0000000..a6023ba --- /dev/null +++ b/test-snapshots/query/aafbc1f9d88614ac/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ab25b981d7edfc7d/expected.json b/test-snapshots/query/ab25b981d7edfc7d/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/ab25b981d7edfc7d/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ab25b981d7edfc7d/request.json b/test-snapshots/query/ab25b981d7edfc7d/request.json new file mode 100644 index 0000000..e8c269b --- /dev/null +++ b/test-snapshots/query/ab25b981d7edfc7d/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ab54bf13a4b99bee/expected.json b/test-snapshots/query/ab54bf13a4b99bee/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ab54bf13a4b99bee/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ab54bf13a4b99bee/request.json b/test-snapshots/query/ab54bf13a4b99bee/request.json new file mode 100644 index 0000000..7c86f42 --- /dev/null +++ b/test-snapshots/query/ab54bf13a4b99bee/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ab561c13187e082e/expected.json b/test-snapshots/query/ab561c13187e082e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ab561c13187e082e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ab561c13187e082e/request.json b/test-snapshots/query/ab561c13187e082e/request.json new file mode 100644 index 0000000..b2e635e --- /dev/null +++ b/test-snapshots/query/ab561c13187e082e/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ab673071b6053b2c/expected.json b/test-snapshots/query/ab673071b6053b2c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ab673071b6053b2c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ab673071b6053b2c/request.json b/test-snapshots/query/ab673071b6053b2c/request.json new file mode 100644 index 0000000..7077480 --- /dev/null +++ b/test-snapshots/query/ab673071b6053b2c/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/abcab3d0eb00f2d5/expected.json b/test-snapshots/query/abcab3d0eb00f2d5/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/abcab3d0eb00f2d5/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/abcab3d0eb00f2d5/request.json b/test-snapshots/query/abcab3d0eb00f2d5/request.json new file mode 100644 index 0000000..dab63cb --- /dev/null +++ b/test-snapshots/query/abcab3d0eb00f2d5/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac12cabca80a314d/expected.json b/test-snapshots/query/ac12cabca80a314d/expected.json new file mode 100644 index 0000000..beddf94 --- /dev/null +++ b/test-snapshots/query/ac12cabca80a314d/expected.json @@ -0,0 +1,176 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac12cabca80a314d/request.json b/test-snapshots/query/ac12cabca80a314d/request.json new file mode 100644 index 0000000..71dbdfb --- /dev/null +++ b/test-snapshots/query/ac12cabca80a314d/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac1997a2b6389c1/expected.json b/test-snapshots/query/ac1997a2b6389c1/expected.json new file mode 100644 index 0000000..742e8e5 --- /dev/null +++ b/test-snapshots/query/ac1997a2b6389c1/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 262, + "Bytes": 4011615, + "Composer": "Luca Gusella", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 246503, + "Name": "Amanda", + "TrackId": 3349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 262, + "Bytes": 4821485, + "Composer": "Andrea Dulbecco", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 307385, + "Name": "Despertar", + "TrackId": 3350, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4615841, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 285837, + "Name": "Din Din Wo (Little Child)", + "TrackId": 3351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4855457, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 300605, + "Name": "I Ka Barra (Your Work)", + "TrackId": 3354, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 5327463, + "Composer": "Karsh Kale/Vishal Vaid", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 327122, + "Name": "Distance", + "TrackId": 3352, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 6034098, + "Composer": "Karsh Kale", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 366085, + "Name": "One Step Beyond", + "TrackId": 3358, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3240609, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 199923, + "Name": "Love Comes", + "TrackId": 3355, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3453849, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 212044, + "Name": "I Guess You're Right", + "TrackId": 3353, + "UnitPrice": 0.99 + }, + { + "AlbumId": 266, + "Bytes": 2775071, + "Composer": "Luciana Souza", + "GenreId": 7, + "MediaTypeId": 5, + "Milliseconds": 172710, + "Name": "Muita Bobeira", + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "AlbumId": 267, + "Bytes": 4292028, + "Composer": "Aaron Goldberg", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 266936, + "Name": "OAM's Blues", + "TrackId": 3357, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac1997a2b6389c1/request.json b/test-snapshots/query/ac1997a2b6389c1/request.json new file mode 100644 index 0000000..1d65c71 --- /dev/null +++ b/test-snapshots/query/ac1997a2b6389c1/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac2169f53c3c7652/expected.json b/test-snapshots/query/ac2169f53c3c7652/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ac2169f53c3c7652/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac2169f53c3c7652/request.json b/test-snapshots/query/ac2169f53c3c7652/request.json new file mode 100644 index 0000000..68357f1 --- /dev/null +++ b/test-snapshots/query/ac2169f53c3c7652/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ac33f25313199a09/expected.json b/test-snapshots/query/ac33f25313199a09/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ac33f25313199a09/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac33f25313199a09/request.json b/test-snapshots/query/ac33f25313199a09/request.json new file mode 100644 index 0000000..05ca4f4 --- /dev/null +++ b/test-snapshots/query/ac33f25313199a09/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 1Y7" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac3602b93d74dafe/expected.json b/test-snapshots/query/ac3602b93d74dafe/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/ac3602b93d74dafe/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac3602b93d74dafe/request.json b/test-snapshots/query/ac3602b93d74dafe/request.json new file mode 100644 index 0000000..89da57f --- /dev/null +++ b/test-snapshots/query/ac3602b93d74dafe/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac4a5be277370e6a/expected.json b/test-snapshots/query/ac4a5be277370e6a/expected.json new file mode 100644 index 0000000..9a35bab --- /dev/null +++ b/test-snapshots/query/ac4a5be277370e6a/expected.json @@ -0,0 +1,174 @@ +[ + { + "rows": [ + { + "AlbumId_2052": 1, + "Bytes_6999": 11170334, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 6566314, + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 6599424, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 6706347, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 6713451, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 6852860, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 7636561, + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 8596840, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 8611245, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + }, + { + "AlbumId_2052": 1, + "Bytes_6999": 8817038, + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_5974": 1, + "UnitPrice_4900": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac4a5be277370e6a/request.json b/test-snapshots/query/ac4a5be277370e6a/request.json new file mode 100644 index 0000000..614adf7 --- /dev/null +++ b/test-snapshots/query/ac4a5be277370e6a/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_2052": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6999": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "UnitPrice_4900": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "GenreId_5974": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac4c5395059d5c6d/expected.json b/test-snapshots/query/ac4c5395059d5c6d/expected.json new file mode 100644 index 0000000..e2badac --- /dev/null +++ b/test-snapshots/query/ac4c5395059d5c6d/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "MediaTypeId_count": 5, + "MediaTypeId_distinct_count": 5, + "Name_count": 5, + "Name_distinct_count": 5 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac4c5395059d5c6d/request.json b/test-snapshots/query/ac4c5395059d5c6d/request.json new file mode 100644 index 0000000..3f6499d --- /dev/null +++ b/test-snapshots/query/ac4c5395059d5c6d/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.MediaType", + "query": { + "aggregates": { + "MediaTypeId_count": { + "type": "column_count", + "column": "MediaTypeId", + "distinct": false + }, + "MediaTypeId_distinct_count": { + "type": "column_count", + "column": "MediaTypeId", + "distinct": true + }, + "Name_count": { + "type": "column_count", + "column": "Name", + "distinct": false + }, + "Name_distinct_count": { + "type": "column_count", + "column": "Name", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ac5ce528441eb40e/expected.json b/test-snapshots/query/ac5ce528441eb40e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ac5ce528441eb40e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac5ce528441eb40e/request.json b/test-snapshots/query/ac5ce528441eb40e/request.json new file mode 100644 index 0000000..5734c9a --- /dev/null +++ b/test-snapshots/query/ac5ce528441eb40e/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac6065519c6fe1a3/expected.json b/test-snapshots/query/ac6065519c6fe1a3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ac6065519c6fe1a3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac6065519c6fe1a3/request.json b/test-snapshots/query/ac6065519c6fe1a3/request.json new file mode 100644 index 0000000..eb15cef --- /dev/null +++ b/test-snapshots/query/ac6065519c6fe1a3/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ac84b49c667a250a/expected.json b/test-snapshots/query/ac84b49c667a250a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ac84b49c667a250a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ac84b49c667a250a/request.json b/test-snapshots/query/ac84b49c667a250a/request.json new file mode 100644 index 0000000..68c4176 --- /dev/null +++ b/test-snapshots/query/ac84b49c667a250a/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11170334 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/acb4b8eaab974e6d/expected.json b/test-snapshots/query/acb4b8eaab974e6d/expected.json new file mode 100644 index 0000000..ee04541 --- /dev/null +++ b/test-snapshots/query/acb4b8eaab974e6d/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/acb4b8eaab974e6d/request.json b/test-snapshots/query/acb4b8eaab974e6d/request.json new file mode 100644 index 0000000..fabafa3 --- /dev/null +++ b/test-snapshots/query/acb4b8eaab974e6d/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/acb655d658e33b55/expected.json b/test-snapshots/query/acb655d658e33b55/expected.json new file mode 100644 index 0000000..b9c7406 --- /dev/null +++ b/test-snapshots/query/acb655d658e33b55/expected.json @@ -0,0 +1,102 @@ +[ + { + "rows": [ + { + "Address_5790": "923 7 ST NW", + "BirthDate_4455": "1968-01-09", + "Country_9365": "Canada", + "Fax_5796": "+1 (403) 467-8772", + "FirstName_6573": "Laura", + "HireDate_6454": "2004-03-04", + "LastName_0261": "Callahan", + "Phone_7110": "+1 (403) 467-3351", + "PostalCode_9977": "T1H 1Y8", + "State_3958": "AB" + }, + { + "Address_5790": "590 Columbia Boulevard West", + "BirthDate_4455": "1970-05-29", + "Country_9365": "Canada", + "Fax_5796": "+1 (403) 456-8485", + "FirstName_6573": "Robert", + "HireDate_6454": "2004-01-02", + "LastName_0261": "King", + "Phone_7110": "+1 (403) 456-9986", + "PostalCode_9977": "T1K 5N8", + "State_3958": "AB" + }, + { + "Address_5790": "825 8 Ave SW", + "BirthDate_4455": "1958-12-08", + "Country_9365": "Canada", + "Fax_5796": "+1 (403) 262-3322", + "FirstName_6573": "Nancy", + "HireDate_6454": "2002-05-01", + "LastName_0261": "Edwards", + "Phone_7110": "+1 (403) 262-3443", + "PostalCode_9977": "T2P 2T3", + "State_3958": "AB" + }, + { + "Address_5790": "683 10 Street SW", + "BirthDate_4455": "1947-09-19", + "Country_9365": "Canada", + "Fax_5796": "+1 (403) 263-4289", + "FirstName_6573": "Margaret", + "HireDate_6454": "2003-05-03", + "LastName_0261": "Park", + "Phone_7110": "+1 (403) 263-4423", + "PostalCode_9977": "T2P 5G3", + "State_3958": "AB" + }, + { + "Address_5790": "1111 6 Ave SW", + "BirthDate_4455": "1973-08-29", + "Country_9365": "Canada", + "Fax_5796": "+1 (403) 262-6712", + "FirstName_6573": "Jane", + "HireDate_6454": "2002-04-01", + "LastName_0261": "Peacock", + "Phone_7110": "+1 (403) 262-3443", + "PostalCode_9977": "T2P 5M5", + "State_3958": "AB" + }, + { + "Address_5790": "5827 Bowness Road NW", + "BirthDate_4455": "1973-07-01", + "Country_9365": "Canada", + "Fax_5796": "+1 (403) 246-9899", + "FirstName_6573": "Michael", + "HireDate_6454": "2003-10-17", + "LastName_0261": "Mitchell", + "Phone_7110": "+1 (403) 246-9887", + "PostalCode_9977": "T3B 0C5", + "State_3958": "AB" + }, + { + "Address_5790": "7727B 41 Ave", + "BirthDate_4455": "1965-03-03", + "Country_9365": "Canada", + "Fax_5796": "1 (780) 836-9543", + "FirstName_6573": "Steve", + "HireDate_6454": "2003-10-17", + "LastName_0261": "Johnson", + "Phone_7110": "1 (780) 836-9987", + "PostalCode_9977": "T3B 1Y7", + "State_3958": "AB" + }, + { + "Address_5790": "11120 Jasper Ave NW", + "BirthDate_4455": "1962-02-18", + "Country_9365": "Canada", + "Fax_5796": "+1 (780) 428-3457", + "FirstName_6573": "Andrew", + "HireDate_6454": "2002-08-14", + "LastName_0261": "Adams", + "Phone_7110": "+1 (780) 428-9482", + "PostalCode_9977": "T5K 2N1", + "State_3958": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/acb655d658e33b55/request.json b/test-snapshots/query/acb655d658e33b55/request.json new file mode 100644 index 0000000..da74d0a --- /dev/null +++ b/test-snapshots/query/acb655d658e33b55/request.json @@ -0,0 +1,80 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_5790": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_4455": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "State_3958": { + "type": "column", + "column": "State", + "fields": null + }, + "Country_9365": { + "type": "column", + "column": "Country", + "fields": null + }, + "Phone_7110": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_9977": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Fax_5796": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6573": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_6454": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_0261": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ace9903420100179/expected.json b/test-snapshots/query/ace9903420100179/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ace9903420100179/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ace9903420100179/request.json b/test-snapshots/query/ace9903420100179/request.json new file mode 100644 index 0000000..a5cf3bf --- /dev/null +++ b/test-snapshots/query/ace9903420100179/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/acec55ec97fbed3f/expected.json b/test-snapshots/query/acec55ec97fbed3f/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/acec55ec97fbed3f/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/acec55ec97fbed3f/request.json b/test-snapshots/query/acec55ec97fbed3f/request.json new file mode 100644 index 0000000..d6a7fff --- /dev/null +++ b/test-snapshots/query/acec55ec97fbed3f/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ad033d92eb7bc937/expected.json b/test-snapshots/query/ad033d92eb7bc937/expected.json new file mode 100644 index 0000000..fb061ab --- /dev/null +++ b/test-snapshots/query/ad033d92eb7bc937/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId_1549": 1, + "Name_9169": "Rock" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad033d92eb7bc937/request.json b/test-snapshots/query/ad033d92eb7bc937/request.json new file mode 100644 index 0000000..7861f19 --- /dev/null +++ b/test-snapshots/query/ad033d92eb7bc937/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "GenreId_1549": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_9169": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ad042f5b05e78adc/expected.json b/test-snapshots/query/ad042f5b05e78adc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ad042f5b05e78adc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad042f5b05e78adc/request.json b/test-snapshots/query/ad042f5b05e78adc/request.json new file mode 100644 index 0000000..46d2dd0 --- /dev/null +++ b/test-snapshots/query/ad042f5b05e78adc/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ad15aefd2f14e7f2/expected.json b/test-snapshots/query/ad15aefd2f14e7f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ad15aefd2f14e7f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad15aefd2f14e7f2/request.json b/test-snapshots/query/ad15aefd2f14e7f2/request.json new file mode 100644 index 0000000..faf7a03 --- /dev/null +++ b/test-snapshots/query/ad15aefd2f14e7f2/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Science Fiction" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ad37817fa285b184/expected.json b/test-snapshots/query/ad37817fa285b184/expected.json new file mode 100644 index 0000000..f14a83f --- /dev/null +++ b/test-snapshots/query/ad37817fa285b184/expected.json @@ -0,0 +1,466 @@ +[ + { + "rows": [ + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 161, + "InvoiceLineId": 873, + "Quantity": 1, + "TrackId": 1832, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 161, + "InvoiceLineId": 874, + "Quantity": 1, + "TrackId": 1833, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2010-12-15", + "InvoiceId_7074": 161, + "Total_9650": 1.98 + }, + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 184, + "InvoiceLineId": 991, + "Quantity": 1, + "TrackId": 2535, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 184, + "InvoiceLineId": 992, + "Quantity": 1, + "TrackId": 2537, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 184, + "InvoiceLineId": 993, + "Quantity": 1, + "TrackId": 2539, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 184, + "InvoiceLineId": 994, + "Quantity": 1, + "TrackId": 2541, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2011-03-19", + "InvoiceId_7074": 184, + "Total_9650": 3.96 + }, + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 206, + "InvoiceLineId": 1109, + "Quantity": 1, + "TrackId": 3241, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1110, + "Quantity": 1, + "TrackId": 3245, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1111, + "Quantity": 1, + "TrackId": 3249, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1112, + "Quantity": 1, + "TrackId": 3253, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1113, + "Quantity": 1, + "TrackId": 3257, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 206, + "InvoiceLineId": 1114, + "Quantity": 1, + "TrackId": 3261, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2011-06-21", + "InvoiceId_7074": 206, + "Total_9650": 8.94 + }, + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 258, + "InvoiceLineId": 1404, + "Quantity": 1, + "TrackId": 1576, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2012-02-09", + "InvoiceId_7074": 258, + "Total_9650": 0.99 + }, + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 32, + "InvoiceLineId": 165, + "Quantity": 1, + "TrackId": 970, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 166, + "Quantity": 1, + "TrackId": 976, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 167, + "Quantity": 1, + "TrackId": 982, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 168, + "Quantity": 1, + "TrackId": 988, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 169, + "Quantity": 1, + "TrackId": 994, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 170, + "Quantity": 1, + "TrackId": 1000, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 171, + "Quantity": 1, + "TrackId": 1006, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 172, + "Quantity": 1, + "TrackId": 1012, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 32, + "InvoiceLineId": 173, + "Quantity": 1, + "TrackId": 1018, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2009-05-10", + "InvoiceId_7074": 32, + "Total_9650": 8.91 + }, + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 379, + "InvoiceLineId": 2053, + "Quantity": 1, + "TrackId": 2021, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 379, + "InvoiceLineId": 2054, + "Quantity": 1, + "TrackId": 2023, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2013-08-02", + "InvoiceId_7074": 379, + "Total_9650": 1.98 + }, + { + "BillingCity_5975": "Amsterdam", + "BillingCountry_3798": "Netherlands", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 390, + "InvoiceLineId": 2112, + "Quantity": 1, + "TrackId": 2350, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2113, + "Quantity": 1, + "TrackId": 2359, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2114, + "Quantity": 1, + "TrackId": 2368, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2115, + "Quantity": 1, + "TrackId": 2377, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2116, + "Quantity": 1, + "TrackId": 2386, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2117, + "Quantity": 1, + "TrackId": 2395, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2118, + "Quantity": 1, + "TrackId": 2404, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2119, + "Quantity": 1, + "TrackId": 2413, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2120, + "Quantity": 1, + "TrackId": 2422, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 390, + "InvoiceLineId": 2121, + "Quantity": 1, + "TrackId": 2431, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2013-09-12", + "InvoiceId_7074": 390, + "Total_9650": 13.86 + }, + { + "BillingCity_5975": "Bangalore", + "BillingCountry_3798": "India", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 218, + "InvoiceLineId": 1179, + "Quantity": 1, + "TrackId": 188, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 218, + "InvoiceLineId": 1180, + "Quantity": 1, + "TrackId": 190, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2011-08-20", + "InvoiceId_7074": 218, + "Total_9650": 1.98 + }, + { + "BillingCity_5975": "Bangalore", + "BillingCountry_3798": "India", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 229, + "InvoiceLineId": 1238, + "Quantity": 1, + "TrackId": 517, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1239, + "Quantity": 1, + "TrackId": 526, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1240, + "Quantity": 1, + "TrackId": 535, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1241, + "Quantity": 1, + "TrackId": 544, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1242, + "Quantity": 1, + "TrackId": 553, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1243, + "Quantity": 1, + "TrackId": 562, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1244, + "Quantity": 1, + "TrackId": 571, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1245, + "Quantity": 1, + "TrackId": 580, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1246, + "Quantity": 1, + "TrackId": 589, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 229, + "InvoiceLineId": 1247, + "Quantity": 1, + "TrackId": 598, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2011-09-30", + "InvoiceId_7074": 229, + "Total_9650": 13.86 + }, + { + "BillingCity_5975": "Bangalore", + "BillingCountry_3798": "India", + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId": 23, + "InvoiceLineId": 117, + "Quantity": 1, + "TrackId": 702, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 23, + "InvoiceLineId": 118, + "Quantity": 1, + "TrackId": 704, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 23, + "InvoiceLineId": 119, + "Quantity": 1, + "TrackId": 706, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 23, + "InvoiceLineId": 120, + "Quantity": 1, + "TrackId": 708, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceDate_3695": "2009-04-05", + "InvoiceId_7074": 23, + "Total_9650": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad37817fa285b184/request.json b/test-snapshots/query/ad37817fa285b184/request.json new file mode 100644 index 0000000..d67e23d --- /dev/null +++ b/test-snapshots/query/ad37817fa285b184/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceId_7074": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingCity_5975": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_3798": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "Total_9650": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceDate_3695": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ad5cb13fe96a5411/expected.json b/test-snapshots/query/ad5cb13fe96a5411/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ad5cb13fe96a5411/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad5cb13fe96a5411/request.json b/test-snapshots/query/ad5cb13fe96a5411/request.json new file mode 100644 index 0000000..8cd58fe --- /dev/null +++ b/test-snapshots/query/ad5cb13fe96a5411/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Delhi" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "94043-1351" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ad63bb2a6779fdd2/expected.json b/test-snapshots/query/ad63bb2a6779fdd2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ad63bb2a6779fdd2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad63bb2a6779fdd2/request.json b/test-snapshots/query/ad63bb2a6779fdd2/request.json new file mode 100644 index 0000000..d2f6de6 --- /dev/null +++ b/test-snapshots/query/ad63bb2a6779fdd2/request.json @@ -0,0 +1,152 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1962-02-18" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ad78ec6561afa186/expected.json b/test-snapshots/query/ad78ec6561afa186/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/ad78ec6561afa186/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ad78ec6561afa186/request.json b/test-snapshots/query/ad78ec6561afa186/request.json new file mode 100644 index 0000000..2512ade --- /dev/null +++ b/test-snapshots/query/ad78ec6561afa186/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/adba0720af60463a/expected.json b/test-snapshots/query/adba0720af60463a/expected.json new file mode 100644 index 0000000..df50004 --- /dev/null +++ b/test-snapshots/query/adba0720af60463a/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + }, + { + "BillingAddress": "4, Rue Milton", + "BillingCity": "Paris", + "BillingCountry": "France", + "BillingPostalCode": "75009", + "BillingState": null, + "CustomerId": 39, + "InvoiceDate": "2010-04-11", + "InvoiceId": 105, + "Total": 1.98 + }, + { + "BillingAddress": "4, Rue Milton", + "BillingCity": "Paris", + "BillingCountry": "France", + "BillingPostalCode": "75009", + "BillingState": null, + "CustomerId": 39, + "InvoiceDate": "2010-07-14", + "InvoiceId": 128, + "Total": 3.96 + }, + { + "BillingAddress": "4, Rue Milton", + "BillingCity": "Paris", + "BillingCountry": "France", + "BillingPostalCode": "75009", + "BillingState": null, + "CustomerId": 39, + "InvoiceDate": "2010-10-16", + "InvoiceId": 150, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/adba0720af60463a/request.json b/test-snapshots/query/adba0720af60463a/request.json new file mode 100644 index 0000000..a94695b --- /dev/null +++ b/test-snapshots/query/adba0720af60463a/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "France" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/add074637068c1aa/expected.json b/test-snapshots/query/add074637068c1aa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/add074637068c1aa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/add074637068c1aa/request.json b/test-snapshots/query/add074637068c1aa/request.json new file mode 100644 index 0000000..0cc30ec --- /dev/null +++ b/test-snapshots/query/add074637068c1aa/request.json @@ -0,0 +1,143 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "113 Lupus St" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/add63fa46a644da9/expected.json b/test-snapshots/query/add63fa46a644da9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/add63fa46a644da9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/add63fa46a644da9/request.json b/test-snapshots/query/add63fa46a644da9/request.json new file mode 100644 index 0000000..8e26a2e --- /dev/null +++ b/test-snapshots/query/add63fa46a644da9/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ade76959fbbc481f/expected.json b/test-snapshots/query/ade76959fbbc481f/expected.json new file mode 100644 index 0000000..139da0b --- /dev/null +++ b/test-snapshots/query/ade76959fbbc481f/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ade76959fbbc481f/request.json b/test-snapshots/query/ade76959fbbc481f/request.json new file mode 100644 index 0000000..f2987c6 --- /dev/null +++ b/test-snapshots/query/ade76959fbbc481f/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ade7c8e2df02f93c/expected.json b/test-snapshots/query/ade7c8e2df02f93c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ade7c8e2df02f93c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ade7c8e2df02f93c/request.json b/test-snapshots/query/ade7c8e2df02f93c/request.json new file mode 100644 index 0000000..d682868 --- /dev/null +++ b/test-snapshots/query/ade7c8e2df02f93c/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/adeeb9420d55a49/expected.json b/test-snapshots/query/adeeb9420d55a49/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/adeeb9420d55a49/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/adeeb9420d55a49/request.json b/test-snapshots/query/adeeb9420d55a49/request.json new file mode 100644 index 0000000..8eee708 --- /dev/null +++ b/test-snapshots/query/adeeb9420d55a49/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ae1157289458bdc6/expected.json b/test-snapshots/query/ae1157289458bdc6/expected.json new file mode 100644 index 0000000..d7ddce6 --- /dev/null +++ b/test-snapshots/query/ae1157289458bdc6/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ae1157289458bdc6/request.json b/test-snapshots/query/ae1157289458bdc6/request.json new file mode 100644 index 0000000..9827a4a --- /dev/null +++ b/test-snapshots/query/ae1157289458bdc6/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address_8222": { + "type": "column", + "column": "Address", + "fields": null + }, + "State_3263": { + "type": "column", + "column": "State", + "fields": null + }, + "City_6064": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_5188": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ae1240b6a165e71a/expected.json b/test-snapshots/query/ae1240b6a165e71a/expected.json new file mode 100644 index 0000000..d7ddce6 --- /dev/null +++ b/test-snapshots/query/ae1240b6a165e71a/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ae1240b6a165e71a/request.json b/test-snapshots/query/ae1240b6a165e71a/request.json new file mode 100644 index 0000000..e8da4c3 --- /dev/null +++ b/test-snapshots/query/ae1240b6a165e71a/request.json @@ -0,0 +1,179 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address_6277": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_4413": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_1929": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_0247": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_3785": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_8904": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_6975": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_1692": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_8853": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_2095": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_8708": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_9181": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_7358": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_5733": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_2265": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ae1d3f0e3cc177e1/expected.json b/test-snapshots/query/ae1d3f0e3cc177e1/expected.json new file mode 100644 index 0000000..5b51296 --- /dev/null +++ b/test-snapshots/query/ae1d3f0e3cc177e1/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_9676": "Av. Brigadeiro Faria Lima, 2170", + "City_0609": "São José dos Campos", + "Company_0741": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_9079": "Brazil", + "CustomerId_6524": 1, + "Email_4129": "luisg@embraer.com.br", + "Fax_8635": "+55 (12) 3923-5566", + "LastName_9871": "Gonçalves", + "State_0940": "SP", + "SupportRepId_4135": 3 + }, + { + "Address_9676": "Theodor-Heuss-Straße 34", + "City_0609": "Stuttgart", + "Company_0741": null, + "Country_9079": "Germany", + "CustomerId_6524": 2, + "Email_4129": "leonekohler@surfeu.de", + "Fax_8635": null, + "LastName_9871": "Köhler", + "State_0940": null, + "SupportRepId_4135": 5 + }, + { + "Address_9676": "1498 rue Bélanger", + "City_0609": "Montréal", + "Company_0741": null, + "Country_9079": "Canada", + "CustomerId_6524": 3, + "Email_4129": "ftremblay@gmail.com", + "Fax_8635": null, + "LastName_9871": "Tremblay", + "State_0940": "QC", + "SupportRepId_4135": 3 + }, + { + "Address_9676": "Ullevålsveien 14", + "City_0609": "Oslo", + "Company_0741": null, + "Country_9079": "Norway", + "CustomerId_6524": 4, + "Email_4129": "bjorn.hansen@yahoo.no", + "Fax_8635": null, + "LastName_9871": "Hansen", + "State_0940": null, + "SupportRepId_4135": 4 + }, + { + "Address_9676": "Klanova 9/506", + "City_0609": "Prague", + "Company_0741": "JetBrains s.r.o.", + "Country_9079": "Czech Republic", + "CustomerId_6524": 5, + "Email_4129": "frantisekw@jetbrains.com", + "Fax_8635": "+420 2 4172 5555", + "LastName_9871": "Wichterlová", + "State_0940": null, + "SupportRepId_4135": 4 + }, + { + "Address_9676": "Rilská 3174/6", + "City_0609": "Prague", + "Company_0741": null, + "Country_9079": "Czech Republic", + "CustomerId_6524": 6, + "Email_4129": "hholy@gmail.com", + "Fax_8635": null, + "LastName_9871": "Holý", + "State_0940": null, + "SupportRepId_4135": 5 + }, + { + "Address_9676": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_0609": "Vienne", + "Company_0741": null, + "Country_9079": "Austria", + "CustomerId_6524": 7, + "Email_4129": "astrid.gruber@apple.at", + "Fax_8635": null, + "LastName_9871": "Gruber", + "State_0940": null, + "SupportRepId_4135": 5 + }, + { + "Address_9676": "Grétrystraat 63", + "City_0609": "Brussels", + "Company_0741": null, + "Country_9079": "Belgium", + "CustomerId_6524": 8, + "Email_4129": "daan_peeters@apple.be", + "Fax_8635": null, + "LastName_9871": "Peeters", + "State_0940": null, + "SupportRepId_4135": 4 + }, + { + "Address_9676": "Sønder Boulevard 51", + "City_0609": "Copenhagen", + "Company_0741": null, + "Country_9079": "Denmark", + "CustomerId_6524": 9, + "Email_4129": "kara.nielsen@jubii.dk", + "Fax_8635": null, + "LastName_9871": "Nielsen", + "State_0940": null, + "SupportRepId_4135": 4 + }, + { + "Address_9676": "Rua Dr. Falcão Filho, 155", + "City_0609": "São Paulo", + "Company_0741": "Woodstock Discos", + "Country_9079": "Brazil", + "CustomerId_6524": 10, + "Email_4129": "eduardo@woodstock.com.br", + "Fax_8635": "+55 (11) 3033-4564", + "LastName_9871": "Martins", + "State_0940": "SP", + "SupportRepId_4135": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ae1d3f0e3cc177e1/request.json b/test-snapshots/query/ae1d3f0e3cc177e1/request.json new file mode 100644 index 0000000..5649c44 --- /dev/null +++ b/test-snapshots/query/ae1d3f0e3cc177e1/request.json @@ -0,0 +1,80 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_9676": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_0609": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_0741": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_9079": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_6524": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_4129": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_8635": { + "type": "column", + "column": "Fax", + "fields": null + }, + "SupportRepId_4135": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "LastName_9871": { + "type": "column", + "column": "LastName", + "fields": null + }, + "State_0940": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/aeeea44c3697dd3/expected.json b/test-snapshots/query/aeeea44c3697dd3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/aeeea44c3697dd3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/aeeea44c3697dd3/request.json b/test-snapshots/query/aeeea44c3697dd3/request.json new file mode 100644 index 0000000..06d018d --- /dev/null +++ b/test-snapshots/query/aeeea44c3697dd3/request.json @@ -0,0 +1,153 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-04-01" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/af230916def4ff1e/expected.json b/test-snapshots/query/af230916def4ff1e/expected.json new file mode 100644 index 0000000..11b16e6 --- /dev/null +++ b/test-snapshots/query/af230916def4ff1e/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/af230916def4ff1e/request.json b/test-snapshots/query/af230916def4ff1e/request.json new file mode 100644 index 0000000..7c4bb23 --- /dev/null +++ b/test-snapshots/query/af230916def4ff1e/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "hleacock@gmail.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/af43d25719f295c2/expected.json b/test-snapshots/query/af43d25719f295c2/expected.json new file mode 100644 index 0000000..9c3d786 --- /dev/null +++ b/test-snapshots/query/af43d25719f295c2/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "GenreId_avg_4556": 13, + "GenreId_count_0507": 25, + "GenreId_max_2949": 25, + "GenreId_min_5569": 1, + "GenreId_sum_4544": 325 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/af43d25719f295c2/request.json b/test-snapshots/query/af43d25719f295c2/request.json new file mode 100644 index 0000000..e50817c --- /dev/null +++ b/test-snapshots/query/af43d25719f295c2/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "aggregates": { + "GenreId_avg_4556": { + "type": "single_column", + "column": "GenreId", + "function": "avg" + }, + "GenreId_count_0507": { + "type": "single_column", + "column": "GenreId", + "function": "count" + }, + "GenreId_max_2949": { + "type": "single_column", + "column": "GenreId", + "function": "max" + }, + "GenreId_sum_4544": { + "type": "single_column", + "column": "GenreId", + "function": "sum" + }, + "GenreId_min_5569": { + "type": "single_column", + "column": "GenreId", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/af65e06f2185ebb6/expected.json b/test-snapshots/query/af65e06f2185ebb6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/af65e06f2185ebb6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/af65e06f2185ebb6/request.json b/test-snapshots/query/af65e06f2185ebb6/request.json new file mode 100644 index 0000000..20edf3a --- /dev/null +++ b/test-snapshots/query/af65e06f2185ebb6/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/af997015aa3ef5a2/expected.json b/test-snapshots/query/af997015aa3ef5a2/expected.json new file mode 100644 index 0000000..ce8dd11 --- /dev/null +++ b/test-snapshots/query/af997015aa3ef5a2/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "Name_2595": "MPEG audio file" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/af997015aa3ef5a2/request.json b/test-snapshots/query/af997015aa3ef5a2/request.json new file mode 100644 index 0000000..ecb9def --- /dev/null +++ b/test-snapshots/query/af997015aa3ef5a2/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "Name_2595": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/af9c1f61730ae807/expected.json b/test-snapshots/query/af9c1f61730ae807/expected.json new file mode 100644 index 0000000..17afb01 --- /dev/null +++ b/test-snapshots/query/af9c1f61730ae807/expected.json @@ -0,0 +1,50 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-12-22", + "InvoiceId": 412, + "Total": 1.99 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2010-02-26", + "InvoiceId": 97, + "Total": 1.99 + }, + { + "BillingAddress": "4, Rue Milton", + "BillingCity": "Paris", + "BillingCountry": "France", + "BillingPostalCode": "75009", + "BillingState": null, + "CustomerId": 39, + "InvoiceDate": "2011-06-06", + "InvoiceId": 202, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/af9c1f61730ae807/request.json b/test-snapshots/query/af9c1f61730ae807/request.json new file mode 100644 index 0000000..83bdfdd --- /dev/null +++ b/test-snapshots/query/af9c1f61730ae807/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.99 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/affab1d6c420ad48/expected.json b/test-snapshots/query/affab1d6c420ad48/expected.json new file mode 100644 index 0000000..1f4040c --- /dev/null +++ b/test-snapshots/query/affab1d6c420ad48/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/affab1d6c420ad48/request.json b/test-snapshots/query/affab1d6c420ad48/request.json new file mode 100644 index 0000000..f565248 --- /dev/null +++ b/test-snapshots/query/affab1d6c420ad48/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b005265f34e7512f/expected.json b/test-snapshots/query/b005265f34e7512f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b005265f34e7512f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b005265f34e7512f/request.json b/test-snapshots/query/b005265f34e7512f/request.json new file mode 100644 index 0000000..86f3e4e --- /dev/null +++ b/test-snapshots/query/b005265f34e7512f/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Bossa Nova" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b0175575219df545/expected.json b/test-snapshots/query/b0175575219df545/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b0175575219df545/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b0175575219df545/request.json b/test-snapshots/query/b0175575219df545/request.json new file mode 100644 index 0000000..02c7b6e --- /dev/null +++ b/test-snapshots/query/b0175575219df545/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Manoj" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Mountain View" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b055516ea0b23b74/expected.json b/test-snapshots/query/b055516ea0b23b74/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b055516ea0b23b74/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b055516ea0b23b74/request.json b/test-snapshots/query/b055516ea0b23b74/request.json new file mode 100644 index 0000000..e2d2fec --- /dev/null +++ b/test-snapshots/query/b055516ea0b23b74/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b068ca9e92d74cef/expected.json b/test-snapshots/query/b068ca9e92d74cef/expected.json new file mode 100644 index 0000000..457b80c --- /dev/null +++ b/test-snapshots/query/b068ca9e92d74cef/expected.json @@ -0,0 +1,206 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "InvoiceLineId_3012": 77, + "TrackId_8159": 466, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + }, + "InvoiceLineId_3012": 78, + "TrackId_8159": 468, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 136, + "TrackId_8159": 795, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 137, + "TrackId_8159": 804, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 138, + "TrackId_8159": 813, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 139, + "TrackId_8159": 822, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 140, + "TrackId_8159": 831, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 141, + "TrackId_8159": 840, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 142, + "TrackId_8159": 849, + "UnitPrice_9796": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + } + ] + }, + "InvoiceLineId_3012": 143, + "TrackId_8159": 858, + "UnitPrice_9796": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b068ca9e92d74cef/request.json b/test-snapshots/query/b068ca9e92d74cef/request.json new file mode 100644 index 0000000..7c45918 --- /dev/null +++ b/test-snapshots/query/b068ca9e92d74cef/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "TrackId_8159": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "InvoiceLineId_3012": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "UnitPrice_9796": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b09d79a63488bb16/expected.json b/test-snapshots/query/b09d79a63488bb16/expected.json new file mode 100644 index 0000000..fb9fbaa --- /dev/null +++ b/test-snapshots/query/b09d79a63488bb16/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b09d79a63488bb16/request.json b/test-snapshots/query/b09d79a63488bb16/request.json new file mode 100644 index 0000000..243b415 --- /dev/null +++ b/test-snapshots/query/b09d79a63488bb16/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b0a2b61d057b97d7/expected.json b/test-snapshots/query/b0a2b61d057b97d7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b0a2b61d057b97d7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b0a2b61d057b97d7/request.json b/test-snapshots/query/b0a2b61d057b97d7/request.json new file mode 100644 index 0000000..10b98c1 --- /dev/null +++ b/test-snapshots/query/b0a2b61d057b97d7/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 246-9887" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-01-02" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Nancy" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b0fe3222692f20c/expected.json b/test-snapshots/query/b0fe3222692f20c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b0fe3222692f20c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b0fe3222692f20c/request.json b/test-snapshots/query/b0fe3222692f20c/request.json new file mode 100644 index 0000000..6e8ce8f --- /dev/null +++ b/test-snapshots/query/b0fe3222692f20c/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 456-9986" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b10cf33dc8fcaa50/expected.json b/test-snapshots/query/b10cf33dc8fcaa50/expected.json new file mode 100644 index 0000000..3ce6bec --- /dev/null +++ b/test-snapshots/query/b10cf33dc8fcaa50/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "TrackId_6012": 3503 + }, + { + "TrackId_6012": 3502 + }, + { + "TrackId_6012": 3501 + }, + { + "TrackId_6012": 3500 + }, + { + "TrackId_6012": 3499 + }, + { + "TrackId_6012": 3498 + }, + { + "TrackId_6012": 3497 + }, + { + "TrackId_6012": 3496 + }, + { + "TrackId_6012": 3495 + }, + { + "TrackId_6012": 3494 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b10cf33dc8fcaa50/request.json b/test-snapshots/query/b10cf33dc8fcaa50/request.json new file mode 100644 index 0000000..6c5648f --- /dev/null +++ b/test-snapshots/query/b10cf33dc8fcaa50/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "TrackId_6012": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b10d592cf180f813/expected.json b/test-snapshots/query/b10d592cf180f813/expected.json new file mode 100644 index 0000000..32a7d30 --- /dev/null +++ b/test-snapshots/query/b10d592cf180f813/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_7196": 275 + }, + { + "ArtistId_7196": 274 + }, + { + "ArtistId_7196": 273 + }, + { + "ArtistId_7196": 272 + }, + { + "ArtistId_7196": 271 + }, + { + "ArtistId_7196": 270 + }, + { + "ArtistId_7196": 269 + }, + { + "ArtistId_7196": 268 + }, + { + "ArtistId_7196": 267 + }, + { + "ArtistId_7196": 266 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b10d592cf180f813/request.json b/test-snapshots/query/b10d592cf180f813/request.json new file mode 100644 index 0000000..e340e0e --- /dev/null +++ b/test-snapshots/query/b10d592cf180f813/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "ArtistId_7196": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b133763f808f1e10/expected.json b/test-snapshots/query/b133763f808f1e10/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/b133763f808f1e10/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b133763f808f1e10/request.json b/test-snapshots/query/b133763f808f1e10/request.json new file mode 100644 index 0000000..c7edd86 --- /dev/null +++ b/test-snapshots/query/b133763f808f1e10/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b1567a3257d7067/expected.json b/test-snapshots/query/b1567a3257d7067/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b1567a3257d7067/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b1567a3257d7067/request.json b/test-snapshots/query/b1567a3257d7067/request.json new file mode 100644 index 0000000..ee50e6d --- /dev/null +++ b/test-snapshots/query/b1567a3257d7067/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b166a67d90504cbe/expected.json b/test-snapshots/query/b166a67d90504cbe/expected.json new file mode 100644 index 0000000..158d9aa --- /dev/null +++ b/test-snapshots/query/b166a67d90504cbe/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_3987": "On-The-Go 1", + "PlaylistId_1299": 18 + }, + { + "Name_3987": "Heavy Metal Classic", + "PlaylistId_1299": 17 + }, + { + "Name_3987": "Grunge", + "PlaylistId_1299": 16 + }, + { + "Name_3987": "Classical 101 - The Basics", + "PlaylistId_1299": 15 + }, + { + "Name_3987": "Classical 101 - Next Steps", + "PlaylistId_1299": 14 + }, + { + "Name_3987": "Classical 101 - Deep Cuts", + "PlaylistId_1299": 13 + }, + { + "Name_3987": "Classical", + "PlaylistId_1299": 12 + }, + { + "Name_3987": "Brazilian Music", + "PlaylistId_1299": 11 + }, + { + "Name_3987": "TV Shows", + "PlaylistId_1299": 10 + }, + { + "Name_3987": "Music Videos", + "PlaylistId_1299": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b166a67d90504cbe/request.json b/test-snapshots/query/b166a67d90504cbe/request.json new file mode 100644 index 0000000..5bc32ca --- /dev/null +++ b/test-snapshots/query/b166a67d90504cbe/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_3987": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_1299": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b166e8df61924b25/expected.json b/test-snapshots/query/b166e8df61924b25/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b166e8df61924b25/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b166e8df61924b25/request.json b/test-snapshots/query/b166e8df61924b25/request.json new file mode 100644 index 0000000..e5fdd06 --- /dev/null +++ b/test-snapshots/query/b166e8df61924b25/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b18916d172923a38/expected.json b/test-snapshots/query/b18916d172923a38/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b18916d172923a38/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b18916d172923a38/request.json b/test-snapshots/query/b18916d172923a38/request.json new file mode 100644 index 0000000..c65e413 --- /dev/null +++ b/test-snapshots/query/b18916d172923a38/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b1dfda20e48f7ad0/expected.json b/test-snapshots/query/b1dfda20e48f7ad0/expected.json new file mode 100644 index 0000000..7424699 --- /dev/null +++ b/test-snapshots/query/b1dfda20e48f7ad0/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 16, + "Name": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b1dfda20e48f7ad0/request.json b/test-snapshots/query/b1dfda20e48f7ad0/request.json new file mode 100644 index 0000000..5291760 --- /dev/null +++ b/test-snapshots/query/b1dfda20e48f7ad0/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b1e7c3e5140a8213/expected.json b/test-snapshots/query/b1e7c3e5140a8213/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b1e7c3e5140a8213/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b1e7c3e5140a8213/request.json b/test-snapshots/query/b1e7c3e5140a8213/request.json new file mode 100644 index 0000000..1b74b8f --- /dev/null +++ b/test-snapshots/query/b1e7c3e5140a8213/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Callahan" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "683 10 Street SW" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b1edbc8a0d653bb9/expected.json b/test-snapshots/query/b1edbc8a0d653bb9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b1edbc8a0d653bb9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b1edbc8a0d653bb9/request.json b/test-snapshots/query/b1edbc8a0d653bb9/request.json new file mode 100644 index 0000000..d7913b6 --- /dev/null +++ b/test-snapshots/query/b1edbc8a0d653bb9/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Brazilian Music" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b218694b7beabd65/expected.json b/test-snapshots/query/b218694b7beabd65/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b218694b7beabd65/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b218694b7beabd65/request.json b/test-snapshots/query/b218694b7beabd65/request.json new file mode 100644 index 0000000..03ed75d --- /dev/null +++ b/test-snapshots/query/b218694b7beabd65/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b266668618559678/expected.json b/test-snapshots/query/b266668618559678/expected.json new file mode 100644 index 0000000..0fa7884 --- /dev/null +++ b/test-snapshots/query/b266668618559678/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_0940": "TV Shows", + "PlaylistId_1453": 3 + }, + { + "Name_0940": "TV Shows", + "PlaylistId_1453": 10 + }, + { + "Name_0940": "On-The-Go 1", + "PlaylistId_1453": 18 + }, + { + "Name_0940": "Music Videos", + "PlaylistId_1453": 9 + }, + { + "Name_0940": "Music", + "PlaylistId_1453": 1 + }, + { + "Name_0940": "Music", + "PlaylistId_1453": 8 + }, + { + "Name_0940": "Movies", + "PlaylistId_1453": 2 + }, + { + "Name_0940": "Movies", + "PlaylistId_1453": 7 + }, + { + "Name_0940": "Heavy Metal Classic", + "PlaylistId_1453": 17 + }, + { + "Name_0940": "Grunge", + "PlaylistId_1453": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b266668618559678/request.json b/test-snapshots/query/b266668618559678/request.json new file mode 100644 index 0000000..f2cdbc7 --- /dev/null +++ b/test-snapshots/query/b266668618559678/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_0940": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_1453": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b27d3e61ab9a01a5/expected.json b/test-snapshots/query/b27d3e61ab9a01a5/expected.json new file mode 100644 index 0000000..09ef815 --- /dev/null +++ b/test-snapshots/query/b27d3e61ab9a01a5/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b27d3e61ab9a01a5/request.json b/test-snapshots/query/b27d3e61ab9a01a5/request.json new file mode 100644 index 0000000..901214b --- /dev/null +++ b/test-snapshots/query/b27d3e61ab9a01a5/request.json @@ -0,0 +1,149 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address_4251": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_9940": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "LastName_8132": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Country_2291": { + "type": "column", + "column": "Country", + "fields": null + }, + "PostalCode_0753": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "EmployeeId_7409": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Title_8153": { + "type": "column", + "column": "Title", + "fields": null + }, + "FirstName_2510": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_6035": { + "type": "column", + "column": "HireDate", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b2c21e0cb5ea4c88/expected.json b/test-snapshots/query/b2c21e0cb5ea4c88/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b2c21e0cb5ea4c88/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b2c21e0cb5ea4c88/request.json b/test-snapshots/query/b2c21e0cb5ea4c88/request.json new file mode 100644 index 0000000..ca65612 --- /dev/null +++ b/test-snapshots/query/b2c21e0cb5ea4c88/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b2c911b060c3e7d7/expected.json b/test-snapshots/query/b2c911b060c3e7d7/expected.json new file mode 100644 index 0000000..a1543ca --- /dev/null +++ b/test-snapshots/query/b2c911b060c3e7d7/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b2c911b060c3e7d7/request.json b/test-snapshots/query/b2c911b060c3e7d7/request.json new file mode 100644 index 0000000..026bf8f --- /dev/null +++ b/test-snapshots/query/b2c911b060c3e7d7/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 248 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b2e79ad92d199611/expected.json b/test-snapshots/query/b2e79ad92d199611/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b2e79ad92d199611/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b2e79ad92d199611/request.json b/test-snapshots/query/b2e79ad92d199611/request.json new file mode 100644 index 0000000..5f496e9 --- /dev/null +++ b/test-snapshots/query/b2e79ad92d199611/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "andrew@chinookcorp.com" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Andrew" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b300092d5ea4a94a/expected.json b/test-snapshots/query/b300092d5ea4a94a/expected.json new file mode 100644 index 0000000..1a97325 --- /dev/null +++ b/test-snapshots/query/b300092d5ea4a94a/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_9257": 1, + "ArtistId_4781": 1, + "Title_9746": "For Those About To Rock We Salute You" + }, + { + "AlbumId_9257": 2, + "ArtistId_4781": 2, + "Title_9746": "Balls to the Wall" + }, + { + "AlbumId_9257": 3, + "ArtistId_4781": 2, + "Title_9746": "Restless and Wild" + }, + { + "AlbumId_9257": 4, + "ArtistId_4781": 1, + "Title_9746": "Let There Be Rock" + }, + { + "AlbumId_9257": 5, + "ArtistId_4781": 3, + "Title_9746": "Big Ones" + }, + { + "AlbumId_9257": 6, + "ArtistId_4781": 4, + "Title_9746": "Jagged Little Pill" + }, + { + "AlbumId_9257": 7, + "ArtistId_4781": 5, + "Title_9746": "Facelift" + }, + { + "AlbumId_9257": 8, + "ArtistId_4781": 6, + "Title_9746": "Warner 25 Anos" + }, + { + "AlbumId_9257": 9, + "ArtistId_4781": 7, + "Title_9746": "Plays Metallica By Four Cellos" + }, + { + "AlbumId_9257": 10, + "ArtistId_4781": 8, + "Title_9746": "Audioslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b300092d5ea4a94a/request.json b/test-snapshots/query/b300092d5ea4a94a/request.json new file mode 100644 index 0000000..94db806 --- /dev/null +++ b/test-snapshots/query/b300092d5ea4a94a/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_9257": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_4781": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_9746": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b30e4c59359148bc/expected.json b/test-snapshots/query/b30e4c59359148bc/expected.json new file mode 100644 index 0000000..7424699 --- /dev/null +++ b/test-snapshots/query/b30e4c59359148bc/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 16, + "Name": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b30e4c59359148bc/request.json b/test-snapshots/query/b30e4c59359148bc/request.json new file mode 100644 index 0000000..ab8e538 --- /dev/null +++ b/test-snapshots/query/b30e4c59359148bc/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b314015debf85894/expected.json b/test-snapshots/query/b314015debf85894/expected.json new file mode 100644 index 0000000..d2a61df --- /dev/null +++ b/test-snapshots/query/b314015debf85894/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 75, + "Quantity": 1, + "TrackId": 463, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 14, + "InvoiceLineId": 76, + "Quantity": 1, + "TrackId": 464, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1255, + "Quantity": 1, + "TrackId": 652, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 232, + "InvoiceLineId": 1256, + "Quantity": 1, + "TrackId": 654, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1314, + "Quantity": 1, + "TrackId": 981, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1315, + "Quantity": 1, + "TrackId": 990, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1316, + "Quantity": 1, + "TrackId": 999, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1317, + "Quantity": 1, + "TrackId": 1008, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 243, + "InvoiceLineId": 1318, + "Quantity": 1, + "TrackId": 1017, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b314015debf85894/request.json b/test-snapshots/query/b314015debf85894/request.json new file mode 100644 index 0000000..63e656a --- /dev/null +++ b/test-snapshots/query/b314015debf85894/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b31488a97a9dee1/expected.json b/test-snapshots/query/b31488a97a9dee1/expected.json new file mode 100644 index 0000000..7d87712 --- /dev/null +++ b/test-snapshots/query/b31488a97a9dee1/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress_6516": "Theodor-Heuss-Straße 34", + "BillingCity_9704": "Stuttgart", + "BillingCountry_4396": "Germany", + "BillingPostalCode_4425": "70174", + "BillingState_6890": null, + "CustomerId_0402": 2, + "InvoiceDate_5958": "2009-01-01", + "InvoiceId_4851": 1, + "Total_5488": 1.98 + }, + { + "BillingAddress_6516": "Ullevålsveien 14", + "BillingCity_9704": "Oslo", + "BillingCountry_4396": "Norway", + "BillingPostalCode_4425": "0171", + "BillingState_6890": null, + "CustomerId_0402": 4, + "InvoiceDate_5958": "2009-01-02", + "InvoiceId_4851": 2, + "Total_5488": 3.96 + }, + { + "BillingAddress_6516": "Grétrystraat 63", + "BillingCity_9704": "Brussels", + "BillingCountry_4396": "Belgium", + "BillingPostalCode_4425": "1000", + "BillingState_6890": null, + "CustomerId_0402": 8, + "InvoiceDate_5958": "2009-01-03", + "InvoiceId_4851": 3, + "Total_5488": 5.94 + }, + { + "BillingAddress_6516": "8210 111 ST NW", + "BillingCity_9704": "Edmonton", + "BillingCountry_4396": "Canada", + "BillingPostalCode_4425": "T6G 2C7", + "BillingState_6890": "AB", + "CustomerId_0402": 14, + "InvoiceDate_5958": "2009-01-06", + "InvoiceId_4851": 4, + "Total_5488": 8.91 + }, + { + "BillingAddress_6516": "69 Salem Street", + "BillingCity_9704": "Boston", + "BillingCountry_4396": "USA", + "BillingPostalCode_4425": "2113", + "BillingState_6890": "MA", + "CustomerId_0402": 23, + "InvoiceDate_5958": "2009-01-11", + "InvoiceId_4851": 5, + "Total_5488": 13.86 + }, + { + "BillingAddress_6516": "Berger Straße 10", + "BillingCity_9704": "Frankfurt", + "BillingCountry_4396": "Germany", + "BillingPostalCode_4425": "60316", + "BillingState_6890": null, + "CustomerId_0402": 37, + "InvoiceDate_5958": "2009-01-19", + "InvoiceId_4851": 6, + "Total_5488": 0.99 + }, + { + "BillingAddress_6516": "Barbarossastraße 19", + "BillingCity_9704": "Berlin", + "BillingCountry_4396": "Germany", + "BillingPostalCode_4425": "10779", + "BillingState_6890": null, + "CustomerId_0402": 38, + "InvoiceDate_5958": "2009-02-01", + "InvoiceId_4851": 7, + "Total_5488": 1.98 + }, + { + "BillingAddress_6516": "8, Rue Hanovre", + "BillingCity_9704": "Paris", + "BillingCountry_4396": "France", + "BillingPostalCode_4425": "75002", + "BillingState_6890": null, + "CustomerId_0402": 40, + "InvoiceDate_5958": "2009-02-01", + "InvoiceId_4851": 8, + "Total_5488": 1.98 + }, + { + "BillingAddress_6516": "9, Place Louis Barthou", + "BillingCity_9704": "Bordeaux", + "BillingCountry_4396": "France", + "BillingPostalCode_4425": "33000", + "BillingState_6890": null, + "CustomerId_0402": 42, + "InvoiceDate_5958": "2009-02-02", + "InvoiceId_4851": 9, + "Total_5488": 3.96 + }, + { + "BillingAddress_6516": "3 Chatham Street", + "BillingCity_9704": "Dublin", + "BillingCountry_4396": "Ireland", + "BillingPostalCode_4425": null, + "BillingState_6890": "Dublin", + "CustomerId_0402": 46, + "InvoiceDate_5958": "2009-02-03", + "InvoiceId_4851": 10, + "Total_5488": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b31488a97a9dee1/request.json b/test-snapshots/query/b31488a97a9dee1/request.json new file mode 100644 index 0000000..023dbc3 --- /dev/null +++ b/test-snapshots/query/b31488a97a9dee1/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_6516": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_9704": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_4396": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_4425": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_6890": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_0402": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_5958": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_4851": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_5488": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b31d5ab17574ede3/expected.json b/test-snapshots/query/b31d5ab17574ede3/expected.json new file mode 100644 index 0000000..0c398fb --- /dev/null +++ b/test-snapshots/query/b31d5ab17574ede3/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + }, + { + "BillingAddress": "Praça Pio X, 119", + "BillingCity": "Rio de Janeiro", + "BillingCountry": "Brazil", + "BillingPostalCode": "20040-020", + "BillingState": "RJ", + "CustomerId": 12, + "InvoiceDate": "2011-08-25", + "InvoiceId": 221, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b31d5ab17574ede3/request.json b/test-snapshots/query/b31d5ab17574ede3/request.json new file mode 100644 index 0000000..9ae3875 --- /dev/null +++ b/test-snapshots/query/b31d5ab17574ede3/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 264 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b32b27169e9e68c2/expected.json b/test-snapshots/query/b32b27169e9e68c2/expected.json new file mode 100644 index 0000000..4890a1a --- /dev/null +++ b/test-snapshots/query/b32b27169e9e68c2/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_3767": 156, + "ArtistId_9844": 50, + "Title_9675": "...And Justice For All" + }, + { + "AlbumId_3767": 257, + "ArtistId_9844": 179, + "Title_9675": "20th Century Masters - The Millennium Collection: The Best of Scorpions" + }, + { + "AlbumId_3767": 296, + "ArtistId_9844": 230, + "Title_9675": "A Copland Celebration, Vol. I" + }, + { + "AlbumId_3767": 94, + "ArtistId_9844": 90, + "Title_9675": "A Matter of Life and Death" + }, + { + "AlbumId_3767": 95, + "ArtistId_9844": 90, + "Title_9675": "A Real Dead One" + }, + { + "AlbumId_3767": 96, + "ArtistId_9844": 90, + "Title_9675": "A Real Live One" + }, + { + "AlbumId_3767": 285, + "ArtistId_9844": 219, + "Title_9675": "A Soprano Inspired" + }, + { + "AlbumId_3767": 139, + "ArtistId_9844": 99, + "Title_9675": "A TempestadeTempestade Ou O Livro Dos Dias" + }, + { + "AlbumId_3767": 203, + "ArtistId_9844": 132, + "Title_9675": "A-Sides" + }, + { + "AlbumId_3767": 160, + "ArtistId_9844": 106, + "Title_9675": "Ace Of Spades" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b32b27169e9e68c2/request.json b/test-snapshots/query/b32b27169e9e68c2/request.json new file mode 100644 index 0000000..22855ab --- /dev/null +++ b/test-snapshots/query/b32b27169e9e68c2/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_3767": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_9844": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_9675": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b33a640a9532ca6b/expected.json b/test-snapshots/query/b33a640a9532ca6b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b33a640a9532ca6b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b33a640a9532ca6b/request.json b/test-snapshots/query/b33a640a9532ca6b/request.json new file mode 100644 index 0000000..40e20f8 --- /dev/null +++ b/test-snapshots/query/b33a640a9532ca6b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b33bf9e59e15b90c/expected.json b/test-snapshots/query/b33bf9e59e15b90c/expected.json new file mode 100644 index 0000000..4530807 --- /dev/null +++ b/test-snapshots/query/b33bf9e59e15b90c/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1006 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b33bf9e59e15b90c/request.json b/test-snapshots/query/b33bf9e59e15b90c/request.json new file mode 100644 index 0000000..cd376e0 --- /dev/null +++ b/test-snapshots/query/b33bf9e59e15b90c/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b363f9932f370c80/expected.json b/test-snapshots/query/b363f9932f370c80/expected.json new file mode 100644 index 0000000..3a1189c --- /dev/null +++ b/test-snapshots/query/b363f9932f370c80/expected.json @@ -0,0 +1,1152 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 1, + "Bytes_7453": 11170334, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 343719, + "Name_8053": "For Those About To Rock (We Salute You)", + "TrackId_1258": 1, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 6566314, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 199836, + "Name_8053": "C.O.D.", + "TrackId_1258": 11, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 6599424, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 203102, + "Name_8053": "Snowballed", + "TrackId_1258": 9, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 6706347, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 205688, + "Name_8053": "Night Of The Long Knives", + "TrackId_1258": 13, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 6713451, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 205662, + "Name_8053": "Put The Finger On You", + "TrackId_1258": 6, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 6852860, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 210834, + "Name_8053": "Inject The Venom", + "TrackId_1258": 8, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 7636561, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 233926, + "Name_8053": "Let's Get It Up", + "TrackId_1258": 7, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 8596840, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 263288, + "Name_8053": "Breaking The Rules", + "TrackId_1258": 12, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 8611245, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 263497, + "Name_8053": "Evil Walks", + "TrackId_1258": 10, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 1, + "Bytes_7453": 8817038, + "Composer_5486": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 270863, + "Name_8053": "Spellbound", + "TrackId_1258": 14, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 10, + "Bytes_7453": 4948095, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 206053, + "Name_8053": "Exploder", + "TrackId_1258": 93, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 4961887, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 206628, + "Name_8053": "Hypnotize", + "TrackId_1258": 94, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 5339931, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 222380, + "Name_8053": "Cochise", + "TrackId_1258": 85, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 5988186, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 249391, + "Name_8053": "What You Are", + "TrackId_1258": 88, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 6321091, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 263262, + "Name_8053": "Set It Off", + "TrackId_1258": 90, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 6672176, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 277890, + "Name_8053": "Show Me How to Live", + "TrackId_1258": 86, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 6709793, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 279457, + "Name_8053": "Gasoline", + "TrackId_1258": 87, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 7059624, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 294034, + "Name_8053": "Like a Stone", + "TrackId_1258": 89, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 7193162, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 299598, + "Name_8053": "Getaway Car", + "TrackId_1258": 97, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 10, + "Bytes_7453": 7289084, + "Composer_5486": "Audioslave/Chris Cornell", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 303595, + "Name_8053": "Light My Way", + "TrackId_1258": 96, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 100, + "Bytes_7453": 10276872, + "Composer_5486": "Steve Harris", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 428016, + "Name_8053": "05 - Phantom of the Opera", + "TrackId_1258": 1272, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 4712576, + "Composer_5486": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 196284, + "Name_8053": "02 - Sanctuary", + "TrackId_1258": 1269, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 4739122, + "Composer_5486": "Harris/Paul Di´Anno", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 197276, + "Name_8053": "04 - Running Free", + "TrackId_1258": 1271, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 5189891, + "Composer_5486": "Steve Harris", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 216058, + "Name_8053": "09 - Iron Maiden", + "TrackId_1258": 1276, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 5668992, + "Composer_5486": "Steve Harris", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 236173, + "Name_8053": "01 - Prowler", + "TrackId_1258": 1268, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 6066304, + "Composer_5486": "Murray Dave", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 252708, + "Name_8053": "08 - Charlotte the Harlot", + "TrackId_1258": 1275, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 6226048, + "Composer_5486": "Steve Harris", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 259343, + "Name_8053": "06 - Transylvania", + "TrackId_1258": 1273, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 7889024, + "Composer_5486": "Harris/Paul Di´Anno", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 328620, + "Name_8053": "03 - Remember Tomorrow", + "TrackId_1258": 1270, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 100, + "Bytes_7453": 7981184, + "Composer_5486": "Steve Harris", + "GenreId_3959": 6, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 332460, + "Name_8053": "07 - Strange World", + "TrackId_1258": 1274, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 101, + "Bytes_7453": 2543744, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 105926, + "Name_8053": "The Ides Of March", + "TrackId_1258": 1277, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 4188288, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 174471, + "Name_8053": "Wrathchild", + "TrackId_1258": 1278, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 4493440, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 187141, + "Name_8053": "Genghis Khan", + "TrackId_1258": 1281, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 4804736, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 200150, + "Name_8053": "Purgatory", + "TrackId_1258": 1285, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 4874368, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 203049, + "Name_8053": "Another Life", + "TrackId_1258": 1280, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 5584861, + "Composer_5486": "Di´Anno/Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 232515, + "Name_8053": "Innocent Exile", + "TrackId_1258": 1282, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 6205786, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 258377, + "Name_8053": "Murders In The Rue Morgue", + "TrackId_1258": 1279, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 6934660, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 288757, + "Name_8053": "Drifter", + "TrackId_1258": 1286, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 7227440, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 300956, + "Name_8053": "Killers", + "TrackId_1258": 1283, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 101, + "Bytes_7453": 8937600, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 372349, + "Name_8053": "Prodigal Son", + "TrackId_1258": 1284, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 102, + "Bytes_7453": 10589917, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 441155, + "Name_8053": "Phantom Of The Opera", + "TrackId_1258": 1304, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 10836304, + "Composer_5486": "Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 451422, + "Name_8053": "Hallowed Be Thy Name", + "TrackId_1258": 1296, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 10921567, + "Composer_5486": null, + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 454974, + "Name_8053": "Powerslave", + "TrackId_1258": 1294, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 1154488, + "Composer_5486": null, + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 48013, + "Name_8053": "Intro- Churchill S Speech", + "TrackId_1258": 1287, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 18949518, + "Composer_5486": null, + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 789472, + "Name_8053": "Rime Of The Ancient Mariner", + "TrackId_1258": 1293, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 4410181, + "Composer_5486": "Steve Harris", + "GenreId_3959": 13, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 183666, + "Name_8053": "Wrathchild", + "TrackId_1258": 1300, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 4912986, + "Composer_5486": "Harris/Di Anno", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 204617, + "Name_8053": "Running Free", + "TrackId_1258": 1299, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 5521744, + "Composer_5486": "Smith/Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 229982, + "Name_8053": "Flight Of Icarus", + "TrackId_1258": 1292, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 5561241, + "Composer_5486": "Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 231627, + "Name_8053": "Run To The Hills", + "TrackId_1258": 1298, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 102, + "Bytes_7453": 6289117, + "Composer_5486": "Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 261955, + "Name_8053": "Iron Maiden", + "TrackId_1258": 1297, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 103, + "Bytes_7453": 10361452, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 431542, + "Name_8053": "Fear Of The Dark", + "TrackId_1258": 1314, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 11479913, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 478145, + "Name_8053": "The Evil That Men Do", + "TrackId_1258": 1312, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 4182963, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 174106, + "Name_8053": "Wrathchild", + "TrackId_1258": 1307, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 5118995, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 213106, + "Name_8053": "Can I Play With Madness", + "TrackId_1258": 1309, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 5599853, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 233142, + "Name_8053": "Be Quick Or Be Dead", + "TrackId_1258": 1305, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 5947795, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 247640, + "Name_8053": "Tailgunner", + "TrackId_1258": 1311, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 6831163, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 284447, + "Name_8053": "From Here To Eternity", + "TrackId_1258": 1308, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 7060625, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 294008, + "Name_8053": "The Number Of The Beast", + "TrackId_1258": 1306, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 8091301, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 336953, + "Name_8053": "Wasting Love", + "TrackId_1258": 1310, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 103, + "Bytes_7453": 9905048, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 412525, + "Name_8053": "Afraid To Shoot Strangers", + "TrackId_1258": 1313, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 104, + "Bytes_7453": 10577743, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 440555, + "Name_8053": "Heaven Can Wait", + "TrackId_1258": 1317, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 10751410, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 447791, + "Name_8053": "Hallowed Be Thy Name", + "TrackId_1258": 1321, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 11380851, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 474017, + "Name_8053": "Running Free", + "TrackId_1258": 1324, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 11874875, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 494602, + "Name_8053": "Iron Maiden", + "TrackId_1258": 1320, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 5588560, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 232672, + "Name_8053": "The Trooper", + "TrackId_1258": 1322, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 5665052, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 235859, + "Name_8053": "Run To The Hills", + "TrackId_1258": 1318, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 6302648, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 262426, + "Name_8053": "The Clairvoyant", + "TrackId_1258": 1316, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 7648679, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 318511, + "Name_8053": "Sanctuary", + "TrackId_1258": 1323, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 8122030, + "Composer_5486": "Adrian Smith/Bruce Dickinson", + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 338233, + "Name_8053": "2 Minutes To Midnight", + "TrackId_1258": 1319, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 104, + "Bytes_7453": 9045532, + "Composer_5486": null, + "GenreId_3959": 1, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 376711, + "Name_8053": "Bring Your Daughter... To The Slaughter...", + "TrackId_1258": 1315, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 105, + "Bytes_7453": 3672064, + "Composer_5486": "Bruce Dickinson/Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 229459, + "Name_8053": "Holy Smoke", + "TrackId_1258": 1326, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 3960832, + "Composer_5486": "Adrian Smith/Bruce Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 247510, + "Name_8053": "Hooks In You", + "TrackId_1258": 1332, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4018088, + "Composer_5486": "David Murray/Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 250853, + "Name_8053": "Fates Warning", + "TrackId_1258": 1329, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4071587, + "Composer_5486": "Bruce Dickinson/David Murray", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 254197, + "Name_8053": "Public Enema Number One", + "TrackId_1258": 1328, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4089856, + "Composer_5486": "Bruce Dickinson/Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 255582, + "Name_8053": "Tailgunner", + "TrackId_1258": 1325, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4141056, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 258768, + "Name_8053": "The Assassin", + "TrackId_1258": 1330, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4225024, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 263941, + "Name_8053": "No Prayer For The Dying", + "TrackId_1258": 1327, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4407296, + "Composer_5486": "Bruce Dickinson/Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 275408, + "Name_8053": "Run Silent Run Deep", + "TrackId_1258": 1331, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 4548608, + "Composer_5486": "Bruce Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 284238, + "Name_8053": "Bring Your Daughter... ...To The Slaughter", + "TrackId_1258": 1333, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 105, + "Bytes_7453": 5322752, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 332617, + "Name_8053": "Mother Russia", + "TrackId_1258": 1334, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 106, + "Bytes_7453": 3306324, + "Composer_5486": "Adrian Smith/Bruce Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 206367, + "Name_8053": "Sun And Steel", + "TrackId_1258": 1342, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 3543040, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 221309, + "Name_8053": "Quest For Fire", + "TrackId_1258": 1341, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 3686400, + "Composer_5486": "Adrian Smith/Bruce Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 230269, + "Name_8053": "Flight Of The Icarus", + "TrackId_1258": 1337, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 4024320, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 251454, + "Name_8053": "The Trooper", + "TrackId_1258": 1339, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 4710400, + "Composer_5486": "David Murray/Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 294347, + "Name_8053": "Still Life", + "TrackId_1258": 1340, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 5212160, + "Composer_5486": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 325694, + "Name_8053": "Die With Your Boots On", + "TrackId_1258": 1338, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 5914624, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 369554, + "Name_8053": "Where Eagles Dare", + "TrackId_1258": 1335, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 6539264, + "Composer_5486": "Bruce Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 408607, + "Name_8053": "Revelations", + "TrackId_1258": 1336, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 106, + "Bytes_7453": 7129264, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 445283, + "Name_8053": "To Tame A Land", + "TrackId_1258": 1343, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_2006": 107, + "Bytes_7453": 19599577, + "Composer_5486": "Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 816509, + "Name_8053": "Rime of the Ancient Mariner", + "TrackId_1258": 1351, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 5828861, + "Composer_5486": "Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 242729, + "Name_8053": "Flash of The Blade", + "TrackId_1258": 1347, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 6074756, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 252891, + "Name_8053": "Losfer Words", + "TrackId_1258": 1346, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 6472088, + "Composer_5486": "Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 269531, + "Name_8053": "Aces High", + "TrackId_1258": 1344, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 7696518, + "Composer_5486": "Dickinson/Smith", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 320548, + "Name_8053": "Back in the Village", + "TrackId_1258": 1349, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 8638809, + "Composer_5486": "Smith/Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 359810, + "Name_8053": "2 Minutes To Midnight", + "TrackId_1258": 1345, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 8800686, + "Composer_5486": "Steve Harris", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 366471, + "Name_8053": "Duelists", + "TrackId_1258": 1348, + "UnitPrice_0405": 0.99 + }, + { + "AlbumId_2006": 107, + "Bytes_7453": 9791106, + "Composer_5486": "Dickinson", + "GenreId_3959": 3, + "MediaTypeId_4906": 1, + "Milliseconds_2727": 407823, + "Name_8053": "Powerslave", + "TrackId_1258": 1350, + "UnitPrice_0405": 0.99 + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b363f9932f370c80/request.json b/test-snapshots/query/b363f9932f370c80/request.json new file mode 100644 index 0000000..a3402d6 --- /dev/null +++ b/test-snapshots/query/b363f9932f370c80/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_2006": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7453": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_5486": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_3959": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4906": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_2727": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_8053": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_1258": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_0405": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b37130ebea4c8cad/expected.json b/test-snapshots/query/b37130ebea4c8cad/expected.json new file mode 100644 index 0000000..83015e9 --- /dev/null +++ b/test-snapshots/query/b37130ebea4c8cad/expected.json @@ -0,0 +1,346 @@ +[ + { + "rows": [ + { + "Address_7595": "1 Infinite Loop", + "City_0162": "Cupertino", + "Company_6982": "Apple Inc.", + "Country_2792": "USA", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": "+1 (408) 996-1011", + "FirstName_7553": "Tim", + "LastName_5149": "Goyer", + "Phone_5145": "+1 (408) 996-1010", + "PostalCode_6847": "95014", + "State_5423": "CA", + "SupportRepId_8146": 3 + }, + { + "Address_7595": "1 Microsoft Way", + "City_0162": "Redmond", + "Company_6982": "Microsoft Corporation", + "Country_2792": "USA", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": "+1 (425) 882-8081", + "FirstName_7553": "Jack", + "LastName_5149": "Smith", + "Phone_5145": "+1 (425) 882-8080", + "PostalCode_6847": "98052-8300", + "State_5423": "WA", + "SupportRepId_8146": 5 + }, + { + "Address_7595": "1033 N Park Ave", + "City_0162": "Tucson", + "Company_6982": null, + "Country_2792": "USA", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "Patrick", + "LastName_5149": "Gray", + "Phone_5145": "+1 (520) 622-4200", + "PostalCode_6847": "85719", + "State_5423": "AZ", + "SupportRepId_8146": 4 + }, + { + "Address_7595": "11, Place Bellecour", + "City_0162": "Lyon", + "Company_6982": null, + "Country_2792": "France", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "Marc", + "LastName_5149": "Dubois", + "Phone_5145": "+33 04 78 30 30 30", + "PostalCode_6847": "69002", + "State_5423": null, + "SupportRepId_8146": 5 + }, + { + "Address_7595": "110 Raeburn Pl", + "City_0162": "Edinburgh ", + "Company_6982": null, + "Country_2792": "United Kingdom", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "Steve", + "LastName_5149": "Murray", + "Phone_5145": "+44 0131 315 3300", + "PostalCode_6847": "EH4 1HH", + "State_5423": null, + "SupportRepId_8146": 5 + }, + { + "Address_7595": "113 Lupus St", + "City_0162": "London", + "Company_6982": null, + "Country_2792": "United Kingdom", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "Phil", + "LastName_5149": "Hughes", + "Phone_5145": "+44 020 7976 5722", + "PostalCode_6847": "SW1V 3EN", + "State_5423": null, + "SupportRepId_8146": 3 + }, + { + "Address_7595": "12,Community Centre", + "City_0162": "Delhi", + "Company_6982": null, + "Country_2792": "India", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "Manoj", + "LastName_5149": "Pareek", + "Phone_5145": "+91 0124 39883988", + "PostalCode_6847": "110017", + "State_5423": null, + "SupportRepId_8146": 3 + }, + { + "Address_7595": "120 S Orange Ave", + "City_0162": "Orlando", + "Company_6982": null, + "Country_2792": "USA", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "Heather", + "LastName_5149": "Leacock", + "Phone_5145": "+1 (407) 999-7788", + "PostalCode_6847": "32801", + "State_5423": "FL", + "SupportRepId_8146": 4 + }, + { + "Address_7595": "1498 rue Bélanger", + "City_0162": "Montréal", + "Company_6982": null, + "Country_2792": "Canada", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": null, + "FirstName_7553": "François", + "LastName_5149": "Tremblay", + "Phone_5145": "+1 (514) 721-4711", + "PostalCode_6847": "H2G 1A7", + "State_5423": "QC", + "SupportRepId_8146": 3 + }, + { + "Address_7595": "1600 Amphitheatre Parkway", + "City_0162": "Mountain View", + "Company_6982": "Google Inc.", + "Country_2792": "USA", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_2264": "+1 (650) 253-0000", + "FirstName_7553": "Frank", + "LastName_5149": "Harris", + "Phone_5145": "+1 (650) 253-0000", + "PostalCode_6847": "94043-1351", + "State_5423": "CA", + "SupportRepId_8146": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b37130ebea4c8cad/request.json b/test-snapshots/query/b37130ebea4c8cad/request.json new file mode 100644 index 0000000..1e15f32 --- /dev/null +++ b/test-snapshots/query/b37130ebea4c8cad/request.json @@ -0,0 +1,159 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_7595": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_0162": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_6982": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_2792": { + "type": "column", + "column": "Country", + "fields": null + }, + "State_5423": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId_8146": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Fax_2264": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7553": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_5149": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_5145": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_6847": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b3755a92b27d9d52/expected.json b/test-snapshots/query/b3755a92b27d9d52/expected.json new file mode 100644 index 0000000..3b305cb --- /dev/null +++ b/test-snapshots/query/b3755a92b27d9d52/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 14 + }, + { + "PlaylistId": 8, + "TrackId": 14 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b3755a92b27d9d52/request.json b/test-snapshots/query/b3755a92b27d9d52/request.json new file mode 100644 index 0000000..57c804f --- /dev/null +++ b/test-snapshots/query/b3755a92b27d9d52/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b3a460706996e681/expected.json b/test-snapshots/query/b3a460706996e681/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/b3a460706996e681/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b3a460706996e681/request.json b/test-snapshots/query/b3a460706996e681/request.json new file mode 100644 index 0000000..643b5a4 --- /dev/null +++ b/test-snapshots/query/b3a460706996e681/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b3a8deb09d2e77ec/expected.json b/test-snapshots/query/b3a8deb09d2e77ec/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b3a8deb09d2e77ec/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b3a8deb09d2e77ec/request.json b/test-snapshots/query/b3a8deb09d2e77ec/request.json new file mode 100644 index 0000000..c2d8ea7 --- /dev/null +++ b/test-snapshots/query/b3a8deb09d2e77ec/request.json @@ -0,0 +1,170 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 262-3443" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-8772" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b3b36b661d5ca1e3/expected.json b/test-snapshots/query/b3b36b661d5ca1e3/expected.json new file mode 100644 index 0000000..92f3134 --- /dev/null +++ b/test-snapshots/query/b3b36b661d5ca1e3/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "Address_0929": "1111 6 Ave SW", + "BirthDate_2665": "1973-08-29", + "City_5489": "Calgary", + "Country_2748": "Canada", + "Email_3345": "jane@chinookcorp.com", + "EmployeeId_5203": 3, + "Fax_7714": "+1 (403) 262-6712", + "FirstName_5619": "Jane", + "HireDate_2887": "2002-04-01", + "LastName_9967": "Peacock", + "Phone_6774": "+1 (403) 262-3443", + "PostalCode_0513": "T2P 5M5", + "ReportsTo_0653": 2, + "State_4995": "AB", + "Title_3636": "Sales Support Agent" + }, + { + "Address_0929": "11120 Jasper Ave NW", + "BirthDate_2665": "1962-02-18", + "City_5489": "Edmonton", + "Country_2748": "Canada", + "Email_3345": "andrew@chinookcorp.com", + "EmployeeId_5203": 1, + "Fax_7714": "+1 (780) 428-3457", + "FirstName_5619": "Andrew", + "HireDate_2887": "2002-08-14", + "LastName_9967": "Adams", + "Phone_6774": "+1 (780) 428-9482", + "PostalCode_0513": "T5K 2N1", + "ReportsTo_0653": null, + "State_4995": "AB", + "Title_3636": "General Manager" + }, + { + "Address_0929": "5827 Bowness Road NW", + "BirthDate_2665": "1973-07-01", + "City_5489": "Calgary", + "Country_2748": "Canada", + "Email_3345": "michael@chinookcorp.com", + "EmployeeId_5203": 6, + "Fax_7714": "+1 (403) 246-9899", + "FirstName_5619": "Michael", + "HireDate_2887": "2003-10-17", + "LastName_9967": "Mitchell", + "Phone_6774": "+1 (403) 246-9887", + "PostalCode_0513": "T3B 0C5", + "ReportsTo_0653": 1, + "State_4995": "AB", + "Title_3636": "IT Manager" + }, + { + "Address_0929": "590 Columbia Boulevard West", + "BirthDate_2665": "1970-05-29", + "City_5489": "Lethbridge", + "Country_2748": "Canada", + "Email_3345": "robert@chinookcorp.com", + "EmployeeId_5203": 7, + "Fax_7714": "+1 (403) 456-8485", + "FirstName_5619": "Robert", + "HireDate_2887": "2004-01-02", + "LastName_9967": "King", + "Phone_6774": "+1 (403) 456-9986", + "PostalCode_0513": "T1K 5N8", + "ReportsTo_0653": 6, + "State_4995": "AB", + "Title_3636": "IT Staff" + }, + { + "Address_0929": "683 10 Street SW", + "BirthDate_2665": "1947-09-19", + "City_5489": "Calgary", + "Country_2748": "Canada", + "Email_3345": "margaret@chinookcorp.com", + "EmployeeId_5203": 4, + "Fax_7714": "+1 (403) 263-4289", + "FirstName_5619": "Margaret", + "HireDate_2887": "2003-05-03", + "LastName_9967": "Park", + "Phone_6774": "+1 (403) 263-4423", + "PostalCode_0513": "T2P 5G3", + "ReportsTo_0653": 2, + "State_4995": "AB", + "Title_3636": "Sales Support Agent" + }, + { + "Address_0929": "7727B 41 Ave", + "BirthDate_2665": "1965-03-03", + "City_5489": "Calgary", + "Country_2748": "Canada", + "Email_3345": "steve@chinookcorp.com", + "EmployeeId_5203": 5, + "Fax_7714": "1 (780) 836-9543", + "FirstName_5619": "Steve", + "HireDate_2887": "2003-10-17", + "LastName_9967": "Johnson", + "Phone_6774": "1 (780) 836-9987", + "PostalCode_0513": "T3B 1Y7", + "ReportsTo_0653": 2, + "State_4995": "AB", + "Title_3636": "Sales Support Agent" + }, + { + "Address_0929": "825 8 Ave SW", + "BirthDate_2665": "1958-12-08", + "City_5489": "Calgary", + "Country_2748": "Canada", + "Email_3345": "nancy@chinookcorp.com", + "EmployeeId_5203": 2, + "Fax_7714": "+1 (403) 262-3322", + "FirstName_5619": "Nancy", + "HireDate_2887": "2002-05-01", + "LastName_9967": "Edwards", + "Phone_6774": "+1 (403) 262-3443", + "PostalCode_0513": "T2P 2T3", + "ReportsTo_0653": 1, + "State_4995": "AB", + "Title_3636": "Sales Manager" + }, + { + "Address_0929": "923 7 ST NW", + "BirthDate_2665": "1968-01-09", + "City_5489": "Lethbridge", + "Country_2748": "Canada", + "Email_3345": "laura@chinookcorp.com", + "EmployeeId_5203": 8, + "Fax_7714": "+1 (403) 467-8772", + "FirstName_5619": "Laura", + "HireDate_2887": "2004-03-04", + "LastName_9967": "Callahan", + "Phone_6774": "+1 (403) 467-3351", + "PostalCode_0513": "T1H 1Y8", + "ReportsTo_0653": 6, + "State_4995": "AB", + "Title_3636": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b3b36b661d5ca1e3/request.json b/test-snapshots/query/b3b36b661d5ca1e3/request.json new file mode 100644 index 0000000..8b21f26 --- /dev/null +++ b/test-snapshots/query/b3b36b661d5ca1e3/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_0929": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_2665": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_5489": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2748": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_3345": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_5203": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_7714": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_5619": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_2887": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_9967": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_6774": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_0513": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_0653": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_4995": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_3636": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BirthDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b3f482680e869992/expected.json b/test-snapshots/query/b3f482680e869992/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b3f482680e869992/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b3f482680e869992/request.json b/test-snapshots/query/b3f482680e869992/request.json new file mode 100644 index 0000000..6032b9d --- /dev/null +++ b/test-snapshots/query/b3f482680e869992/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b439e96541afed28/expected.json b/test-snapshots/query/b439e96541afed28/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b439e96541afed28/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b439e96541afed28/request.json b/test-snapshots/query/b439e96541afed28/request.json new file mode 100644 index 0000000..21f0c3a --- /dev/null +++ b/test-snapshots/query/b439e96541afed28/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Mitchell" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b4454bf767c73b6a/expected.json b/test-snapshots/query/b4454bf767c73b6a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b4454bf767c73b6a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b4454bf767c73b6a/request.json b/test-snapshots/query/b4454bf767c73b6a/request.json new file mode 100644 index 0000000..368cb18 --- /dev/null +++ b/test-snapshots/query/b4454bf767c73b6a/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 270863 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b446006615e1d011/expected.json b/test-snapshots/query/b446006615e1d011/expected.json new file mode 100644 index 0000000..316410f --- /dev/null +++ b/test-snapshots/query/b446006615e1d011/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "count": 18 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/b446006615e1d011/request.json b/test-snapshots/query/b446006615e1d011/request.json new file mode 100644 index 0000000..0d33f5a --- /dev/null +++ b/test-snapshots/query/b446006615e1d011/request.json @@ -0,0 +1,13 @@ +{ + "collection": "chinook.Playlist", + "query": { + "aggregates": { + "count": { + "type": "star_count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b453b26f64929dc7/expected.json b/test-snapshots/query/b453b26f64929dc7/expected.json new file mode 100644 index 0000000..19cd2e5 --- /dev/null +++ b/test-snapshots/query/b453b26f64929dc7/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 103, + "InvoiceLineId": 554, + "Quantity": 1, + "TrackId": 3347, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 555, + "Quantity": 1, + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 556, + "Quantity": 1, + "TrackId": 3365, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 557, + "Quantity": 1, + "TrackId": 3374, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 558, + "Quantity": 1, + "TrackId": 3383, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 559, + "Quantity": 1, + "TrackId": 3392, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 560, + "Quantity": 1, + "TrackId": 3401, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 561, + "Quantity": 1, + "TrackId": 3410, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 562, + "Quantity": 1, + "TrackId": 3419, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 563, + "Quantity": 1, + "TrackId": 3428, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b453b26f64929dc7/request.json b/test-snapshots/query/b453b26f64929dc7/request.json new file mode 100644 index 0000000..0cc4e94 --- /dev/null +++ b/test-snapshots/query/b453b26f64929dc7/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b45fe4befeefe4a8/expected.json b/test-snapshots/query/b45fe4befeefe4a8/expected.json new file mode 100644 index 0000000..7235943 --- /dev/null +++ b/test-snapshots/query/b45fe4befeefe4a8/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "Calle Lira, 198", + "City": "Santiago", + "Company": null, + "Country": "Chile", + "CustomerId": 57, + "Email": "luisrojas@yahoo.cl", + "Fax": null, + "FirstName": "Luis", + "LastName": "Rojas", + "Phone": "+56 (0)2 635 4444", + "PostalCode": null, + "State": null, + "SupportRepId": 5 + }, + { + "Address": "Rua da Assunção 53", + "City": "Lisbon", + "Company": null, + "Country": "Portugal", + "CustomerId": 34, + "Email": "jfernandes@yahoo.pt", + "Fax": null, + "FirstName": "João", + "LastName": "Fernandes", + "Phone": "+351 (213) 466-111", + "PostalCode": null, + "State": null, + "SupportRepId": 4 + }, + { + "Address": "Rua dos Campeões Europeus de Viena, 4350", + "City": "Porto", + "Company": null, + "Country": "Portugal", + "CustomerId": 35, + "Email": "masampaio@sapo.pt", + "Fax": null, + "FirstName": "Madalena", + "LastName": "Sampaio", + "Phone": "+351 (225) 022-448", + "PostalCode": null, + "State": null, + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b45fe4befeefe4a8/request.json b/test-snapshots/query/b45fe4befeefe4a8/request.json new file mode 100644 index 0000000..438dc09 --- /dev/null +++ b/test-snapshots/query/b45fe4befeefe4a8/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b47174ca8badcf83/expected.json b/test-snapshots/query/b47174ca8badcf83/expected.json new file mode 100644 index 0000000..d2bf121 --- /dev/null +++ b/test-snapshots/query/b47174ca8badcf83/expected.json @@ -0,0 +1,176 @@ +[ + { + "rows": [ + { + "AlbumId_9286": 1, + "Bytes_1593": 11170334, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 343719, + "Name_9518": "For Those About To Rock (We Salute You)", + "TrackId_5269": 1, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 6566314, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 199836, + "Name_9518": "C.O.D.", + "TrackId_5269": 11, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 6599424, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 203102, + "Name_9518": "Snowballed", + "TrackId_5269": 9, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 6706347, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 205688, + "Name_9518": "Night Of The Long Knives", + "TrackId_5269": 13, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 6713451, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 205662, + "Name_9518": "Put The Finger On You", + "TrackId_5269": 6, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 6852860, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 210834, + "Name_9518": "Inject The Venom", + "TrackId_5269": 8, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 7636561, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 233926, + "Name_9518": "Let's Get It Up", + "TrackId_5269": 7, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 8596840, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 263288, + "Name_9518": "Breaking The Rules", + "TrackId_5269": 12, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 8611245, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 263497, + "Name_9518": "Evil Walks", + "TrackId_5269": 10, + "UnitPrice_3928": 0.99 + }, + { + "AlbumId_9286": 1, + "Bytes_1593": 8817038, + "Composer_5528": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "Milliseconds_5386": 270863, + "Name_9518": "Spellbound", + "TrackId_5269": 14, + "UnitPrice_3928": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b47174ca8badcf83/request.json b/test-snapshots/query/b47174ca8badcf83/request.json new file mode 100644 index 0000000..6232bd1 --- /dev/null +++ b/test-snapshots/query/b47174ca8badcf83/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_9286": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_1593": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_5528": { + "type": "column", + "column": "Composer", + "fields": null + }, + "UnitPrice_3928": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "TrackId_5269": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Milliseconds_5386": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_9518": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b48e916b80b9e121/expected.json b/test-snapshots/query/b48e916b80b9e121/expected.json new file mode 100644 index 0000000..9e8f441 --- /dev/null +++ b/test-snapshots/query/b48e916b80b9e121/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "Address_3126": "923 7 ST NW", + "BirthDate_6285": "1968-01-09", + "City_3302": "Lethbridge", + "Country_4306": "Canada", + "Email_3872": "laura@chinookcorp.com", + "Fax_9018": "+1 (403) 467-8772", + "FirstName_8084": "Laura", + "HireDate_1299": "2004-03-04", + "LastName_6490": "Callahan", + "Phone_3349": "+1 (403) 467-3351", + "PostalCode_6414": "T1H 1Y8", + "State_1576": "AB", + "Title_7281": "IT Staff" + }, + { + "Address_3126": "590 Columbia Boulevard West", + "BirthDate_6285": "1970-05-29", + "City_3302": "Lethbridge", + "Country_4306": "Canada", + "Email_3872": "robert@chinookcorp.com", + "Fax_9018": "+1 (403) 456-8485", + "FirstName_8084": "Robert", + "HireDate_1299": "2004-01-02", + "LastName_6490": "King", + "Phone_3349": "+1 (403) 456-9986", + "PostalCode_6414": "T1K 5N8", + "State_1576": "AB", + "Title_7281": "IT Staff" + }, + { + "Address_3126": "683 10 Street SW", + "BirthDate_6285": "1947-09-19", + "City_3302": "Calgary", + "Country_4306": "Canada", + "Email_3872": "margaret@chinookcorp.com", + "Fax_9018": "+1 (403) 263-4289", + "FirstName_8084": "Margaret", + "HireDate_1299": "2003-05-03", + "LastName_6490": "Park", + "Phone_3349": "+1 (403) 263-4423", + "PostalCode_6414": "T2P 5G3", + "State_1576": "AB", + "Title_7281": "Sales Support Agent" + }, + { + "Address_3126": "7727B 41 Ave", + "BirthDate_6285": "1965-03-03", + "City_3302": "Calgary", + "Country_4306": "Canada", + "Email_3872": "steve@chinookcorp.com", + "Fax_9018": "1 (780) 836-9543", + "FirstName_8084": "Steve", + "HireDate_1299": "2003-10-17", + "LastName_6490": "Johnson", + "Phone_3349": "1 (780) 836-9987", + "PostalCode_6414": "T3B 1Y7", + "State_1576": "AB", + "Title_7281": "Sales Support Agent" + }, + { + "Address_3126": "1111 6 Ave SW", + "BirthDate_6285": "1973-08-29", + "City_3302": "Calgary", + "Country_4306": "Canada", + "Email_3872": "jane@chinookcorp.com", + "Fax_9018": "+1 (403) 262-6712", + "FirstName_8084": "Jane", + "HireDate_1299": "2002-04-01", + "LastName_6490": "Peacock", + "Phone_3349": "+1 (403) 262-3443", + "PostalCode_6414": "T2P 5M5", + "State_1576": "AB", + "Title_7281": "Sales Support Agent" + }, + { + "Address_3126": "825 8 Ave SW", + "BirthDate_6285": "1958-12-08", + "City_3302": "Calgary", + "Country_4306": "Canada", + "Email_3872": "nancy@chinookcorp.com", + "Fax_9018": "+1 (403) 262-3322", + "FirstName_8084": "Nancy", + "HireDate_1299": "2002-05-01", + "LastName_6490": "Edwards", + "Phone_3349": "+1 (403) 262-3443", + "PostalCode_6414": "T2P 2T3", + "State_1576": "AB", + "Title_7281": "Sales Manager" + }, + { + "Address_3126": "5827 Bowness Road NW", + "BirthDate_6285": "1973-07-01", + "City_3302": "Calgary", + "Country_4306": "Canada", + "Email_3872": "michael@chinookcorp.com", + "Fax_9018": "+1 (403) 246-9899", + "FirstName_8084": "Michael", + "HireDate_1299": "2003-10-17", + "LastName_6490": "Mitchell", + "Phone_3349": "+1 (403) 246-9887", + "PostalCode_6414": "T3B 0C5", + "State_1576": "AB", + "Title_7281": "IT Manager" + }, + { + "Address_3126": "11120 Jasper Ave NW", + "BirthDate_6285": "1962-02-18", + "City_3302": "Edmonton", + "Country_4306": "Canada", + "Email_3872": "andrew@chinookcorp.com", + "Fax_9018": "+1 (780) 428-3457", + "FirstName_8084": "Andrew", + "HireDate_1299": "2002-08-14", + "LastName_6490": "Adams", + "Phone_3349": "+1 (780) 428-9482", + "PostalCode_6414": "T5K 2N1", + "State_1576": "AB", + "Title_7281": "General Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b48e916b80b9e121/request.json b/test-snapshots/query/b48e916b80b9e121/request.json new file mode 100644 index 0000000..3c3fd0c --- /dev/null +++ b/test-snapshots/query/b48e916b80b9e121/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_3126": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_6285": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_3302": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_4306": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_3872": { + "type": "column", + "column": "Email", + "fields": null + }, + "Title_7281": { + "type": "column", + "column": "Title", + "fields": null + }, + "Fax_9018": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_8084": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_1299": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6490": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_3349": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_6414": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_1576": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ReportsTo", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BirthDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b4c0a41b384eb41e/expected.json b/test-snapshots/query/b4c0a41b384eb41e/expected.json new file mode 100644 index 0000000..2827eb4 --- /dev/null +++ b/test-snapshots/query/b4c0a41b384eb41e/expected.json @@ -0,0 +1,216 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-03-04", + "InvoiceId_7350": 15, + "Total_2398": 1.98 + } + ] + }, + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-03-04", + "InvoiceId_7350": 15, + "Total_2398": 1.98 + } + ] + }, + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "BillingAddress_9556": "1 Infinite Loop", + "BillingCity_3463": "Cupertino", + "BillingPostalCode_8902": "95014", + "BillingState_5088": "CA", + "CustomerId_8557": 19, + "InvoiceDate_5922": "2009-04-14", + "InvoiceId_7350": 26, + "Total_2398": 13.86 + } + ] + }, + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b4c0a41b384eb41e/request.json b/test-snapshots/query/b4c0a41b384eb41e/request.json new file mode 100644 index 0000000..86be84e --- /dev/null +++ b/test-snapshots/query/b4c0a41b384eb41e/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress_9556": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_3463": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "Total_2398": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingPostalCode_8902": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_5088": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_8557": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_5922": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_7350": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b5063c7f82892395/expected.json b/test-snapshots/query/b5063c7f82892395/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/b5063c7f82892395/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b5063c7f82892395/request.json b/test-snapshots/query/b5063c7f82892395/request.json new file mode 100644 index 0000000..b127504 --- /dev/null +++ b/test-snapshots/query/b5063c7f82892395/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b506944fd36b9b01/expected.json b/test-snapshots/query/b506944fd36b9b01/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/b506944fd36b9b01/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b506944fd36b9b01/request.json b/test-snapshots/query/b506944fd36b9b01/request.json new file mode 100644 index 0000000..d615398 --- /dev/null +++ b/test-snapshots/query/b506944fd36b9b01/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b517fdbcead22777/expected.json b/test-snapshots/query/b517fdbcead22777/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b517fdbcead22777/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b517fdbcead22777/request.json b/test-snapshots/query/b517fdbcead22777/request.json new file mode 100644 index 0000000..7aa93a7 --- /dev/null +++ b/test-snapshots/query/b517fdbcead22777/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b5234dbd03a24c49/expected.json b/test-snapshots/query/b5234dbd03a24c49/expected.json new file mode 100644 index 0000000..a28f12c --- /dev/null +++ b/test-snapshots/query/b5234dbd03a24c49/expected.json @@ -0,0 +1,50 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 3499018, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 215084, + "Name": "Whatever Gets You Thru the Night", + "TrackId": 3258, + "UnitPrice": 0.99 + }, + { + "AlbumId": 255, + "Bytes": 3780807, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 232778, + "Name": "Gimme Some Truth", + "TrackId": 3260, + "UnitPrice": 0.99 + }, + { + "AlbumId": 255, + "Bytes": 4448025, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 274644, + "Name": "Give Peace a Chance", + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "AlbumId": 255, + "Bytes": 4506425, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 278312, + "Name": "#9 Dream", + "TrackId": 3254, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b5234dbd03a24c49/request.json b/test-snapshots/query/b5234dbd03a24c49/request.json new file mode 100644 index 0000000..b087ac2 --- /dev/null +++ b/test-snapshots/query/b5234dbd03a24c49/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b5244ed97ed63c64/expected.json b/test-snapshots/query/b5244ed97ed63c64/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b5244ed97ed63c64/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b5244ed97ed63c64/request.json b/test-snapshots/query/b5244ed97ed63c64/request.json new file mode 100644 index 0000000..49faf3b --- /dev/null +++ b/test-snapshots/query/b5244ed97ed63c64/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b54203a845c9a8e0/expected.json b/test-snapshots/query/b54203a845c9a8e0/expected.json new file mode 100644 index 0000000..a0378f3 --- /dev/null +++ b/test-snapshots/query/b54203a845c9a8e0/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b54203a845c9a8e0/request.json b/test-snapshots/query/b54203a845c9a8e0/request.json new file mode 100644 index 0000000..6002c41 --- /dev/null +++ b/test-snapshots/query/b54203a845c9a8e0/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heather" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b5d15723fe07df62/expected.json b/test-snapshots/query/b5d15723fe07df62/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/b5d15723fe07df62/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b5d15723fe07df62/request.json b/test-snapshots/query/b5d15723fe07df62/request.json new file mode 100644 index 0000000..5f81c68 --- /dev/null +++ b/test-snapshots/query/b5d15723fe07df62/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b5d64c7b9ef1aefe/expected.json b/test-snapshots/query/b5d64c7b9ef1aefe/expected.json new file mode 100644 index 0000000..35ad186 --- /dev/null +++ b/test-snapshots/query/b5d64c7b9ef1aefe/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "TrackId_3467": 597 + }, + { + "TrackId_3467": 1 + }, + { + "TrackId_3467": 2 + }, + { + "TrackId_3467": 3 + }, + { + "TrackId_3467": 4 + }, + { + "TrackId_3467": 5 + }, + { + "TrackId_3467": 152 + }, + { + "TrackId_3467": 160 + }, + { + "TrackId_3467": 1278 + }, + { + "TrackId_3467": 1283 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b5d64c7b9ef1aefe/request.json b/test-snapshots/query/b5d64c7b9ef1aefe/request.json new file mode 100644 index 0000000..92381ea --- /dev/null +++ b/test-snapshots/query/b5d64c7b9ef1aefe/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "TrackId_3467": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b6020ed5fd516df5/expected.json b/test-snapshots/query/b6020ed5fd516df5/expected.json new file mode 100644 index 0000000..be51a62 --- /dev/null +++ b/test-snapshots/query/b6020ed5fd516df5/expected.json @@ -0,0 +1,206 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 108, + "InvoiceLineId_2991": 579, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 108, + "InvoiceLineId_2991": 581, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 319, + "InvoiceLineId_2991": 1729, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 108, + "InvoiceLineId_2991": 582, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 2, + "InvoiceLineId_2991": 3, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 2, + "InvoiceLineId_2991": 4, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 214, + "InvoiceLineId_2991": 1155, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 2, + "InvoiceLineId_2991": 6, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 2, + "InvoiceLineId_2991": 5, + "UnitPrice_7142": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "InvoiceId_8127": 214, + "InvoiceLineId_2991": 1156, + "UnitPrice_7142": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b6020ed5fd516df5/request.json b/test-snapshots/query/b6020ed5fd516df5/request.json new file mode 100644 index 0000000..1e714be --- /dev/null +++ b/test-snapshots/query/b6020ed5fd516df5/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_8127": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_2991": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "UnitPrice_7142": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b6283ad39f2ff154/expected.json b/test-snapshots/query/b6283ad39f2ff154/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b6283ad39f2ff154/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b6283ad39f2ff154/request.json b/test-snapshots/query/b6283ad39f2ff154/request.json new file mode 100644 index 0000000..cf60e0f --- /dev/null +++ b/test-snapshots/query/b6283ad39f2ff154/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b62caab4689dfdc/expected.json b/test-snapshots/query/b62caab4689dfdc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b62caab4689dfdc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b62caab4689dfdc/request.json b/test-snapshots/query/b62caab4689dfdc/request.json new file mode 100644 index 0000000..c0752fa --- /dev/null +++ b/test-snapshots/query/b62caab4689dfdc/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b62f10bd61cf25f0/expected.json b/test-snapshots/query/b62f10bd61cf25f0/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/b62f10bd61cf25f0/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b62f10bd61cf25f0/request.json b/test-snapshots/query/b62f10bd61cf25f0/request.json new file mode 100644 index 0000000..9140a02 --- /dev/null +++ b/test-snapshots/query/b62f10bd61cf25f0/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b63d69de0f3d73d4/expected.json b/test-snapshots/query/b63d69de0f3d73d4/expected.json new file mode 100644 index 0000000..28ac9f8 --- /dev/null +++ b/test-snapshots/query/b63d69de0f3d73d4/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + }, + { + "PlaylistId_8378": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b63d69de0f3d73d4/request.json b/test-snapshots/query/b63d69de0f3d73d4/request.json new file mode 100644 index 0000000..5ca0338 --- /dev/null +++ b/test-snapshots/query/b63d69de0f3d73d4/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8378": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b67809508f7efc98/expected.json b/test-snapshots/query/b67809508f7efc98/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/b67809508f7efc98/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b67809508f7efc98/request.json b/test-snapshots/query/b67809508f7efc98/request.json new file mode 100644 index 0000000..f40c4f4 --- /dev/null +++ b/test-snapshots/query/b67809508f7efc98/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b6f77af83f22cd38/expected.json b/test-snapshots/query/b6f77af83f22cd38/expected.json new file mode 100644 index 0000000..647e2cf --- /dev/null +++ b/test-snapshots/query/b6f77af83f22cd38/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + }, + { + "PlaylistId_6712": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b6f77af83f22cd38/request.json b/test-snapshots/query/b6f77af83f22cd38/request.json new file mode 100644 index 0000000..58a93e3 --- /dev/null +++ b/test-snapshots/query/b6f77af83f22cd38/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_6712": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b7548f43cb7e8c93/expected.json b/test-snapshots/query/b7548f43cb7e8c93/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/b7548f43cb7e8c93/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b7548f43cb7e8c93/request.json b/test-snapshots/query/b7548f43cb7e8c93/request.json new file mode 100644 index 0000000..2994158 --- /dev/null +++ b/test-snapshots/query/b7548f43cb7e8c93/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Snowballed" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b75ea01a25dee806/expected.json b/test-snapshots/query/b75ea01a25dee806/expected.json new file mode 100644 index 0000000..0c398fb --- /dev/null +++ b/test-snapshots/query/b75ea01a25dee806/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + }, + { + "BillingAddress": "Praça Pio X, 119", + "BillingCity": "Rio de Janeiro", + "BillingCountry": "Brazil", + "BillingPostalCode": "20040-020", + "BillingState": "RJ", + "CustomerId": 12, + "InvoiceDate": "2011-08-25", + "InvoiceId": 221, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b75ea01a25dee806/request.json b/test-snapshots/query/b75ea01a25dee806/request.json new file mode 100644 index 0000000..246d6c4 --- /dev/null +++ b/test-snapshots/query/b75ea01a25dee806/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 252 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b78e7b66ec122fd/expected.json b/test-snapshots/query/b78e7b66ec122fd/expected.json new file mode 100644 index 0000000..6511aaa --- /dev/null +++ b/test-snapshots/query/b78e7b66ec122fd/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Classical 101 - Next Steps", + "PlaylistId": 14 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b78e7b66ec122fd/request.json b/test-snapshots/query/b78e7b66ec122fd/request.json new file mode 100644 index 0000000..cd24373 --- /dev/null +++ b/test-snapshots/query/b78e7b66ec122fd/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b7b75160c1672d6f/expected.json b/test-snapshots/query/b7b75160c1672d6f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b7b75160c1672d6f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b7b75160c1672d6f/request.json b/test-snapshots/query/b7b75160c1672d6f/request.json new file mode 100644 index 0000000..51472b4 --- /dev/null +++ b/test-snapshots/query/b7b75160c1672d6f/request.json @@ -0,0 +1,127 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 59 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b7c494de4cb4a545/expected.json b/test-snapshots/query/b7c494de4cb4a545/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b7c494de4cb4a545/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b7c494de4cb4a545/request.json b/test-snapshots/query/b7c494de4cb4a545/request.json new file mode 100644 index 0000000..262b781 --- /dev/null +++ b/test-snapshots/query/b7c494de4cb4a545/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b7df68314d03929b/expected.json b/test-snapshots/query/b7df68314d03929b/expected.json new file mode 100644 index 0000000..d759448 --- /dev/null +++ b/test-snapshots/query/b7df68314d03929b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_8095": 1, + "Name_1599": "Rock" + }, + { + "GenreId_8095": 2, + "Name_1599": "Jazz" + }, + { + "GenreId_8095": 3, + "Name_1599": "Metal" + }, + { + "GenreId_8095": 4, + "Name_1599": "Alternative & Punk" + }, + { + "GenreId_8095": 5, + "Name_1599": "Rock And Roll" + }, + { + "GenreId_8095": 6, + "Name_1599": "Blues" + }, + { + "GenreId_8095": 7, + "Name_1599": "Latin" + }, + { + "GenreId_8095": 8, + "Name_1599": "Reggae" + }, + { + "GenreId_8095": 9, + "Name_1599": "Pop" + }, + { + "GenreId_8095": 10, + "Name_1599": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b7df68314d03929b/request.json b/test-snapshots/query/b7df68314d03929b/request.json new file mode 100644 index 0000000..8fda429 --- /dev/null +++ b/test-snapshots/query/b7df68314d03929b/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_8095": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_1599": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b7e045704f7c4549/expected.json b/test-snapshots/query/b7e045704f7c4549/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b7e045704f7c4549/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b7e045704f7c4549/request.json b/test-snapshots/query/b7e045704f7c4549/request.json new file mode 100644 index 0000000..6159bb5 --- /dev/null +++ b/test-snapshots/query/b7e045704f7c4549/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Electronica/Dance" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b80f92ec6e85c674/expected.json b/test-snapshots/query/b80f92ec6e85c674/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b80f92ec6e85c674/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b80f92ec6e85c674/request.json b/test-snapshots/query/b80f92ec6e85c674/request.json new file mode 100644 index 0000000..ea2e115 --- /dev/null +++ b/test-snapshots/query/b80f92ec6e85c674/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b833ca89ae3b16e4/expected.json b/test-snapshots/query/b833ca89ae3b16e4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b833ca89ae3b16e4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b833ca89ae3b16e4/request.json b/test-snapshots/query/b833ca89ae3b16e4/request.json new file mode 100644 index 0000000..b1329a5 --- /dev/null +++ b/test-snapshots/query/b833ca89ae3b16e4/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b85df2add96d439e/expected.json b/test-snapshots/query/b85df2add96d439e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b85df2add96d439e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b85df2add96d439e/request.json b/test-snapshots/query/b85df2add96d439e/request.json new file mode 100644 index 0000000..8e80404 --- /dev/null +++ b/test-snapshots/query/b85df2add96d439e/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b88950bb3e0e3c01/expected.json b/test-snapshots/query/b88950bb3e0e3c01/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/b88950bb3e0e3c01/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b88950bb3e0e3c01/request.json b/test-snapshots/query/b88950bb3e0e3c01/request.json new file mode 100644 index 0000000..ac10c5b --- /dev/null +++ b/test-snapshots/query/b88950bb3e0e3c01/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b8abff7d0bc013b7/expected.json b/test-snapshots/query/b8abff7d0bc013b7/expected.json new file mode 100644 index 0000000..a0378f3 --- /dev/null +++ b/test-snapshots/query/b8abff7d0bc013b7/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b8abff7d0bc013b7/request.json b/test-snapshots/query/b8abff7d0bc013b7/request.json new file mode 100644 index 0000000..1459a59 --- /dev/null +++ b/test-snapshots/query/b8abff7d0bc013b7/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Leacock" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b8c09745804cb100/expected.json b/test-snapshots/query/b8c09745804cb100/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b8c09745804cb100/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b8c09745804cb100/request.json b/test-snapshots/query/b8c09745804cb100/request.json new file mode 100644 index 0000000..d376d63 --- /dev/null +++ b/test-snapshots/query/b8c09745804cb100/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b8d3516f7a145c99/expected.json b/test-snapshots/query/b8d3516f7a145c99/expected.json new file mode 100644 index 0000000..49c9cfe --- /dev/null +++ b/test-snapshots/query/b8d3516f7a145c99/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 307, + "InvoiceLineId": 1670, + "Quantity": 1, + "TrackId": 3200, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b8d3516f7a145c99/request.json b/test-snapshots/query/b8d3516f7a145c99/request.json new file mode 100644 index 0000000..46212ec --- /dev/null +++ b/test-snapshots/query/b8d3516f7a145c99/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b901707b74fe0deb/expected.json b/test-snapshots/query/b901707b74fe0deb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b901707b74fe0deb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b901707b74fe0deb/request.json b/test-snapshots/query/b901707b74fe0deb/request.json new file mode 100644 index 0000000..4b55610 --- /dev/null +++ b/test-snapshots/query/b901707b74fe0deb/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b9212c1356ccc3fb/expected.json b/test-snapshots/query/b9212c1356ccc3fb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b9212c1356ccc3fb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9212c1356ccc3fb/request.json b/test-snapshots/query/b9212c1356ccc3fb/request.json new file mode 100644 index 0000000..81e15d1 --- /dev/null +++ b/test-snapshots/query/b9212c1356ccc3fb/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Brazilian Music" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b9370f061771bd32/expected.json b/test-snapshots/query/b9370f061771bd32/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b9370f061771bd32/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9370f061771bd32/request.json b/test-snapshots/query/b9370f061771bd32/request.json new file mode 100644 index 0000000..6e1efb6 --- /dev/null +++ b/test-snapshots/query/b9370f061771bd32/request.json @@ -0,0 +1,126 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b95a2f804de0c497/expected.json b/test-snapshots/query/b95a2f804de0c497/expected.json new file mode 100644 index 0000000..cd77d7c --- /dev/null +++ b/test-snapshots/query/b95a2f804de0c497/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b95a2f804de0c497/request.json b/test-snapshots/query/b95a2f804de0c497/request.json new file mode 100644 index 0000000..2ce7445 --- /dev/null +++ b/test-snapshots/query/b95a2f804de0c497/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "11, Place Bellecour" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b96468ec17631a32/expected.json b/test-snapshots/query/b96468ec17631a32/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b96468ec17631a32/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b96468ec17631a32/request.json b/test-snapshots/query/b96468ec17631a32/request.json new file mode 100644 index 0000000..14f4e8d --- /dev/null +++ b/test-snapshots/query/b96468ec17631a32/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b988bd44b4e32dbc/expected.json b/test-snapshots/query/b988bd44b4e32dbc/expected.json new file mode 100644 index 0000000..7fd38c3 --- /dev/null +++ b/test-snapshots/query/b988bd44b4e32dbc/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "City_2081": "Frankfurt", + "Country_5730": "Germany", + "CustomerId_1379": 37, + "Fax_3024": null, + "FirstName_8651": "Fynn", + "LastName_8803": "Zimmermann", + "Phone_7623": "+49 069 40598889", + "State_7573": null, + "SupportRepId_7369": 3 + }, + { + "City_2081": "Warsaw", + "Country_5730": "Poland", + "CustomerId_1379": 49, + "Fax_3024": null, + "FirstName_8651": "Stanisław", + "LastName_8803": "Wójcik", + "Phone_7623": "+48 22 828 37 39", + "State_7573": null, + "SupportRepId_7369": 4 + }, + { + "City_2081": "Prague", + "Country_5730": "Czech Republic", + "CustomerId_1379": 5, + "Fax_3024": "+420 2 4172 5555", + "FirstName_8651": "František", + "LastName_8803": "Wichterlová", + "Phone_7623": "+420 2 4172 5555", + "State_7573": null, + "SupportRepId_7369": 4 + }, + { + "City_2081": "Amsterdam", + "Country_5730": "Netherlands", + "CustomerId_1379": 48, + "Fax_3024": null, + "FirstName_8651": "Johannes", + "LastName_8803": "Van der Berg", + "Phone_7623": "+31 020 6223130", + "State_7573": "VV", + "SupportRepId_7369": 5 + }, + { + "City_2081": "Montréal", + "Country_5730": "Canada", + "CustomerId_1379": 3, + "Fax_3024": null, + "FirstName_8651": "François", + "LastName_8803": "Tremblay", + "Phone_7623": "+1 (514) 721-4711", + "State_7573": "QC", + "SupportRepId_7369": 3 + }, + { + "City_2081": "Sidney", + "Country_5730": "Australia", + "CustomerId_1379": 55, + "Fax_3024": null, + "FirstName_8651": "Mark", + "LastName_8803": "Taylor", + "Phone_7623": "+61 (02) 9332 3633", + "State_7573": "NSW", + "SupportRepId_7369": 4 + }, + { + "City_2081": "Yellowknife", + "Country_5730": "Canada", + "CustomerId_1379": 33, + "Fax_3024": null, + "FirstName_8651": "Ellie", + "LastName_8803": "Sullivan", + "Phone_7623": "+1 (867) 920-2233", + "State_7573": "NT", + "SupportRepId_7369": 3 + }, + { + "City_2081": "Madison", + "Country_5730": "USA", + "CustomerId_1379": 25, + "Fax_3024": null, + "FirstName_8651": "Victor", + "LastName_8803": "Stevens", + "Phone_7623": "+1 (608) 257-0597", + "State_7573": "WI", + "SupportRepId_7369": 5 + }, + { + "City_2081": "Bangalore", + "Country_5730": "India", + "CustomerId_1379": 59, + "Fax_3024": null, + "FirstName_8651": "Puja", + "LastName_8803": "Srivastava", + "Phone_7623": "+91 080 22289999", + "State_7573": null, + "SupportRepId_7369": 3 + }, + { + "City_2081": "Redmond", + "Country_5730": "USA", + "CustomerId_1379": 17, + "Fax_3024": "+1 (425) 882-8081", + "FirstName_8651": "Jack", + "LastName_8803": "Smith", + "Phone_7623": "+1 (425) 882-8080", + "State_7573": "WA", + "SupportRepId_7369": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b988bd44b4e32dbc/request.json b/test-snapshots/query/b988bd44b4e32dbc/request.json new file mode 100644 index 0000000..941457f --- /dev/null +++ b/test-snapshots/query/b988bd44b4e32dbc/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Phone_7623": { + "type": "column", + "column": "Phone", + "fields": null + }, + "City_2081": { + "type": "column", + "column": "City", + "fields": null + }, + "State_7573": { + "type": "column", + "column": "State", + "fields": null + }, + "Country_5730": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_1379": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "SupportRepId_7369": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Fax_3024": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_8651": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_8803": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b9892cef1f4b1f2b/expected.json b/test-snapshots/query/b9892cef1f4b1f2b/expected.json new file mode 100644 index 0000000..e412b93 --- /dev/null +++ b/test-snapshots/query/b9892cef1f4b1f2b/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6485": "90’s Music" + }, + { + "Name_6485": "Audiobooks" + }, + { + "Name_6485": "Audiobooks" + }, + { + "Name_6485": "Brazilian Music" + }, + { + "Name_6485": "Classical" + }, + { + "Name_6485": "Classical 101 - Deep Cuts" + }, + { + "Name_6485": "Classical 101 - Next Steps" + }, + { + "Name_6485": "Classical 101 - The Basics" + }, + { + "Name_6485": "Grunge" + }, + { + "Name_6485": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9892cef1f4b1f2b/request.json b/test-snapshots/query/b9892cef1f4b1f2b/request.json new file mode 100644 index 0000000..0d224fe --- /dev/null +++ b/test-snapshots/query/b9892cef1f4b1f2b/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_6485": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b98b77b2b70bc05b/expected.json b/test-snapshots/query/b98b77b2b70bc05b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b98b77b2b70bc05b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b98b77b2b70bc05b/request.json b/test-snapshots/query/b98b77b2b70bc05b/request.json new file mode 100644 index 0000000..1b00977 --- /dev/null +++ b/test-snapshots/query/b98b77b2b70bc05b/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 (780) 836-9987" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "andrew@chinookcorp.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b998c1a2d1e65316/expected.json b/test-snapshots/query/b998c1a2d1e65316/expected.json new file mode 100644 index 0000000..48ffdc2 --- /dev/null +++ b/test-snapshots/query/b998c1a2d1e65316/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_8376": "AC/DC" + }, + { + "Name_8376": "Accept" + }, + { + "Name_8376": "Aerosmith" + }, + { + "Name_8376": "Alanis Morissette" + }, + { + "Name_8376": "Alice In Chains" + }, + { + "Name_8376": "Antônio Carlos Jobim" + }, + { + "Name_8376": "Apocalyptica" + }, + { + "Name_8376": "Audioslave" + }, + { + "Name_8376": "BackBeat" + }, + { + "Name_8376": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b998c1a2d1e65316/request.json b/test-snapshots/query/b998c1a2d1e65316/request.json new file mode 100644 index 0000000..940e4e7 --- /dev/null +++ b/test-snapshots/query/b998c1a2d1e65316/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_8376": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b99f8ace8898af25/expected.json b/test-snapshots/query/b99f8ace8898af25/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/b99f8ace8898af25/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b99f8ace8898af25/request.json b/test-snapshots/query/b99f8ace8898af25/request.json new file mode 100644 index 0000000..1693b87 --- /dev/null +++ b/test-snapshots/query/b99f8ace8898af25/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b9a34dc403dd72b8/expected.json b/test-snapshots/query/b9a34dc403dd72b8/expected.json new file mode 100644 index 0000000..8f198e8 --- /dev/null +++ b/test-snapshots/query/b9a34dc403dd72b8/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "Bytes_7087": 11170334, + "GenreId_6556": 1, + "Milliseconds_6035": 343719 + }, + { + "Bytes_7087": 5510424, + "GenreId_6556": 1, + "Milliseconds_6035": 342562 + }, + { + "Bytes_7087": 3990994, + "GenreId_6556": 1, + "Milliseconds_6035": 230619 + }, + { + "Bytes_7087": 4331779, + "GenreId_6556": 1, + "Milliseconds_6035": 252051 + }, + { + "Bytes_7087": 6290521, + "GenreId_6556": 1, + "Milliseconds_6035": 375418 + }, + { + "Bytes_7087": 6713451, + "GenreId_6556": 1, + "Milliseconds_6035": 205662 + }, + { + "Bytes_7087": 7636561, + "GenreId_6556": 1, + "Milliseconds_6035": 233926 + }, + { + "Bytes_7087": 6852860, + "GenreId_6556": 1, + "Milliseconds_6035": 210834 + }, + { + "Bytes_7087": 6599424, + "GenreId_6556": 1, + "Milliseconds_6035": 203102 + }, + { + "Bytes_7087": 8611245, + "GenreId_6556": 1, + "Milliseconds_6035": 263497 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9a34dc403dd72b8/request.json b/test-snapshots/query/b9a34dc403dd72b8/request.json new file mode 100644 index 0000000..44c1789 --- /dev/null +++ b/test-snapshots/query/b9a34dc403dd72b8/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "GenreId_6556": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Bytes_7087": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Milliseconds_6035": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/b9ac3c4c9e2a2a66/expected.json b/test-snapshots/query/b9ac3c4c9e2a2a66/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b9ac3c4c9e2a2a66/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9ac3c4c9e2a2a66/request.json b/test-snapshots/query/b9ac3c4c9e2a2a66/request.json new file mode 100644 index 0000000..8338666 --- /dev/null +++ b/test-snapshots/query/b9ac3c4c9e2a2a66/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Michael" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b9b065581859840b/expected.json b/test-snapshots/query/b9b065581859840b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/b9b065581859840b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9b065581859840b/request.json b/test-snapshots/query/b9b065581859840b/request.json new file mode 100644 index 0000000..9ba2bbb --- /dev/null +++ b/test-snapshots/query/b9b065581859840b/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-05-03" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Laura" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/b9f50c74285a5e2c/expected.json b/test-snapshots/query/b9f50c74285a5e2c/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/b9f50c74285a5e2c/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/b9f50c74285a5e2c/request.json b/test-snapshots/query/b9f50c74285a5e2c/request.json new file mode 100644 index 0000000..0fc35e5 --- /dev/null +++ b/test-snapshots/query/b9f50c74285a5e2c/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-04-14" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ba1aea6ebf12ca87/expected.json b/test-snapshots/query/ba1aea6ebf12ca87/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ba1aea6ebf12ca87/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ba1aea6ebf12ca87/request.json b/test-snapshots/query/ba1aea6ebf12ca87/request.json new file mode 100644 index 0000000..9893915 --- /dev/null +++ b/test-snapshots/query/ba1aea6ebf12ca87/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-09-08" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ba29cc5d83d97431/expected.json b/test-snapshots/query/ba29cc5d83d97431/expected.json new file mode 100644 index 0000000..9446286 --- /dev/null +++ b/test-snapshots/query/ba29cc5d83d97431/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "68, Rue Jouvence", + "City": "Dijon", + "Company": null, + "Country": "France", + "CustomerId": 43, + "Email": "isabelle_mercier@apple.fr", + "Fax": null, + "FirstName": "Isabelle", + "LastName": "Mercier", + "Phone": "+33 03 80 73 66 99", + "PostalCode": "21000", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "8, Rue Hanovre", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 40, + "Email": "dominiquelefebvre@gmail.com", + "Fax": null, + "FirstName": "Dominique", + "LastName": "Lefebvre", + "Phone": "+33 01 47 42 71 71", + "PostalCode": "75002", + "State": null, + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ba29cc5d83d97431/request.json b/test-snapshots/query/ba29cc5d83d97431/request.json new file mode 100644 index 0000000..56a1249 --- /dev/null +++ b/test-snapshots/query/ba29cc5d83d97431/request.json @@ -0,0 +1,101 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ba2a85bdb9c8ca1/expected.json b/test-snapshots/query/ba2a85bdb9c8ca1/expected.json new file mode 100644 index 0000000..67ae51e --- /dev/null +++ b/test-snapshots/query/ba2a85bdb9c8ca1/expected.json @@ -0,0 +1,1186 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 1, + "Name_9870": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + }, + { + "AlbumId": 20, + "Bytes": 14184984, + "Composer": "Buddy Guy", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 433397, + "Name": "Stone Crazy", + "TrackId": 196, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 6, + "Name_9870": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4188288, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 174471, + "Name": "Wrathchild", + "TrackId": 1278, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4493440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 187141, + "Name": "Genghis Khan", + "TrackId": 1281, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4804736, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 200150, + "Name": "Purgatory", + "TrackId": 1285, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 4874368, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 203049, + "Name": "Another Life", + "TrackId": 1280, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 5584861, + "Composer": "Di´Anno/Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 232515, + "Name": "Innocent Exile", + "TrackId": 1282, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6205786, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 258377, + "Name": "Murders In The Rue Morgue", + "TrackId": 1279, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 6934660, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 288757, + "Name": "Drifter", + "TrackId": 1286, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 7227440, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 300956, + "Name": "Killers", + "TrackId": 1283, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 8937600, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 372349, + "Name": "Prodigal Son", + "TrackId": 1284, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 13, + "Name_9870": "Heavy Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 102, + "Bytes": 10836304, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 451422, + "Name": "Hallowed Be Thy Name", + "TrackId": 1296, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 10921567, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 454974, + "Name": "Powerslave", + "TrackId": 1294, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 18949518, + "Composer": null, + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 789472, + "Name": "Rime Of The Ancient Mariner", + "TrackId": 1293, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 4912986, + "Composer": "Harris/Di Anno", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 204617, + "Name": "Running Free", + "TrackId": 1299, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5521744, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 229982, + "Name": "Flight Of Icarus", + "TrackId": 1292, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 5561241, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 231627, + "Name": "Run To The Hills", + "TrackId": 1298, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6289117, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 261955, + "Name": "Iron Maiden", + "TrackId": 1297, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6455255, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 268878, + "Name": "The Trooper", + "TrackId": 1290, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 6605094, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 275121, + "Name": "The Number Of The Beast", + "TrackId": 1295, + "UnitPrice": 0.99 + }, + { + "AlbumId": 102, + "Bytes": 8799380, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366550, + "Name": "2 Minutes To Midnight", + "TrackId": 1289, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 3, + "Name_9870": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 11, + "Bytes": 10029406, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 309786, + "Name": "The Curse", + "TrackId": 110, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7542942, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233195, + "Name": "Man Or Animal", + "TrackId": 106, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7609178, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 233691, + "Name": "Drown Me Slowly", + "TrackId": 103, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 7710800, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 237714, + "Name": "The Worm", + "TrackId": 105, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8273592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255529, + "Name": "Your Time Has Come", + "TrackId": 99, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8357387, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 255869, + "Name": "Doesn't Remind Me", + "TrackId": 102, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 8944205, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 273763, + "Name": "Yesterday To Tomorrow", + "TrackId": 107, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9003592, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 278125, + "Name": "Dandelion", + "TrackId": 108, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9006158, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 276688, + "Name": "Heaven's Dead", + "TrackId": 104, + "UnitPrice": 0.99 + }, + { + "AlbumId": 11, + "Bytes": 9106160, + "Composer": "Cornell, Commerford, Morello, Wilk", + "GenreId": 4, + "MediaTypeId": 1, + "Milliseconds": 279484, + "Name": "Be Yourself", + "TrackId": 101, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 4, + "Name_9870": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 115, + "Bytes": 10498031, + "Composer": "Bobby Byrd/James Brown/Ron Lenhoff", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 316551, + "Name": "Get Up (I Feel Like Being A) Sex Machine", + "TrackId": 1423, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 11183457, + "Composer": "Full Force/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 334236, + "Name": "I'm Real", + "TrackId": 1431, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4174420, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 127399, + "Name": "Papa's Got A Brand New Bag Pt.1", + "TrackId": 1418, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 4711323, + "Composer": "Ted Wright", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 143725, + "Name": "Out Of Sight", + "TrackId": 1417, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5394585, + "Composer": "James Brown/Johnny Terry", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 165067, + "Name": "Please Please Please", + "TrackId": 1414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5468472, + "Composer": "James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "I Got You (I Feel Good)", + "TrackId": 1419, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5478117, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 167392, + "Name": "Say It Loud, I'm Black And I'm Proud Pt.1", + "TrackId": 1422, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5513208, + "Composer": "Lowman Pauling", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 166739, + "Name": "Think", + "TrackId": 1415, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5541611, + "Composer": "Betty Newsome/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 168228, + "Name": "It's A Man's Man's Man's World", + "TrackId": 1420, + "UnitPrice": 0.99 + }, + { + "AlbumId": 115, + "Bytes": 5643213, + "Composer": "Alfred Ellis/James Brown", + "GenreId": 14, + "MediaTypeId": 1, + "Milliseconds": 172408, + "Name": "Cold Sweat", + "TrackId": 1421, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 14, + "Name_9870": "R&B/Soul" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 118, + "Bytes": 10334529, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 309995, + "Name": "The Kids", + "TrackId": 1460, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 10843832, + "Composer": "Toby Smith/Wallis Buchanan", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 322455, + "Name": "Journey To Arnhemland", + "TrackId": 1463, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11043559, + "Composer": "Stuard Zender/Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 329534, + "Name": "Mr. Moon", + "TrackId": 1461, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 11796244, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 354560, + "Name": "Light Years", + "TrackId": 1458, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12676962, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 382197, + "Name": "Manifest Destiny", + "TrackId": 1459, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12777210, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 384130, + "Name": "Morning Glory", + "TrackId": 1464, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 12906520, + "Composer": "J. Kay/Jay Kay", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 385697, + "Name": "Space Cowboy", + "TrackId": 1465, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 14019705, + "Composer": "Stuart Zender", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 422321, + "Name": "Scam", + "TrackId": 1462, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 17582818, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 529684, + "Name": "Just Another Story", + "TrackId": 1455, + "UnitPrice": 0.99 + }, + { + "AlbumId": 118, + "Bytes": 8644290, + "Composer": "Toby Smith", + "GenreId": 15, + "MediaTypeId": 1, + "Milliseconds": 257097, + "Name": "Stillness In Time", + "TrackId": 1456, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 15, + "Name_9870": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 12, + "Bytes": 1299960, + "Composer": "Ned Fairchild", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 107807, + "Name": "20 Flight Rock", + "TrackId": 122, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1704918, + "Composer": "Little Richard", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106266, + "Name": "Good Golly Miss Molly", + "TrackId": 121, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1707084, + "Composer": "Enotris Johnson/Little Richard/Robert \"Bumps\" Blackwell", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 106396, + "Name": "Long Tall Sally", + "TrackId": 112, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 1862126, + "Composer": "Larry Williams", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 116088, + "Name": "Bad Boy", + "TrackId": 113, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2206986, + "Composer": "Brian Holland/Freddie Gorman/Georgia Dobbins/Robert Bateman/William Garrett", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 137639, + "Name": "Please Mr. Postman", + "TrackId": 115, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2247846, + "Composer": "Eddie Cochran/Jerry Capehart", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 140199, + "Name": "C'Mon Everybody", + "TrackId": 116, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2276788, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 141923, + "Name": "Rock 'N' Roll Music", + "TrackId": 117, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2301989, + "Composer": "Bo Diddley", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143595, + "Name": "Roadrunner", + "TrackId": 119, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2306019, + "Composer": "Chuck Berry", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 143830, + "Name": "Carol", + "TrackId": 120, + "UnitPrice": 0.99 + }, + { + "AlbumId": 12, + "Bytes": 2365897, + "Composer": "Berry Gordy, Jr./Janie Bradford", + "GenreId": 5, + "MediaTypeId": 1, + "Milliseconds": 147591, + "Name": "Money", + "TrackId": 111, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 5, + "Name_9870": "Rock And Roll" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 122, + "Bytes": 10211473, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 310073, + "Name": "Engenho De Dentro", + "TrackId": 1506, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10599953, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 317100, + "Name": "W/Brasil (Chama O Síndico)", + "TrackId": 1510, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10724982, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 326321, + "Name": "Selassiê", + "TrackId": 1514, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 10996656, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 338076, + "Name": "Que Maravilha", + "TrackId": 1516, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 11314756, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 343484, + "Name": "Salve Simpatia", + "TrackId": 1509, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12010478, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 355239, + "Name": "Alcohol", + "TrackId": 1507, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12304520, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 367281, + "Name": "Os Alquimistas Estão Chegando", + "TrackId": 1512, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 12524725, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 380081, + "Name": "Santa Clara Clareou", + "TrackId": 1517, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 13022833, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 389276, + "Name": "Charles Anjo 45", + "TrackId": 1513, + "UnitPrice": 0.99 + }, + { + "AlbumId": 122, + "Bytes": 14946972, + "Composer": null, + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 452519, + "Name": "País Tropical", + "TrackId": 1511, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 7, + "Name_9870": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId": 124, + "Bytes": 3948371, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 118804, + "Name": "Cuando Eu For Pro Ceu", + "TrackId": 1541, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6031174, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 180924, + "Name": "Cafezinho", + "TrackId": 1544, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6056200, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 182308, + "Name": "No Futuro", + "TrackId": 1535, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6400532, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 190484, + "Name": "Choramingando", + "TrackId": 1533, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 6774566, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 203415, + "Name": "Do Nosso Amor", + "TrackId": 1542, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7104588, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 208457, + "Name": "Borogodo", + "TrackId": 1543, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7248336, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 220891, + "Name": "Enquanto O Dia Não Vem", + "TrackId": 1545, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7257390, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 213263, + "Name": "Papelão", + "TrackId": 1540, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 7764601, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 230582, + "Name": "Por Merecer", + "TrackId": 1534, + "UnitPrice": 0.99 + }, + { + "AlbumId": 124, + "Bytes": 8077282, + "Composer": "João Suplicy", + "GenreId": 16, + "MediaTypeId": 1, + "Milliseconds": 241084, + "Name": "Voce Inteira", + "TrackId": 1536, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8533": 16, + "Name_9870": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ba2a85bdb9c8ca1/request.json b/test-snapshots/query/ba2a85bdb9c8ca1/request.json new file mode 100644 index 0000000..95bbd30 --- /dev/null +++ b/test-snapshots/query/ba2a85bdb9c8ca1/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_8533": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_9870": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ba4b1ef84511bf99/expected.json b/test-snapshots/query/ba4b1ef84511bf99/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/ba4b1ef84511bf99/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ba4b1ef84511bf99/request.json b/test-snapshots/query/ba4b1ef84511bf99/request.json new file mode 100644 index 0000000..772318d --- /dev/null +++ b/test-snapshots/query/ba4b1ef84511bf99/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ba7e8bc59e6a9329/expected.json b/test-snapshots/query/ba7e8bc59e6a9329/expected.json new file mode 100644 index 0000000..a8fdc2d --- /dev/null +++ b/test-snapshots/query/ba7e8bc59e6a9329/expected.json @@ -0,0 +1,553 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 121, + "Bytes": 1851753, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 102630, + "Name": "Midnight", + "TrackId": 1504, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 1944738, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 108435, + "Name": "Hill of the Skull", + "TrackId": 1501, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3300654, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 193560, + "Name": "Satch Boogie", + "TrackId": 1500, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3435777, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 202035, + "Name": "Always With Me, Always With You", + "TrackId": 1499, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3548553, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 209071, + "Name": "Circles", + "TrackId": 1502, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4036215, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 239721, + "Name": "Ice 9", + "TrackId": 1497, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4418504, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 263707, + "Name": "Surfing with the Alien", + "TrackId": 1496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4809279, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 288227, + "Name": "Lords of Karma", + "TrackId": 1503, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5232158, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 314768, + "Name": "Crushing Day", + "TrackId": 1498, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5595557, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 337570, + "Name": "Echo", + "TrackId": 1505, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 226, + "Bytes": 490750393, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622250, + "Name": "Battlestar Galactica: The Story So Far", + "TrackId": 2819, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 1054423946, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 5286953, + "Name": "Occupation / Precipice", + "TrackId": 2820, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 462818231, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2620245, + "Name": "A Day In the Life", + "TrackId": 2833, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 466820021, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2618000, + "Name": "Exodus, Pt. 2", + "TrackId": 2822, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 475079441, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2621708, + "Name": "Exodus, Pt. 1", + "TrackId": 2821, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 483484911, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2626626, + "Name": "Collaborators", + "TrackId": 2823, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 486233524, + "Composer": null, + "GenreId": 20, + "MediaTypeId": 3, + "Milliseconds": 2622622, + "Name": "Crossroads, Pt. 1", + "TrackId": 2837, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 489715554, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2563938, + "Name": "A Measure of Salvation", + "TrackId": 2825, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 490375760, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2623875, + "Name": "The Passage", + "TrackId": 2828, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 492700163, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624207, + "Name": "Taking a Break from All Your Worries", + "TrackId": 2831, + "UnitPrice": 1.99 + } + ] + } + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 260, + "Bytes": 8052374, + "Composer": null, + "GenreId": 23, + "MediaTypeId": 4, + "Milliseconds": 234013, + "Name": "War Pigs", + "TrackId": 3336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 283, + "Bytes": 10085867, + "Composer": "Franz Joseph Haydn", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 306687, + "Name": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId": 3414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 318, + "Bytes": 3819535, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 101293, + "Name": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId": 3452, + "UnitPrice": 0.99 + }, + { + "AlbumId": 324, + "Bytes": 10887931, + "Composer": "Ludwig van Beethoven", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 339567, + "Name": "Prometheus Overture, Op. 43", + "TrackId": 3479, + "UnitPrice": 0.99 + }, + { + "AlbumId": 325, + "Bytes": 9785346, + "Composer": "Béla Bartók", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 299350, + "Name": "Sonata for Solo Violin: IV: Presto", + "TrackId": 3480, + "UnitPrice": 0.99 + }, + { + "AlbumId": 340, + "Bytes": 2229617, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 51780, + "Name": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "TrackId": 3496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 342, + "Bytes": 16454937, + "Composer": "Pietro Antonio Locatelli", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 493573, + "Name": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId": 3498, + "UnitPrice": 0.99 + } + ] + } + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 262, + "Bytes": 4011615, + "Composer": "Luca Gusella", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 246503, + "Name": "Amanda", + "TrackId": 3349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 262, + "Bytes": 4821485, + "Composer": "Andrea Dulbecco", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 307385, + "Name": "Despertar", + "TrackId": 3350, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4615841, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 285837, + "Name": "Din Din Wo (Little Child)", + "TrackId": 3351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4855457, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 300605, + "Name": "I Ka Barra (Your Work)", + "TrackId": 3354, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 5327463, + "Composer": "Karsh Kale/Vishal Vaid", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 327122, + "Name": "Distance", + "TrackId": 3352, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 6034098, + "Composer": "Karsh Kale", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 366085, + "Name": "One Step Beyond", + "TrackId": 3358, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3240609, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 199923, + "Name": "Love Comes", + "TrackId": 3355, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3453849, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 212044, + "Name": "I Guess You're Right", + "TrackId": 3353, + "UnitPrice": 0.99 + }, + { + "AlbumId": 266, + "Bytes": 2775071, + "Composer": "Luciana Souza", + "GenreId": 7, + "MediaTypeId": 5, + "Milliseconds": 172710, + "Name": "Muita Bobeira", + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "AlbumId": 267, + "Bytes": 4292028, + "Composer": "Aaron Goldberg", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 266936, + "Name": "OAM's Blues", + "TrackId": 3357, + "UnitPrice": 0.99 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ba7e8bc59e6a9329/request.json b/test-snapshots/query/ba7e8bc59e6a9329/request.json new file mode 100644 index 0000000..3977ea9 --- /dev/null +++ b/test-snapshots/query/ba7e8bc59e6a9329/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ba8b2891a6199352/expected.json b/test-snapshots/query/ba8b2891a6199352/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/ba8b2891a6199352/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ba8b2891a6199352/request.json b/test-snapshots/query/ba8b2891a6199352/request.json new file mode 100644 index 0000000..b7fbcd4 --- /dev/null +++ b/test-snapshots/query/ba8b2891a6199352/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 343719 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/baa7a951be578110/expected.json b/test-snapshots/query/baa7a951be578110/expected.json new file mode 100644 index 0000000..058f427 --- /dev/null +++ b/test-snapshots/query/baa7a951be578110/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "GenreId": 11, + "Name": "Bossa Nova" + }, + { + "GenreId": 12, + "Name": "Easy Listening" + }, + { + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "GenreId": 16, + "Name": "World" + }, + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/baa7a951be578110/request.json b/test-snapshots/query/baa7a951be578110/request.json new file mode 100644 index 0000000..7f071c8 --- /dev/null +++ b/test-snapshots/query/baa7a951be578110/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bab98de09cdc239a/expected.json b/test-snapshots/query/bab98de09cdc239a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bab98de09cdc239a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bab98de09cdc239a/request.json b/test-snapshots/query/bab98de09cdc239a/request.json new file mode 100644 index 0000000..092fc81 --- /dev/null +++ b/test-snapshots/query/bab98de09cdc239a/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bb4febc4fb06c24/expected.json b/test-snapshots/query/bb4febc4fb06c24/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bb4febc4fb06c24/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bb4febc4fb06c24/request.json b/test-snapshots/query/bb4febc4fb06c24/request.json new file mode 100644 index 0000000..64e3f50 --- /dev/null +++ b/test-snapshots/query/bb4febc4fb06c24/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bb5c7fc0dba76b96/expected.json b/test-snapshots/query/bb5c7fc0dba76b96/expected.json new file mode 100644 index 0000000..c10276f --- /dev/null +++ b/test-snapshots/query/bb5c7fc0dba76b96/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_4131": 50, + "Title_1288": "...And Justice For All" + }, + { + "ArtistId_4131": 179, + "Title_1288": "20th Century Masters - The Millennium Collection: The Best of Scorpions" + }, + { + "ArtistId_4131": 230, + "Title_1288": "A Copland Celebration, Vol. I" + }, + { + "ArtistId_4131": 90, + "Title_1288": "A Matter of Life and Death" + }, + { + "ArtistId_4131": 90, + "Title_1288": "A Real Dead One" + }, + { + "ArtistId_4131": 90, + "Title_1288": "A Real Live One" + }, + { + "ArtistId_4131": 219, + "Title_1288": "A Soprano Inspired" + }, + { + "ArtistId_4131": 99, + "Title_1288": "A TempestadeTempestade Ou O Livro Dos Dias" + }, + { + "ArtistId_4131": 132, + "Title_1288": "A-Sides" + }, + { + "ArtistId_4131": 106, + "Title_1288": "Ace Of Spades" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bb5c7fc0dba76b96/request.json b/test-snapshots/query/bb5c7fc0dba76b96/request.json new file mode 100644 index 0000000..71950bf --- /dev/null +++ b/test-snapshots/query/bb5c7fc0dba76b96/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "Title_1288": { + "type": "column", + "column": "Title", + "fields": null + }, + "ArtistId_4131": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bb70f23623130bf0/expected.json b/test-snapshots/query/bb70f23623130bf0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bb70f23623130bf0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bb70f23623130bf0/request.json b/test-snapshots/query/bb70f23623130bf0/request.json new file mode 100644 index 0000000..b3f2f42 --- /dev/null +++ b/test-snapshots/query/bb70f23623130bf0/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-8772" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bb75bab40ef446b/expected.json b/test-snapshots/query/bb75bab40ef446b/expected.json new file mode 100644 index 0000000..883e989 --- /dev/null +++ b/test-snapshots/query/bb75bab40ef446b/expected.json @@ -0,0 +1,946 @@ +[ + { + "rows": [ + { + "Address_6505": "1 Infinite Loop", + "City_5755": "Cupertino", + "Company_1445": "Apple Inc.", + "CustomerId_9649": 19, + "Email_4059": "tgoyer@apple.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + }, + "Fax_4358": "+1 (408) 996-1011", + "FirstName_1041": "Tim", + "LastName_7195": "Goyer", + "PostalCode_0514": "95014", + "State_3820": "CA", + "SupportRepId_0810": 3 + }, + { + "Address_6505": "1 Microsoft Way", + "City_5755": "Redmond", + "Company_1445": "Microsoft Corporation", + "CustomerId_9649": 17, + "Email_4059": "jacksmith@microsoft.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + } + ] + }, + "Fax_4358": "+1 (425) 882-8081", + "FirstName_1041": "Jack", + "LastName_7195": "Smith", + "PostalCode_0514": "98052-8300", + "State_3820": "WA", + "SupportRepId_0810": 5 + }, + { + "Address_6505": "1033 N Park Ave", + "City_5755": "Tucson", + "Company_1445": null, + "CustomerId_9649": 27, + "Email_4059": "patrick.gray@aol.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "Patrick", + "LastName_7195": "Gray", + "PostalCode_0514": "85719", + "State_3820": "AZ", + "SupportRepId_0810": 4 + }, + { + "Address_6505": "11, Place Bellecour", + "City_5755": "Lyon", + "Company_1445": null, + "CustomerId_9649": 41, + "Email_4059": "marc.dubois@hotmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "Marc", + "LastName_7195": "Dubois", + "PostalCode_0514": "69002", + "State_3820": null, + "SupportRepId_0810": 5 + }, + { + "Address_6505": "110 Raeburn Pl", + "City_5755": "Edinburgh ", + "Company_1445": null, + "CustomerId_9649": 54, + "Email_4059": "steve.murray@yahoo.uk", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2011-06-24", + "InvoiceId": 207, + "Total": 8.91 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-01-28", + "InvoiceId": 336, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-08-04", + "InvoiceId": 381, + "Total": 5.94 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "Steve", + "LastName_7195": "Murray", + "PostalCode_0514": "EH4 1HH", + "State_3820": null, + "SupportRepId_0810": 5 + }, + { + "Address_6505": "113 Lupus St", + "City_5755": "London", + "Company_1445": null, + "CustomerId_9649": 53, + "Email_4059": "phil.hughes@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "Phil", + "LastName_7195": "Hughes", + "PostalCode_0514": "SW1V 3EN", + "State_3820": null, + "SupportRepId_0810": 3 + }, + { + "Address_6505": "12,Community Centre", + "City_5755": "Delhi", + "Company_1445": null, + "CustomerId_9649": 58, + "Email_4059": "manoj.pareek@rediff.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2010-06-12", + "InvoiceId": 120, + "Total": 1.98 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2010-07-23", + "InvoiceId": 131, + "Total": 13.86 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2011-03-23", + "InvoiceId": 186, + "Total": 8.91 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2012-10-27", + "InvoiceId": 315, + "Total": 1.98 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-01-29", + "InvoiceId": 338, + "Total": 3.96 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-05-03", + "InvoiceId": 360, + "Total": 5.94 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-12-22", + "InvoiceId": 412, + "Total": 1.99 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "Manoj", + "LastName_7195": "Pareek", + "PostalCode_0514": "110017", + "State_3820": null, + "SupportRepId_0810": 3 + }, + { + "Address_6505": "120 S Orange Ave", + "City_5755": "Orlando", + "Company_1445": null, + "CustomerId_9649": 22, + "Email_4059": "hleacock@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "Heather", + "LastName_7195": "Leacock", + "PostalCode_0514": "32801", + "State_3820": "FL", + "SupportRepId_0810": 4 + }, + { + "Address_6505": "1498 rue Bélanger", + "City_5755": "Montréal", + "Company_1445": null, + "CustomerId_9649": 3, + "Email_4059": "ftremblay@gmail.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + } + ] + }, + "Fax_4358": null, + "FirstName_1041": "François", + "LastName_7195": "Tremblay", + "PostalCode_0514": "H2G 1A7", + "State_3820": "QC", + "SupportRepId_0810": 3 + }, + { + "Address_6505": "1600 Amphitheatre Parkway", + "City_5755": "Mountain View", + "Company_1445": "Google Inc.", + "CustomerId_9649": 16, + "Email_4059": "fharris@google.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + }, + "Fax_4358": "+1 (650) 253-0000", + "FirstName_1041": "Frank", + "LastName_7195": "Harris", + "PostalCode_0514": "94043-1351", + "State_3820": "CA", + "SupportRepId_0810": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bb75bab40ef446b/request.json b/test-snapshots/query/bb75bab40ef446b/request.json new file mode 100644 index 0000000..68c4a69 --- /dev/null +++ b/test-snapshots/query/bb75bab40ef446b/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_6505": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_5755": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_1445": { + "type": "column", + "column": "Company", + "fields": null + }, + "SupportRepId_0810": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "CustomerId_9649": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_4059": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_4358": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_1041": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_7195": { + "type": "column", + "column": "LastName", + "fields": null + }, + "State_3820": { + "type": "column", + "column": "State", + "fields": null + }, + "PostalCode_0514": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bb8786d2e62f1aa2/expected.json b/test-snapshots/query/bb8786d2e62f1aa2/expected.json new file mode 100644 index 0000000..552f411 --- /dev/null +++ b/test-snapshots/query/bb8786d2e62f1aa2/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_9149": "On-The-Go 1", + "PlaylistId_5586": 18 + }, + { + "Name_9149": "Heavy Metal Classic", + "PlaylistId_5586": 17 + }, + { + "Name_9149": "Grunge", + "PlaylistId_5586": 16 + }, + { + "Name_9149": "Classical 101 - The Basics", + "PlaylistId_5586": 15 + }, + { + "Name_9149": "Classical 101 - Next Steps", + "PlaylistId_5586": 14 + }, + { + "Name_9149": "Classical 101 - Deep Cuts", + "PlaylistId_5586": 13 + }, + { + "Name_9149": "Classical", + "PlaylistId_5586": 12 + }, + { + "Name_9149": "Brazilian Music", + "PlaylistId_5586": 11 + }, + { + "Name_9149": "TV Shows", + "PlaylistId_5586": 10 + }, + { + "Name_9149": "Music Videos", + "PlaylistId_5586": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bb8786d2e62f1aa2/request.json b/test-snapshots/query/bb8786d2e62f1aa2/request.json new file mode 100644 index 0000000..29acb6d --- /dev/null +++ b/test-snapshots/query/bb8786d2e62f1aa2/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_9149": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_5586": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bb941410b56654ec/expected.json b/test-snapshots/query/bb941410b56654ec/expected.json new file mode 100644 index 0000000..a0778f4 --- /dev/null +++ b/test-snapshots/query/bb941410b56654ec/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_7607": 5, + "Name_0089": "AAC audio file" + }, + { + "MediaTypeId_7607": 4, + "Name_0089": "Purchased AAC audio file" + }, + { + "MediaTypeId_7607": 3, + "Name_0089": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_7607": 2, + "Name_0089": "Protected AAC audio file" + }, + { + "MediaTypeId_7607": 1, + "Name_0089": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bb941410b56654ec/request.json b/test-snapshots/query/bb941410b56654ec/request.json new file mode 100644 index 0000000..8d00e9d --- /dev/null +++ b/test-snapshots/query/bb941410b56654ec/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_7607": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_0089": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bbc0d524af31a285/expected.json b/test-snapshots/query/bbc0d524af31a285/expected.json new file mode 100644 index 0000000..b72c795 --- /dev/null +++ b/test-snapshots/query/bbc0d524af31a285/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + }, + { + "Quantity_0117": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bbc0d524af31a285/request.json b/test-snapshots/query/bbc0d524af31a285/request.json new file mode 100644 index 0000000..a9c77f2 --- /dev/null +++ b/test-snapshots/query/bbc0d524af31a285/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_0117": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bbd1a0213aa9ff20/expected.json b/test-snapshots/query/bbd1a0213aa9ff20/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bbd1a0213aa9ff20/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bbd1a0213aa9ff20/request.json b/test-snapshots/query/bbd1a0213aa9ff20/request.json new file mode 100644 index 0000000..0217c2b --- /dev/null +++ b/test-snapshots/query/bbd1a0213aa9ff20/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13.86 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bbe2c18ba097dabd/expected.json b/test-snapshots/query/bbe2c18ba097dabd/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/bbe2c18ba097dabd/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bbe2c18ba097dabd/request.json b/test-snapshots/query/bbe2c18ba097dabd/request.json new file mode 100644 index 0000000..3e32b4c --- /dev/null +++ b/test-snapshots/query/bbe2c18ba097dabd/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Night Of The Long Knives" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bbe33d342b819f72/expected.json b/test-snapshots/query/bbe33d342b819f72/expected.json new file mode 100644 index 0000000..9ffc4dc --- /dev/null +++ b/test-snapshots/query/bbe33d342b819f72/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bbe33d342b819f72/request.json b/test-snapshots/query/bbe33d342b819f72/request.json new file mode 100644 index 0000000..38ac49e --- /dev/null +++ b/test-snapshots/query/bbe33d342b819f72/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bbff5e319fab9db/expected.json b/test-snapshots/query/bbff5e319fab9db/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bbff5e319fab9db/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bbff5e319fab9db/request.json b/test-snapshots/query/bbff5e319fab9db/request.json new file mode 100644 index 0000000..4dc4be4 --- /dev/null +++ b/test-snapshots/query/bbff5e319fab9db/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 104 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bc00212313d7a758/expected.json b/test-snapshots/query/bc00212313d7a758/expected.json new file mode 100644 index 0000000..c6736e9 --- /dev/null +++ b/test-snapshots/query/bc00212313d7a758/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_4997": 347, + "Title_6550": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_4997": 346, + "Title_6550": "Mozart: Chamber Music" + }, + { + "AlbumId_4997": 345, + "Title_6550": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_4997": 344, + "Title_6550": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_4997": 342, + "Title_6550": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_4997": 341, + "Title_6550": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_4997": 340, + "Title_6550": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_4997": 339, + "Title_6550": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_4997": 338, + "Title_6550": "Nielsen: The Six Symphonies" + }, + { + "AlbumId_4997": 337, + "Title_6550": "Szymanowski: Piano Works, Vol. 1" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc00212313d7a758/request.json b/test-snapshots/query/bc00212313d7a758/request.json new file mode 100644 index 0000000..2b7c5f2 --- /dev/null +++ b/test-snapshots/query/bc00212313d7a758/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_4997": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_6550": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bc068994f84bdb3a/expected.json b/test-snapshots/query/bc068994f84bdb3a/expected.json new file mode 100644 index 0000000..33eaf38 --- /dev/null +++ b/test-snapshots/query/bc068994f84bdb3a/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 4506425, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 278312, + "Name": "#9 Dream", + "TrackId": 3254, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc068994f84bdb3a/request.json b/test-snapshots/query/bc068994f84bdb3a/request.json new file mode 100644 index 0000000..85f6a5c --- /dev/null +++ b/test-snapshots/query/bc068994f84bdb3a/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 535 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bc24023098ce747d/expected.json b/test-snapshots/query/bc24023098ce747d/expected.json new file mode 100644 index 0000000..ffe3bab --- /dev/null +++ b/test-snapshots/query/bc24023098ce747d/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc24023098ce747d/request.json b/test-snapshots/query/bc24023098ce747d/request.json new file mode 100644 index 0000000..d990100 --- /dev/null +++ b/test-snapshots/query/bc24023098ce747d/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11170334 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bc61cc5bd2c21aeb/expected.json b/test-snapshots/query/bc61cc5bd2c21aeb/expected.json new file mode 100644 index 0000000..058f427 --- /dev/null +++ b/test-snapshots/query/bc61cc5bd2c21aeb/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "GenreId": 11, + "Name": "Bossa Nova" + }, + { + "GenreId": 12, + "Name": "Easy Listening" + }, + { + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "GenreId": 16, + "Name": "World" + }, + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc61cc5bd2c21aeb/request.json b/test-snapshots/query/bc61cc5bd2c21aeb/request.json new file mode 100644 index 0000000..f923a0e --- /dev/null +++ b/test-snapshots/query/bc61cc5bd2c21aeb/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bc6554c802e89829/expected.json b/test-snapshots/query/bc6554c802e89829/expected.json new file mode 100644 index 0000000..856bf22 --- /dev/null +++ b/test-snapshots/query/bc6554c802e89829/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address_2149": "319 N. Frances Street", + "City_4939": "Madison", + "Company_9844": null, + "Country_7940": "USA", + "CustomerId_6761": 25, + "Email_4052": "vstevens@yahoo.com", + "Fax_6620": null, + "FirstName_6193": "Victor", + "LastName_4772": "Stevens", + "Phone_1690": "+1 (608) 257-0597", + "PostalCode_8349": "53703", + "State_7448": "WI", + "SupportRepId_3526": 5 + }, + { + "Address_2149": "1 Microsoft Way", + "City_4939": "Redmond", + "Company_9844": "Microsoft Corporation", + "Country_7940": "USA", + "CustomerId_6761": 17, + "Email_4052": "jacksmith@microsoft.com", + "Fax_6620": "+1 (425) 882-8081", + "FirstName_6193": "Jack", + "LastName_4772": "Smith", + "Phone_1690": "+1 (425) 882-8080", + "PostalCode_8349": "98052-8300", + "State_7448": "WA", + "SupportRepId_3526": 5 + }, + { + "Address_2149": "Lijnbaansgracht 120bg", + "City_4939": "Amsterdam", + "Company_9844": null, + "Country_7940": "Netherlands", + "CustomerId_6761": 48, + "Email_4052": "johavanderberg@yahoo.nl", + "Fax_6620": null, + "FirstName_6193": "Johannes", + "LastName_4772": "Van der Berg", + "Phone_1690": "+31 020 6223130", + "PostalCode_8349": "1016", + "State_7448": "VV", + "SupportRepId_3526": 5 + }, + { + "Address_2149": "302 S 700 E", + "City_4939": "Salt Lake City", + "Company_9844": null, + "Country_7940": "USA", + "CustomerId_6761": 28, + "Email_4052": "jubarnett@gmail.com", + "Fax_6620": null, + "FirstName_6193": "Julia", + "LastName_4772": "Barnett", + "Phone_1690": "+1 (801) 531-7272", + "PostalCode_8349": "84102", + "State_7448": "UT", + "SupportRepId_3526": 5 + }, + { + "Address_2149": "2211 W Berry Street", + "City_4939": "Fort Worth", + "Company_9844": null, + "Country_7940": "USA", + "CustomerId_6761": 26, + "Email_4052": "ricunningham@hotmail.com", + "Fax_6620": null, + "FirstName_6193": "Richard", + "LastName_4772": "Cunningham", + "Phone_1690": "+1 (817) 924-7272", + "PostalCode_8349": "76110", + "State_7448": "TX", + "SupportRepId_3526": 4 + }, + { + "Address_2149": "Av. Brigadeiro Faria Lima, 2170", + "City_4939": "São José dos Campos", + "Company_9844": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_7940": "Brazil", + "CustomerId_6761": 1, + "Email_4052": "luisg@embraer.com.br", + "Fax_6620": "+55 (12) 3923-5566", + "FirstName_6193": "Luís", + "LastName_4772": "Gonçalves", + "Phone_1690": "+55 (12) 3923-5555", + "PostalCode_8349": "12227-000", + "State_7448": "SP", + "SupportRepId_3526": 3 + }, + { + "Address_2149": "Av. Paulista, 2022", + "City_4939": "São Paulo", + "Company_9844": "Banco do Brasil S.A.", + "Country_7940": "Brazil", + "CustomerId_6761": 11, + "Email_4052": "alero@uol.com.br", + "Fax_6620": "+55 (11) 3055-8131", + "FirstName_6193": "Alexandre", + "LastName_4772": "Rocha", + "Phone_1690": "+55 (11) 3055-3278", + "PostalCode_8349": "01310-200", + "State_7448": "SP", + "SupportRepId_3526": 5 + }, + { + "Address_2149": "Rua Dr. Falcão Filho, 155", + "City_4939": "São Paulo", + "Company_9844": "Woodstock Discos", + "Country_7940": "Brazil", + "CustomerId_6761": 10, + "Email_4052": "eduardo@woodstock.com.br", + "Fax_6620": "+55 (11) 3033-4564", + "FirstName_6193": "Eduardo", + "LastName_4772": "Martins", + "Phone_1690": "+55 (11) 3033-5446", + "PostalCode_8349": "01007-010", + "State_7448": "SP", + "SupportRepId_3526": 4 + }, + { + "Address_2149": "Via Degli Scipioni, 43", + "City_4939": "Rome", + "Company_9844": null, + "Country_7940": "Italy", + "CustomerId_6761": 47, + "Email_4052": "lucas.mancini@yahoo.it", + "Fax_6620": null, + "FirstName_6193": "Lucas", + "LastName_4772": "Mancini", + "Phone_1690": "+39 06 39733434", + "PostalCode_8349": "00192", + "State_7448": "RM", + "SupportRepId_3526": 5 + }, + { + "Address_2149": "Praça Pio X, 119", + "City_4939": "Rio de Janeiro", + "Company_9844": "Riotur", + "Country_7940": "Brazil", + "CustomerId_6761": 12, + "Email_4052": "roberto.almeida@riotur.gov.br", + "Fax_6620": "+55 (21) 2271-7070", + "FirstName_6193": "Roberto", + "LastName_4772": "Almeida", + "Phone_1690": "+55 (21) 2271-7000", + "PostalCode_8349": "20040-020", + "State_7448": "RJ", + "SupportRepId_3526": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc6554c802e89829/request.json b/test-snapshots/query/bc6554c802e89829/request.json new file mode 100644 index 0000000..64a7c44 --- /dev/null +++ b/test-snapshots/query/bc6554c802e89829/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_2149": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_4939": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_9844": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_7940": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_6761": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_4052": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_6620": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6193": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_4772": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1690": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_8349": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_7448": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId_3526": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bc65d3bd384c9091/expected.json b/test-snapshots/query/bc65d3bd384c9091/expected.json new file mode 100644 index 0000000..1e8a631 --- /dev/null +++ b/test-snapshots/query/bc65d3bd384c9091/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "Name_count": 18, + "Name_distinct_count": 14, + "PlaylistId_count": 18, + "PlaylistId_distinct_count": 18 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc65d3bd384c9091/request.json b/test-snapshots/query/bc65d3bd384c9091/request.json new file mode 100644 index 0000000..eef1da3 --- /dev/null +++ b/test-snapshots/query/bc65d3bd384c9091/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Playlist", + "query": { + "aggregates": { + "Name_count": { + "type": "column_count", + "column": "Name", + "distinct": false + }, + "Name_distinct_count": { + "type": "column_count", + "column": "Name", + "distinct": true + }, + "PlaylistId_count": { + "type": "column_count", + "column": "PlaylistId", + "distinct": false + }, + "PlaylistId_distinct_count": { + "type": "column_count", + "column": "PlaylistId", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bc6a67750422b9ef/expected.json b/test-snapshots/query/bc6a67750422b9ef/expected.json new file mode 100644 index 0000000..139da0b --- /dev/null +++ b/test-snapshots/query/bc6a67750422b9ef/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bc6a67750422b9ef/request.json b/test-snapshots/query/bc6a67750422b9ef/request.json new file mode 100644 index 0000000..bb8067c --- /dev/null +++ b/test-snapshots/query/bc6a67750422b9ef/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bca29d6aa4d6b990/expected.json b/test-snapshots/query/bca29d6aa4d6b990/expected.json new file mode 100644 index 0000000..cebbd59 --- /dev/null +++ b/test-snapshots/query/bca29d6aa4d6b990/expected.json @@ -0,0 +1,262 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 6 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 2 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 7 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8140": 1000 + }, + { + "TrackId_8140": 1001 + }, + { + "TrackId_8140": 1002 + }, + { + "TrackId_8140": 1003 + }, + { + "TrackId_8140": 1004 + }, + { + "TrackId_8140": 1005 + }, + { + "TrackId_8140": 1006 + }, + { + "TrackId_8140": 1007 + }, + { + "TrackId_8140": 1008 + }, + { + "TrackId_8140": 1009 + } + ] + }, + "Name": "Music", + "PlaylistId": 1 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8140": 1000 + }, + { + "TrackId_8140": 1001 + }, + { + "TrackId_8140": 1002 + }, + { + "TrackId_8140": 1003 + }, + { + "TrackId_8140": 1004 + }, + { + "TrackId_8140": 1005 + }, + { + "TrackId_8140": 1006 + }, + { + "TrackId_8140": 1007 + }, + { + "TrackId_8140": 1008 + }, + { + "TrackId_8140": 1009 + } + ] + }, + "Name": "Music", + "PlaylistId": 8 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8140": 1020 + }, + { + "TrackId_8140": 1021 + }, + { + "TrackId_8140": 1022 + }, + { + "TrackId_8140": 1023 + }, + { + "TrackId_8140": 1024 + }, + { + "TrackId_8140": 1025 + }, + { + "TrackId_8140": 1026 + }, + { + "TrackId_8140": 1027 + }, + { + "TrackId_8140": 1028 + }, + { + "TrackId_8140": 1029 + } + ] + }, + "Name": "90’s Music", + "PlaylistId": 5 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8140": 1088 + }, + { + "TrackId_8140": 1093 + }, + { + "TrackId_8140": 1099 + }, + { + "TrackId_8140": 1105 + }, + { + "TrackId_8140": 1514 + }, + { + "TrackId_8140": 1518 + }, + { + "TrackId_8140": 1519 + }, + { + "TrackId_8140": 1916 + }, + { + "TrackId_8140": 1921 + }, + { + "TrackId_8140": 1928 + } + ] + }, + "Name": "Brazilian Music", + "PlaylistId": 11 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8140": 1278 + }, + { + "TrackId_8140": 1283 + }, + { + "TrackId_8140": 1335 + }, + { + "TrackId_8140": 1345 + }, + { + "TrackId_8140": 1380 + }, + { + "TrackId_8140": 1392 + }, + { + "TrackId_8140": 152 + }, + { + "TrackId_8140": 160 + }, + { + "TrackId_8140": 1801 + }, + { + "TrackId_8140": 1830 + } + ] + }, + "Name": "Heavy Metal Classic", + "PlaylistId": 17 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "TrackId_8140": 2003 + }, + { + "TrackId_8140": 2004 + }, + { + "TrackId_8140": 2005 + }, + { + "TrackId_8140": 2007 + }, + { + "TrackId_8140": 2010 + }, + { + "TrackId_8140": 2013 + }, + { + "TrackId_8140": 2194 + }, + { + "TrackId_8140": 2195 + }, + { + "TrackId_8140": 2198 + }, + { + "TrackId_8140": 2206 + } + ] + }, + "Name": "Grunge", + "PlaylistId": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bca29d6aa4d6b990/request.json b/test-snapshots/query/bca29d6aa4d6b990/request.json new file mode 100644 index 0000000..33e06fa --- /dev/null +++ b/test-snapshots/query/bca29d6aa4d6b990/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "TrackId_8140": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bca8dff1d37040dd/expected.json b/test-snapshots/query/bca8dff1d37040dd/expected.json new file mode 100644 index 0000000..6ba3630 --- /dev/null +++ b/test-snapshots/query/bca8dff1d37040dd/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "InvoiceId_3251": 121 + }, + { + "InvoiceId_3251": 143 + }, + { + "InvoiceId_3251": 195 + }, + { + "InvoiceId_3251": 316 + }, + { + "InvoiceId_3251": 327 + }, + { + "InvoiceId_3251": 382 + }, + { + "InvoiceId_3251": 98 + }, + { + "InvoiceId_3251": 12 + }, + { + "InvoiceId_3251": 196 + }, + { + "InvoiceId_3251": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bca8dff1d37040dd/request.json b/test-snapshots/query/bca8dff1d37040dd/request.json new file mode 100644 index 0000000..975a9c8 --- /dev/null +++ b/test-snapshots/query/bca8dff1d37040dd/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceId_3251": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bcbf9f237f9988e4/expected.json b/test-snapshots/query/bcbf9f237f9988e4/expected.json new file mode 100644 index 0000000..1a59573 --- /dev/null +++ b/test-snapshots/query/bcbf9f237f9988e4/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_1632": 1, + "Name_8661": "MPEG audio file" + }, + { + "MediaTypeId_1632": 2, + "Name_8661": "Protected AAC audio file" + }, + { + "MediaTypeId_1632": 3, + "Name_8661": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_1632": 4, + "Name_8661": "Purchased AAC audio file" + }, + { + "MediaTypeId_1632": 5, + "Name_8661": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bcbf9f237f9988e4/request.json b/test-snapshots/query/bcbf9f237f9988e4/request.json new file mode 100644 index 0000000..f399034 --- /dev/null +++ b/test-snapshots/query/bcbf9f237f9988e4/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_1632": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_8661": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bcce1779ad262060/expected.json b/test-snapshots/query/bcce1779ad262060/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bcce1779ad262060/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bcce1779ad262060/request.json b/test-snapshots/query/bcce1779ad262060/request.json new file mode 100644 index 0000000..7b81c4d --- /dev/null +++ b/test-snapshots/query/bcce1779ad262060/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bcdec15e0a29dec6/expected.json b/test-snapshots/query/bcdec15e0a29dec6/expected.json new file mode 100644 index 0000000..690cded --- /dev/null +++ b/test-snapshots/query/bcdec15e0a29dec6/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bcdec15e0a29dec6/request.json b/test-snapshots/query/bcdec15e0a29dec6/request.json new file mode 100644 index 0000000..e84de30 --- /dev/null +++ b/test-snapshots/query/bcdec15e0a29dec6/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 49 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bd0816ac275776c0/expected.json b/test-snapshots/query/bd0816ac275776c0/expected.json new file mode 100644 index 0000000..d43c4e9 --- /dev/null +++ b/test-snapshots/query/bd0816ac275776c0/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 107, + "ArtistId": 90, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd0816ac275776c0/request.json b/test-snapshots/query/bd0816ac275776c0/request.json new file mode 100644 index 0000000..b15a15c --- /dev/null +++ b/test-snapshots/query/bd0816ac275776c0/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bd08caa75100fbce/expected.json b/test-snapshots/query/bd08caa75100fbce/expected.json new file mode 100644 index 0000000..8bcc3d4 --- /dev/null +++ b/test-snapshots/query/bd08caa75100fbce/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Name_0340": "AAC audio file" + }, + { + "Name_0340": "Purchased AAC audio file" + }, + { + "Name_0340": "Protected MPEG-4 video file" + }, + { + "Name_0340": "Protected AAC audio file" + }, + { + "Name_0340": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd08caa75100fbce/request.json b/test-snapshots/query/bd08caa75100fbce/request.json new file mode 100644 index 0000000..7ab6eb1 --- /dev/null +++ b/test-snapshots/query/bd08caa75100fbce/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "Name_0340": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bd09fa00af86b13b/expected.json b/test-snapshots/query/bd09fa00af86b13b/expected.json new file mode 100644 index 0000000..d235ad9 --- /dev/null +++ b/test-snapshots/query/bd09fa00af86b13b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd09fa00af86b13b/request.json b/test-snapshots/query/bd09fa00af86b13b/request.json new file mode 100644 index 0000000..e1824a6 --- /dev/null +++ b/test-snapshots/query/bd09fa00af86b13b/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bd15a104a1ed5482/expected.json b/test-snapshots/query/bd15a104a1ed5482/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bd15a104a1ed5482/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd15a104a1ed5482/request.json b/test-snapshots/query/bd15a104a1ed5482/request.json new file mode 100644 index 0000000..29673af --- /dev/null +++ b/test-snapshots/query/bd15a104a1ed5482/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-05-01" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bd226ee4c5daf9f/expected.json b/test-snapshots/query/bd226ee4c5daf9f/expected.json new file mode 100644 index 0000000..d33932f --- /dev/null +++ b/test-snapshots/query/bd226ee4c5daf9f/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_8539": 1, + "Name_3514": "AC/DC" + }, + { + "ArtistId_8539": 2, + "Name_3514": "Accept" + }, + { + "ArtistId_8539": 3, + "Name_3514": "Aerosmith" + }, + { + "ArtistId_8539": 4, + "Name_3514": "Alanis Morissette" + }, + { + "ArtistId_8539": 5, + "Name_3514": "Alice In Chains" + }, + { + "ArtistId_8539": 6, + "Name_3514": "Antônio Carlos Jobim" + }, + { + "ArtistId_8539": 7, + "Name_3514": "Apocalyptica" + }, + { + "ArtistId_8539": 8, + "Name_3514": "Audioslave" + }, + { + "ArtistId_8539": 9, + "Name_3514": "BackBeat" + }, + { + "ArtistId_8539": 10, + "Name_3514": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd226ee4c5daf9f/request.json b/test-snapshots/query/bd226ee4c5daf9f/request.json new file mode 100644 index 0000000..071f302 --- /dev/null +++ b/test-snapshots/query/bd226ee4c5daf9f/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_8539": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_3514": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bd5d37cb51872dc4/expected.json b/test-snapshots/query/bd5d37cb51872dc4/expected.json new file mode 100644 index 0000000..8302aa9 --- /dev/null +++ b/test-snapshots/query/bd5d37cb51872dc4/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd5d37cb51872dc4/request.json b/test-snapshots/query/bd5d37cb51872dc4/request.json new file mode 100644 index 0000000..66f67f2 --- /dev/null +++ b/test-snapshots/query/bd5d37cb51872dc4/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bd6de6c7c31f6b89/expected.json b/test-snapshots/query/bd6de6c7c31f6b89/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bd6de6c7c31f6b89/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd6de6c7c31f6b89/request.json b/test-snapshots/query/bd6de6c7c31f6b89/request.json new file mode 100644 index 0000000..71d46f4 --- /dev/null +++ b/test-snapshots/query/bd6de6c7c31f6b89/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bd9012fc4b58ac6c/expected.json b/test-snapshots/query/bd9012fc4b58ac6c/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/bd9012fc4b58ac6c/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bd9012fc4b58ac6c/request.json b/test-snapshots/query/bd9012fc4b58ac6c/request.json new file mode 100644 index 0000000..ccaefdd --- /dev/null +++ b/test-snapshots/query/bd9012fc4b58ac6c/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1002 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bda37349d575aaad/expected.json b/test-snapshots/query/bda37349d575aaad/expected.json new file mode 100644 index 0000000..d9b2c68 --- /dev/null +++ b/test-snapshots/query/bda37349d575aaad/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 4, + "ArtistId": 1, + "Title": "Let There Be Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bda37349d575aaad/request.json b/test-snapshots/query/bda37349d575aaad/request.json new file mode 100644 index 0000000..4b03c57 --- /dev/null +++ b/test-snapshots/query/bda37349d575aaad/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bdb54ec29e24137f/expected.json b/test-snapshots/query/bdb54ec29e24137f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bdb54ec29e24137f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bdb54ec29e24137f/request.json b/test-snapshots/query/bdb54ec29e24137f/request.json new file mode 100644 index 0000000..823abef --- /dev/null +++ b/test-snapshots/query/bdb54ec29e24137f/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bdc2ef5098077a56/expected.json b/test-snapshots/query/bdc2ef5098077a56/expected.json new file mode 100644 index 0000000..c406386 --- /dev/null +++ b/test-snapshots/query/bdc2ef5098077a56/expected.json @@ -0,0 +1,62 @@ +[ + { + "rows": [ + { + "BirthDate_3951": "1973-07-01", + "HireDate_9311": "2003-10-17", + "PostalCode_6918": "T3B 0C5", + "ReportsTo_9082": 1, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1958-12-08", + "HireDate_9311": "2002-05-01", + "PostalCode_6918": "T2P 2T3", + "ReportsTo_9082": 1, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1973-08-29", + "HireDate_9311": "2002-04-01", + "PostalCode_6918": "T2P 5M5", + "ReportsTo_9082": 2, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1947-09-19", + "HireDate_9311": "2003-05-03", + "PostalCode_6918": "T2P 5G3", + "ReportsTo_9082": 2, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1970-05-29", + "HireDate_9311": "2004-01-02", + "PostalCode_6918": "T1K 5N8", + "ReportsTo_9082": 6, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1968-01-09", + "HireDate_9311": "2004-03-04", + "PostalCode_6918": "T1H 1Y8", + "ReportsTo_9082": 6, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1962-02-18", + "HireDate_9311": "2002-08-14", + "PostalCode_6918": "T5K 2N1", + "ReportsTo_9082": null, + "State_2650": "AB" + }, + { + "BirthDate_3951": "1965-03-03", + "HireDate_9311": "2003-10-17", + "PostalCode_6918": "T3B 1Y7", + "ReportsTo_9082": 2, + "State_2650": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bdc2ef5098077a56/request.json b/test-snapshots/query/bdc2ef5098077a56/request.json new file mode 100644 index 0000000..1576096 --- /dev/null +++ b/test-snapshots/query/bdc2ef5098077a56/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_6918": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "BirthDate_3951": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "ReportsTo_9082": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "HireDate_9311": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "State_2650": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bddcc5ca15909d19/expected.json b/test-snapshots/query/bddcc5ca15909d19/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/bddcc5ca15909d19/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bddcc5ca15909d19/request.json b/test-snapshots/query/bddcc5ca15909d19/request.json new file mode 100644 index 0000000..15ce3f1 --- /dev/null +++ b/test-snapshots/query/bddcc5ca15909d19/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Put The Finger On You" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/be0920f7a3cf8fd0/expected.json b/test-snapshots/query/be0920f7a3cf8fd0/expected.json new file mode 100644 index 0000000..ba67538 --- /dev/null +++ b/test-snapshots/query/be0920f7a3cf8fd0/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_7668": 275, + "Name_2198": "Philip Glass Ensemble" + }, + { + "ArtistId_7668": 274, + "Name_2198": "Nash Ensemble" + }, + { + "ArtistId_7668": 273, + "Name_2198": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "ArtistId_7668": 272, + "Name_2198": "Emerson String Quartet" + }, + { + "ArtistId_7668": 271, + "Name_2198": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "ArtistId_7668": 270, + "Name_2198": "Gerald Moore" + }, + { + "ArtistId_7668": 269, + "Name_2198": "Michele Campanella" + }, + { + "ArtistId_7668": 268, + "Name_2198": "Itzhak Perlman" + }, + { + "ArtistId_7668": 267, + "Name_2198": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "ArtistId_7668": 266, + "Name_2198": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/be0920f7a3cf8fd0/request.json b/test-snapshots/query/be0920f7a3cf8fd0/request.json new file mode 100644 index 0000000..73eaa81 --- /dev/null +++ b/test-snapshots/query/be0920f7a3cf8fd0/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_7668": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_2198": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/be1cf392c9055ff/expected.json b/test-snapshots/query/be1cf392c9055ff/expected.json new file mode 100644 index 0000000..ea1a6f0 --- /dev/null +++ b/test-snapshots/query/be1cf392c9055ff/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_5391": 1, + "TrackId_2372": 3503 + }, + { + "PlaylistId_5391": 12, + "TrackId_2372": 3503 + }, + { + "PlaylistId_5391": 13, + "TrackId_2372": 3503 + }, + { + "PlaylistId_5391": 5, + "TrackId_2372": 3503 + }, + { + "PlaylistId_5391": 8, + "TrackId_2372": 3503 + }, + { + "PlaylistId_5391": 1, + "TrackId_2372": 3502 + }, + { + "PlaylistId_5391": 12, + "TrackId_2372": 3502 + }, + { + "PlaylistId_5391": 13, + "TrackId_2372": 3502 + }, + { + "PlaylistId_5391": 8, + "TrackId_2372": 3502 + }, + { + "PlaylistId_5391": 1, + "TrackId_2372": 3501 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/be1cf392c9055ff/request.json b/test-snapshots/query/be1cf392c9055ff/request.json new file mode 100644 index 0000000..6fb2b4e --- /dev/null +++ b/test-snapshots/query/be1cf392c9055ff/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_5391": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_2372": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/be283dc25304ec64/expected.json b/test-snapshots/query/be283dc25304ec64/expected.json new file mode 100644 index 0000000..3a6976b --- /dev/null +++ b/test-snapshots/query/be283dc25304ec64/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_7164": 1 + }, + { + "ArtistId_7164": 2 + }, + { + "ArtistId_7164": 3 + }, + { + "ArtistId_7164": 4 + }, + { + "ArtistId_7164": 5 + }, + { + "ArtistId_7164": 6 + }, + { + "ArtistId_7164": 7 + }, + { + "ArtistId_7164": 8 + }, + { + "ArtistId_7164": 9 + }, + { + "ArtistId_7164": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/be283dc25304ec64/request.json b/test-snapshots/query/be283dc25304ec64/request.json new file mode 100644 index 0000000..4b22ae0 --- /dev/null +++ b/test-snapshots/query/be283dc25304ec64/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_7164": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/be6148943fa48525/expected.json b/test-snapshots/query/be6148943fa48525/expected.json new file mode 100644 index 0000000..a948226 --- /dev/null +++ b/test-snapshots/query/be6148943fa48525/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "Bytes_0263": 10003747, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Linha Do Equador", + "TrackId_0862": 218 + }, + { + "Bytes_0263": 10003794, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Believer", + "TrackId_0862": 2101 + }, + { + "Bytes_0263": 10005675, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Fire In The Head", + "TrackId_0862": 2712 + }, + { + "Bytes_0263": 10009697, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Killers", + "TrackId_0862": 2140 + }, + { + "Bytes_0263": 10012231, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Camarão que Dorme e Onda Leva", + "TrackId_0862": 3159 + }, + { + "Bytes_0263": 10014683, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Humans Being", + "TrackId_0862": 3078 + }, + { + "Bytes_0263": 10019269, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Tempo Rei", + "TrackId_0862": 1115 + }, + { + "Bytes_0263": 10019861, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Walking on the Moon", + "TrackId_0862": 2653 + }, + { + "Bytes_0263": 10020122, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Sao Lucas 2001", + "TrackId_0862": 373 + }, + { + "Bytes_0263": 10022428, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_9854": 1, + "Name_4560": "Hold On", + "TrackId_0862": 810 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/be6148943fa48525/request.json b/test-snapshots/query/be6148943fa48525/request.json new file mode 100644 index 0000000..bcbf3ae --- /dev/null +++ b/test-snapshots/query/be6148943fa48525/request.json @@ -0,0 +1,59 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "TrackId_0862": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Bytes_0263": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "MediaTypeId_9854": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_4560": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/be991499c3fcaf19/expected.json b/test-snapshots/query/be991499c3fcaf19/expected.json new file mode 100644 index 0000000..dc4198e --- /dev/null +++ b/test-snapshots/query/be991499c3fcaf19/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "ArtistId_8054": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } + }, + { + "ArtistId_8054": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 1, + "Name": "AC/DC" + } + ] + } + }, + { + "ArtistId_8054": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 10, + "Name": "Billy Cobham" + } + ] + } + }, + { + "ArtistId_8054": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 100, + "Name": "Lenny Kravitz" + } + ] + } + }, + { + "ArtistId_8054": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 101, + "Name": "Lulu Santos" + } + ] + } + }, + { + "ArtistId_8054": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 101, + "Name": "Lulu Santos" + } + ] + } + }, + { + "ArtistId_8054": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 102, + "Name": "Marillion" + } + ] + } + }, + { + "ArtistId_8054": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 103, + "Name": "Marisa Monte" + } + ] + } + }, + { + "ArtistId_8054": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 104, + "Name": "Marvin Gaye" + } + ] + } + }, + { + "ArtistId_8054": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId": 105, + "Name": "Men At Work" + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/be991499c3fcaf19/request.json b/test-snapshots/query/be991499c3fcaf19/request.json new file mode 100644 index 0000000..b25bf74 --- /dev/null +++ b/test-snapshots/query/be991499c3fcaf19/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "ArtistId_8054": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "object", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/be998dd905d98e1a/expected.json b/test-snapshots/query/be998dd905d98e1a/expected.json new file mode 100644 index 0000000..f50b728 --- /dev/null +++ b/test-snapshots/query/be998dd905d98e1a/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/be998dd905d98e1a/request.json b/test-snapshots/query/be998dd905d98e1a/request.json new file mode 100644 index 0000000..0a74306 --- /dev/null +++ b/test-snapshots/query/be998dd905d98e1a/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bec2dfd26ed93d9a/expected.json b/test-snapshots/query/bec2dfd26ed93d9a/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/bec2dfd26ed93d9a/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bec2dfd26ed93d9a/request.json b/test-snapshots/query/bec2dfd26ed93d9a/request.json new file mode 100644 index 0000000..240c5b6 --- /dev/null +++ b/test-snapshots/query/bec2dfd26ed93d9a/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 256 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/bef0a08e8f4ee8de/expected.json b/test-snapshots/query/bef0a08e8f4ee8de/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bef0a08e8f4ee8de/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bef0a08e8f4ee8de/request.json b/test-snapshots/query/bef0a08e8f4ee8de/request.json new file mode 100644 index 0000000..880b322 --- /dev/null +++ b/test-snapshots/query/bef0a08e8f4ee8de/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3254 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bf5d35810e0cdc1b/expected.json b/test-snapshots/query/bf5d35810e0cdc1b/expected.json new file mode 100644 index 0000000..d1a8fd1 --- /dev/null +++ b/test-snapshots/query/bf5d35810e0cdc1b/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Company_8735": null, + "Country_9627": "France", + "Email_4666": "wyatt.girard@yahoo.fr", + "LastName_1729": "Girard", + "Phone_7753": "+33 05 56 96 96 96", + "PostalCode_7076": "33000" + }, + { + "Company_8735": null, + "Country_9627": "USA", + "Email_4666": "vstevens@yahoo.com", + "LastName_1729": "Stevens", + "Phone_7753": "+1 (608) 257-0597", + "PostalCode_7076": "53703" + }, + { + "Company_8735": "Apple Inc.", + "Country_9627": "USA", + "Email_4666": "tgoyer@apple.com", + "LastName_1729": "Goyer", + "Phone_7753": "+1 (408) 996-1010", + "PostalCode_7076": "95014" + }, + { + "Company_8735": null, + "Country_9627": "Finland", + "Email_4666": "terhi.hamalainen@apple.fi", + "LastName_1729": "Hämäläinen", + "Phone_7753": "+358 09 870 2000", + "PostalCode_7076": "00530" + }, + { + "Company_8735": null, + "Country_9627": "United Kingdom", + "Email_4666": "steve.murray@yahoo.uk", + "LastName_1729": "Murray", + "Phone_7753": "+44 0131 315 3300", + "PostalCode_7076": "EH4 1HH" + }, + { + "Company_8735": null, + "Country_9627": "Poland", + "Email_4666": "stanisław.wójcik@wp.pl", + "LastName_1729": "Wójcik", + "Phone_7753": "+48 22 828 37 39", + "PostalCode_7076": "00-358" + }, + { + "Company_8735": "Riotur", + "Country_9627": "Brazil", + "Email_4666": "roberto.almeida@riotur.gov.br", + "LastName_1729": "Almeida", + "Phone_7753": "+55 (21) 2271-7000", + "PostalCode_7076": "20040-020" + }, + { + "Company_8735": null, + "Country_9627": "Canada", + "Email_4666": "robbrown@shaw.ca", + "LastName_1729": "Brown", + "Phone_7753": "+1 (416) 363-8888", + "PostalCode_7076": "M6J 1V1" + }, + { + "Company_8735": null, + "Country_9627": "USA", + "Email_4666": "ricunningham@hotmail.com", + "LastName_1729": "Cunningham", + "Phone_7753": "+1 (817) 924-7272", + "PostalCode_7076": "76110" + }, + { + "Company_8735": null, + "Country_9627": "India", + "Email_4666": "puja_srivastava@yahoo.in", + "LastName_1729": "Srivastava", + "Phone_7753": "+91 080 22289999", + "PostalCode_7076": "560001" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bf5d35810e0cdc1b/request.json b/test-snapshots/query/bf5d35810e0cdc1b/request.json new file mode 100644 index 0000000..f6e2d40 --- /dev/null +++ b/test-snapshots/query/bf5d35810e0cdc1b/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "PostalCode_7076": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Phone_7753": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Company_8735": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_9627": { + "type": "column", + "column": "Country", + "fields": null + }, + "LastName_1729": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Email_4666": { + "type": "column", + "column": "Email", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bfa7341395019f70/expected.json b/test-snapshots/query/bfa7341395019f70/expected.json new file mode 100644 index 0000000..948a776 --- /dev/null +++ b/test-snapshots/query/bfa7341395019f70/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bfa7341395019f70/request.json b/test-snapshots/query/bfa7341395019f70/request.json new file mode 100644 index 0000000..ad4740a --- /dev/null +++ b/test-snapshots/query/bfa7341395019f70/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/bfab63f00e0a6c98/expected.json b/test-snapshots/query/bfab63f00e0a6c98/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/bfab63f00e0a6c98/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/bfab63f00e0a6c98/request.json b/test-snapshots/query/bfab63f00e0a6c98/request.json new file mode 100644 index 0000000..d58a6e8 --- /dev/null +++ b/test-snapshots/query/bfab63f00e0a6c98/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 264 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c00090542a404de1/expected.json b/test-snapshots/query/c00090542a404de1/expected.json new file mode 100644 index 0000000..cd6a0e8 --- /dev/null +++ b/test-snapshots/query/c00090542a404de1/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 15, + "Total_3466": 1.98 + }, + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 210, + "Total_3466": 1.98 + }, + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 233, + "Total_3466": 3.96 + }, + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 255, + "Total_3466": 5.94 + }, + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 26, + "Total_3466": 13.86 + }, + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 307, + "Total_3466": 1.99 + }, + { + "BillingAddress_5115": "1 Infinite Loop", + "BillingCity_0748": "Cupertino", + "BillingPostalCode_9522": "95014", + "BillingState_7842": "CA", + "InvoiceId_4293": 81, + "Total_3466": 8.91 + }, + { + "BillingAddress_5115": "1 Microsoft Way", + "BillingCity_0748": "Redmond", + "BillingPostalCode_9522": "98052-8300", + "BillingState_7842": "WA", + "InvoiceId_4293": 111, + "Total_3466": 0.99 + }, + { + "BillingAddress_5115": "1 Microsoft Way", + "BillingCity_0748": "Redmond", + "BillingPostalCode_9522": "98052-8300", + "BillingState_7842": "WA", + "InvoiceId_4293": 14, + "Total_3466": 1.98 + }, + { + "BillingAddress_5115": "1 Microsoft Way", + "BillingCity_0748": "Redmond", + "BillingPostalCode_9522": "98052-8300", + "BillingState_7842": "WA", + "InvoiceId_4293": 232, + "Total_3466": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c00090542a404de1/request.json b/test-snapshots/query/c00090542a404de1/request.json new file mode 100644 index 0000000..383bc7a --- /dev/null +++ b/test-snapshots/query/c00090542a404de1/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_5115": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_0748": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "Total_3466": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingPostalCode_9522": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_7842": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "InvoiceId_4293": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c005df43cc3c90ae/expected.json b/test-snapshots/query/c005df43cc3c90ae/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c005df43cc3c90ae/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c005df43cc3c90ae/request.json b/test-snapshots/query/c005df43cc3c90ae/request.json new file mode 100644 index 0000000..cb2ddf8 --- /dev/null +++ b/test-snapshots/query/c005df43cc3c90ae/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c008062ae84c29a0/expected.json b/test-snapshots/query/c008062ae84c29a0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c008062ae84c29a0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c008062ae84c29a0/request.json b/test-snapshots/query/c008062ae84c29a0/request.json new file mode 100644 index 0000000..fbe655c --- /dev/null +++ b/test-snapshots/query/c008062ae84c29a0/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c0559dd91b1b03a0/expected.json b/test-snapshots/query/c0559dd91b1b03a0/expected.json new file mode 100644 index 0000000..7d9f7cf --- /dev/null +++ b/test-snapshots/query/c0559dd91b1b03a0/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c0559dd91b1b03a0/request.json b/test-snapshots/query/c0559dd91b1b03a0/request.json new file mode 100644 index 0000000..83fd813 --- /dev/null +++ b/test-snapshots/query/c0559dd91b1b03a0/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c06aae73e069418a/expected.json b/test-snapshots/query/c06aae73e069418a/expected.json new file mode 100644 index 0000000..da05f30 --- /dev/null +++ b/test-snapshots/query/c06aae73e069418a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Classical 101 - Deep Cuts", + "PlaylistId": 13 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c06aae73e069418a/request.json b/test-snapshots/query/c06aae73e069418a/request.json new file mode 100644 index 0000000..16f729b --- /dev/null +++ b/test-snapshots/query/c06aae73e069418a/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Deep Cuts" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c0942d4882972dfd/expected.json b/test-snapshots/query/c0942d4882972dfd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c0942d4882972dfd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c0942d4882972dfd/request.json b/test-snapshots/query/c0942d4882972dfd/request.json new file mode 100644 index 0000000..651ab66 --- /dev/null +++ b/test-snapshots/query/c0942d4882972dfd/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c094dc550c76ec4c/expected.json b/test-snapshots/query/c094dc550c76ec4c/expected.json new file mode 100644 index 0000000..44a4977 --- /dev/null +++ b/test-snapshots/query/c094dc550c76ec4c/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "AlbumId_3774": 347, + "Bytes_4241": 3305164, + "Composer_3841": "Philip Glass", + "GenreId_5580": 10, + "Milliseconds_9179": 206005, + "Name_0823": "Koyaanisqatsi" + }, + { + "AlbumId_3774": 346, + "Bytes_4241": 3665114, + "Composer_3841": "Wolfgang Amadeus Mozart", + "GenreId_5580": 24, + "Milliseconds_9179": 221331, + "Name_0823": "Quintet for Horn, Violin, 2 Violas, and Cello in E Flat Major, K. 407/386c: III. Allegro" + }, + { + "AlbumId_3774": 345, + "Bytes_4241": 1189062, + "Composer_3841": "Claudio Monteverdi", + "GenreId_5580": 24, + "Milliseconds_9179": 66639, + "Name_0823": "L'orfeo, Act 3, Sinfonia (Orchestra)" + }, + { + "AlbumId_3774": 344, + "Bytes_4241": 2283131, + "Composer_3841": "Franz Schubert", + "GenreId_5580": 24, + "Milliseconds_9179": 139200, + "Name_0823": "String Quartet No. 12 in C Minor, D. 703 \"Quartettsatz\": II. Andante - Allegro assai" + }, + { + "AlbumId_3774": 343, + "Bytes_4241": 4718950, + "Composer_3841": null, + "GenreId_5580": 24, + "Milliseconds_9179": 286741, + "Name_0823": "Pini Di Roma (Pinien Von Rom) I Pini Della Via Appia" + }, + { + "AlbumId_3774": 342, + "Bytes_4241": 16454937, + "Composer_3841": "Pietro Antonio Locatelli", + "GenreId_5580": 24, + "Milliseconds_9179": 493573, + "Name_0823": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro" + }, + { + "AlbumId_3774": 341, + "Bytes_4241": 4307907, + "Composer_3841": null, + "GenreId_5580": 24, + "Milliseconds_9179": 261849, + "Name_0823": "Erlkonig, D.328" + }, + { + "AlbumId_3774": 340, + "Bytes_4241": 2229617, + "Composer_3841": null, + "GenreId_5580": 24, + "Milliseconds_9179": 51780, + "Name_0823": "Étude 1, In C Major - Preludio (Presto) - Liszt" + }, + { + "AlbumId_3774": 339, + "Bytes_4241": 4371533, + "Composer_3841": "Niccolò Paganini", + "GenreId_5580": 24, + "Milliseconds_9179": 265541, + "Name_0823": "24 Caprices, Op. 1, No. 24, for Solo Violin, in A Minor" + }, + { + "AlbumId_3774": 338, + "Bytes_4241": 4834785, + "Composer_3841": "Carl Nielsen", + "GenreId_5580": 24, + "Milliseconds_9179": 286998, + "Name_0823": "Symphony No. 2, Op. 16 - \"The Four Temperaments\": II. Allegro Comodo e Flemmatico" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c094dc550c76ec4c/request.json b/test-snapshots/query/c094dc550c76ec4c/request.json new file mode 100644 index 0000000..d58bd5d --- /dev/null +++ b/test-snapshots/query/c094dc550c76ec4c/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_3774": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_4241": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_3841": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_5580": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_0823": { + "type": "column", + "column": "Name", + "fields": null + }, + "Milliseconds_9179": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c0959a91d47bcc4e/expected.json b/test-snapshots/query/c0959a91d47bcc4e/expected.json new file mode 100644 index 0000000..2a5ce9b --- /dev/null +++ b/test-snapshots/query/c0959a91d47bcc4e/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 4448025, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 274644, + "Name": "Give Peace a Chance", + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c0959a91d47bcc4e/request.json b/test-snapshots/query/c0959a91d47bcc4e/request.json new file mode 100644 index 0000000..37e25be --- /dev/null +++ b/test-snapshots/query/c0959a91d47bcc4e/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c0f886d1054bb27c/expected.json b/test-snapshots/query/c0f886d1054bb27c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c0f886d1054bb27c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c0f886d1054bb27c/request.json b/test-snapshots/query/c0f886d1054bb27c/request.json new file mode 100644 index 0000000..13804e7 --- /dev/null +++ b/test-snapshots/query/c0f886d1054bb27c/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c14a206a65390739/expected.json b/test-snapshots/query/c14a206a65390739/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c14a206a65390739/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c14a206a65390739/request.json b/test-snapshots/query/c14a206a65390739/request.json new file mode 100644 index 0000000..49bf4c0 --- /dev/null +++ b/test-snapshots/query/c14a206a65390739/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8611245 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c150e80e6e6d67ab/expected.json b/test-snapshots/query/c150e80e6e6d67ab/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c150e80e6e6d67ab/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c150e80e6e6d67ab/request.json b/test-snapshots/query/c150e80e6e6d67ab/request.json new file mode 100644 index 0000000..889179c --- /dev/null +++ b/test-snapshots/query/c150e80e6e6d67ab/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c17dec827c390fc/expected.json b/test-snapshots/query/c17dec827c390fc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c17dec827c390fc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c17dec827c390fc/request.json b/test-snapshots/query/c17dec827c390fc/request.json new file mode 100644 index 0000000..10eca89 --- /dev/null +++ b/test-snapshots/query/c17dec827c390fc/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c18b7542aa9cc915/expected.json b/test-snapshots/query/c18b7542aa9cc915/expected.json new file mode 100644 index 0000000..09ef815 --- /dev/null +++ b/test-snapshots/query/c18b7542aa9cc915/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c18b7542aa9cc915/request.json b/test-snapshots/query/c18b7542aa9cc915/request.json new file mode 100644 index 0000000..5bd3bab --- /dev/null +++ b/test-snapshots/query/c18b7542aa9cc915/request.json @@ -0,0 +1,169 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "State_0540": { + "type": "column", + "column": "State", + "fields": null + }, + "BirthDate_5628": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_9020": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_2876": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_7475": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_3258": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_9969": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_3192": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_9771": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_4222": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_4350": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_7712": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Title_0285": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c1d977a26a8325dc/expected.json b/test-snapshots/query/c1d977a26a8325dc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c1d977a26a8325dc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c1d977a26a8325dc/request.json b/test-snapshots/query/c1d977a26a8325dc/request.json new file mode 100644 index 0000000..ad8bf68 --- /dev/null +++ b/test-snapshots/query/c1d977a26a8325dc/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c20edaacc906255f/expected.json b/test-snapshots/query/c20edaacc906255f/expected.json new file mode 100644 index 0000000..00d6706 --- /dev/null +++ b/test-snapshots/query/c20edaacc906255f/expected.json @@ -0,0 +1,105 @@ +[ + { + "rows": [ + { + "AlbumId": 106, + "Bytes": 3306324, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 206367, + "Name": "Sun And Steel", + "TrackId": 1342, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3543040, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 221309, + "Name": "Quest For Fire", + "TrackId": 1341, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 3686400, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 230269, + "Name": "Flight Of The Icarus", + "TrackId": 1337, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4024320, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 251454, + "Name": "The Trooper", + "TrackId": 1339, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 4710400, + "Composer": "David Murray/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 294347, + "Name": "Still Life", + "TrackId": 1340, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5212160, + "Composer": "Adrian Smith/Bruce Dickinson/Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 325694, + "Name": "Die With Your Boots On", + "TrackId": 1338, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 5914624, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 369554, + "Name": "Where Eagles Dare", + "TrackId": 1335, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 6539264, + "Composer": "Bruce Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 408607, + "Name": "Revelations", + "TrackId": 1336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 106, + "Bytes": 7129264, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 445283, + "Name": "To Tame A Land", + "TrackId": 1343, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c20edaacc906255f/request.json b/test-snapshots/query/c20edaacc906255f/request.json new file mode 100644 index 0000000..efa5003 --- /dev/null +++ b/test-snapshots/query/c20edaacc906255f/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c22308bc539986ad/expected.json b/test-snapshots/query/c22308bc539986ad/expected.json new file mode 100644 index 0000000..31dba53 --- /dev/null +++ b/test-snapshots/query/c22308bc539986ad/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "MediaTypeId_2382": 1 + }, + { + "MediaTypeId_2382": 2 + }, + { + "MediaTypeId_2382": 3 + }, + { + "MediaTypeId_2382": 4 + }, + { + "MediaTypeId_2382": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c22308bc539986ad/request.json b/test-snapshots/query/c22308bc539986ad/request.json new file mode 100644 index 0000000..2cd5aba --- /dev/null +++ b/test-snapshots/query/c22308bc539986ad/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_2382": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c2349f11f2b776e6/expected.json b/test-snapshots/query/c2349f11f2b776e6/expected.json new file mode 100644 index 0000000..06ae44e --- /dev/null +++ b/test-snapshots/query/c2349f11f2b776e6/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_7534": 43 + }, + { + "ArtistId_7534": 230 + }, + { + "ArtistId_7534": 202 + }, + { + "ArtistId_7534": 1 + }, + { + "ArtistId_7534": 214 + }, + { + "ArtistId_7534": 215 + }, + { + "ArtistId_7534": 222 + }, + { + "ArtistId_7534": 257 + }, + { + "ArtistId_7534": 239 + }, + { + "ArtistId_7534": 2 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2349f11f2b776e6/request.json b/test-snapshots/query/c2349f11f2b776e6/request.json new file mode 100644 index 0000000..e2a4c87 --- /dev/null +++ b/test-snapshots/query/c2349f11f2b776e6/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_7534": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c275f81a1cbbe5f9/expected.json b/test-snapshots/query/c275f81a1cbbe5f9/expected.json new file mode 100644 index 0000000..4d46951 --- /dev/null +++ b/test-snapshots/query/c275f81a1cbbe5f9/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_7341": "Philip Glass Ensemble" + }, + { + "Name_7341": "Nash Ensemble" + }, + { + "Name_7341": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "Name_7341": "Emerson String Quartet" + }, + { + "Name_7341": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "Name_7341": "Gerald Moore" + }, + { + "Name_7341": "Michele Campanella" + }, + { + "Name_7341": "Itzhak Perlman" + }, + { + "Name_7341": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "Name_7341": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c275f81a1cbbe5f9/request.json b/test-snapshots/query/c275f81a1cbbe5f9/request.json new file mode 100644 index 0000000..a9a1c35 --- /dev/null +++ b/test-snapshots/query/c275f81a1cbbe5f9/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_7341": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c294572cb2a3c4a3/expected.json b/test-snapshots/query/c294572cb2a3c4a3/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/c294572cb2a3c4a3/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c294572cb2a3c4a3/request.json b/test-snapshots/query/c294572cb2a3c4a3/request.json new file mode 100644 index 0000000..b729a9b --- /dev/null +++ b/test-snapshots/query/c294572cb2a3c4a3/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-01-24" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2954a0a0c104383/expected.json b/test-snapshots/query/c2954a0a0c104383/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c2954a0a0c104383/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2954a0a0c104383/request.json b/test-snapshots/query/c2954a0a0c104383/request.json new file mode 100644 index 0000000..f77f8e9 --- /dev/null +++ b/test-snapshots/query/c2954a0a0c104383/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c29b0ddc6dd59f87/expected.json b/test-snapshots/query/c29b0ddc6dd59f87/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c29b0ddc6dd59f87/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c29b0ddc6dd59f87/request.json b/test-snapshots/query/c29b0ddc6dd59f87/request.json new file mode 100644 index 0000000..8f7b6d5 --- /dev/null +++ b/test-snapshots/query/c29b0ddc6dd59f87/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "FL" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2aa3bbe21b43266/expected.json b/test-snapshots/query/c2aa3bbe21b43266/expected.json new file mode 100644 index 0000000..2770e08 --- /dev/null +++ b/test-snapshots/query/c2aa3bbe21b43266/expected.json @@ -0,0 +1,296 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "jane@chinookcorp.com", + "FirstName_4344": "Jane", + "HireDate_0453": "2002-04-01", + "LastName_9832": "Peacock", + "Phone_2395": "+1 (403) 262-3443", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "steve@chinookcorp.com", + "FirstName_4344": "Steve", + "HireDate_0453": "2003-10-17", + "LastName_9832": "Johnson", + "Phone_2395": "1 (780) 836-9987", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "margaret@chinookcorp.com", + "FirstName_4344": "Margaret", + "HireDate_0453": "2003-05-03", + "LastName_9832": "Park", + "Phone_2395": "+1 (403) 263-4423", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "steve@chinookcorp.com", + "FirstName_4344": "Steve", + "HireDate_0453": "2003-10-17", + "LastName_9832": "Johnson", + "Phone_2395": "1 (780) 836-9987", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "steve@chinookcorp.com", + "FirstName_4344": "Steve", + "HireDate_0453": "2003-10-17", + "LastName_9832": "Johnson", + "Phone_2395": "1 (780) 836-9987", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "jane@chinookcorp.com", + "FirstName_4344": "Jane", + "HireDate_0453": "2002-04-01", + "LastName_9832": "Peacock", + "Phone_2395": "+1 (403) 262-3443", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "jane@chinookcorp.com", + "FirstName_4344": "Jane", + "HireDate_0453": "2002-04-01", + "LastName_9832": "Peacock", + "Phone_2395": "+1 (403) 262-3443", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "margaret@chinookcorp.com", + "FirstName_4344": "Margaret", + "HireDate_0453": "2003-05-03", + "LastName_9832": "Park", + "Phone_2395": "+1 (403) 263-4423", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "jane@chinookcorp.com", + "FirstName_4344": "Jane", + "HireDate_0453": "2002-04-01", + "LastName_9832": "Peacock", + "Phone_2395": "+1 (403) 262-3443", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "City_4840": "Calgary", + "Country_5572": "Canada", + "Email_6893": "margaret@chinookcorp.com", + "FirstName_4344": "Margaret", + "HireDate_0453": "2003-05-03", + "LastName_9832": "Park", + "Phone_2395": "+1 (403) 263-4423", + "Title_2477": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2aa3bbe21b43266/request.json b/test-snapshots/query/c2aa3bbe21b43266/request.json new file mode 100644 index 0000000..169f6ab --- /dev/null +++ b/test-snapshots/query/c2aa3bbe21b43266/request.json @@ -0,0 +1,134 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Title_2477": { + "type": "column", + "column": "Title", + "fields": null + }, + "HireDate_0453": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "City_4840": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_5572": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_6893": { + "type": "column", + "column": "Email", + "fields": null + }, + "Phone_2395": { + "type": "column", + "column": "Phone", + "fields": null + }, + "LastName_9832": { + "type": "column", + "column": "LastName", + "fields": null + }, + "FirstName_4344": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2ac2b5b49a6c345/expected.json b/test-snapshots/query/c2ac2b5b49a6c345/expected.json new file mode 100644 index 0000000..b4678b9 --- /dev/null +++ b/test-snapshots/query/c2ac2b5b49a6c345/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "Country_4270": "Canada", + "Email_7629": "andrew@chinookcorp.com", + "EmployeeId_2314": 1, + "HireDate_9146": "2002-08-14", + "LastName_3982": "Adams", + "PostalCode_6658": "T5K 2N1", + "State_0718": "AB", + "Title_8655": "General Manager" + }, + { + "Country_4270": "Canada", + "Email_7629": "jane@chinookcorp.com", + "EmployeeId_2314": 3, + "HireDate_9146": "2002-04-01", + "LastName_3982": "Peacock", + "PostalCode_6658": "T2P 5M5", + "State_0718": "AB", + "Title_8655": "Sales Support Agent" + }, + { + "Country_4270": "Canada", + "Email_7629": "laura@chinookcorp.com", + "EmployeeId_2314": 8, + "HireDate_9146": "2004-03-04", + "LastName_3982": "Callahan", + "PostalCode_6658": "T1H 1Y8", + "State_0718": "AB", + "Title_8655": "IT Staff" + }, + { + "Country_4270": "Canada", + "Email_7629": "margaret@chinookcorp.com", + "EmployeeId_2314": 4, + "HireDate_9146": "2003-05-03", + "LastName_3982": "Park", + "PostalCode_6658": "T2P 5G3", + "State_0718": "AB", + "Title_8655": "Sales Support Agent" + }, + { + "Country_4270": "Canada", + "Email_7629": "michael@chinookcorp.com", + "EmployeeId_2314": 6, + "HireDate_9146": "2003-10-17", + "LastName_3982": "Mitchell", + "PostalCode_6658": "T3B 0C5", + "State_0718": "AB", + "Title_8655": "IT Manager" + }, + { + "Country_4270": "Canada", + "Email_7629": "nancy@chinookcorp.com", + "EmployeeId_2314": 2, + "HireDate_9146": "2002-05-01", + "LastName_3982": "Edwards", + "PostalCode_6658": "T2P 2T3", + "State_0718": "AB", + "Title_8655": "Sales Manager" + }, + { + "Country_4270": "Canada", + "Email_7629": "robert@chinookcorp.com", + "EmployeeId_2314": 7, + "HireDate_9146": "2004-01-02", + "LastName_3982": "King", + "PostalCode_6658": "T1K 5N8", + "State_0718": "AB", + "Title_8655": "IT Staff" + }, + { + "Country_4270": "Canada", + "Email_7629": "steve@chinookcorp.com", + "EmployeeId_2314": 5, + "HireDate_9146": "2003-10-17", + "LastName_3982": "Johnson", + "PostalCode_6658": "T3B 1Y7", + "State_0718": "AB", + "Title_8655": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2ac2b5b49a6c345/request.json b/test-snapshots/query/c2ac2b5b49a6c345/request.json new file mode 100644 index 0000000..d390b39 --- /dev/null +++ b/test-snapshots/query/c2ac2b5b49a6c345/request.json @@ -0,0 +1,70 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_6658": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "LastName_3982": { + "type": "column", + "column": "LastName", + "fields": null + }, + "State_0718": { + "type": "column", + "column": "State", + "fields": null + }, + "Country_4270": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_7629": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_2314": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "HireDate_9146": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Title_8655": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c2ae9117b3477097/expected.json b/test-snapshots/query/c2ae9117b3477097/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c2ae9117b3477097/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2ae9117b3477097/request.json b/test-snapshots/query/c2ae9117b3477097/request.json new file mode 100644 index 0000000..b2e80af --- /dev/null +++ b/test-snapshots/query/c2ae9117b3477097/request.json @@ -0,0 +1,101 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2b1e8ba56a1aa93/expected.json b/test-snapshots/query/c2b1e8ba56a1aa93/expected.json new file mode 100644 index 0000000..c34373b --- /dev/null +++ b/test-snapshots/query/c2b1e8ba56a1aa93/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "ArtistId": 90, + "Title": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2b1e8ba56a1aa93/request.json b/test-snapshots/query/c2b1e8ba56a1aa93/request.json new file mode 100644 index 0000000..a10738c --- /dev/null +++ b/test-snapshots/query/c2b1e8ba56a1aa93/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c2b316ba2ff02ac7/expected.json b/test-snapshots/query/c2b316ba2ff02ac7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c2b316ba2ff02ac7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2b316ba2ff02ac7/request.json b/test-snapshots/query/c2b316ba2ff02ac7/request.json new file mode 100644 index 0000000..e67ede3 --- /dev/null +++ b/test-snapshots/query/c2b316ba2ff02ac7/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2b76cbf425a9b79/expected.json b/test-snapshots/query/c2b76cbf425a9b79/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c2b76cbf425a9b79/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2b76cbf425a9b79/request.json b/test-snapshots/query/c2b76cbf425a9b79/request.json new file mode 100644 index 0000000..fd4d4a9 --- /dev/null +++ b/test-snapshots/query/c2b76cbf425a9b79/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "nancy@chinookcorp.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2d26017f1619f8c/expected.json b/test-snapshots/query/c2d26017f1619f8c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c2d26017f1619f8c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2d26017f1619f8c/request.json b/test-snapshots/query/c2d26017f1619f8c/request.json new file mode 100644 index 0000000..54fafad --- /dev/null +++ b/test-snapshots/query/c2d26017f1619f8c/request.json @@ -0,0 +1,133 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "patrick.gray@aol.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (407) 999-7788" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 41 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c2ef82a3c9626d42/expected.json b/test-snapshots/query/c2ef82a3c9626d42/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/c2ef82a3c9626d42/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2ef82a3c9626d42/request.json b/test-snapshots/query/c2ef82a3c9626d42/request.json new file mode 100644 index 0000000..133113c --- /dev/null +++ b/test-snapshots/query/c2ef82a3c9626d42/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c2f53c1b2b0b2788/expected.json b/test-snapshots/query/c2f53c1b2b0b2788/expected.json new file mode 100644 index 0000000..452a356 --- /dev/null +++ b/test-snapshots/query/c2f53c1b2b0b2788/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 104, + "Bytes": 10577743, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 440555, + "Name": "Heaven Can Wait", + "TrackId": 1317, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 10751410, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 447791, + "Name": "Hallowed Be Thy Name", + "TrackId": 1321, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11380851, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 474017, + "Name": "Running Free", + "TrackId": 1324, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 11874875, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 494602, + "Name": "Iron Maiden", + "TrackId": 1320, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5588560, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 232672, + "Name": "The Trooper", + "TrackId": 1322, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 5665052, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 235859, + "Name": "Run To The Hills", + "TrackId": 1318, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 6302648, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 262426, + "Name": "The Clairvoyant", + "TrackId": 1316, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 7648679, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 318511, + "Name": "Sanctuary", + "TrackId": 1323, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 8122030, + "Composer": "Adrian Smith/Bruce Dickinson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 338233, + "Name": "2 Minutes To Midnight", + "TrackId": 1319, + "UnitPrice": 0.99 + }, + { + "AlbumId": 104, + "Bytes": 9045532, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 376711, + "Name": "Bring Your Daughter... To The Slaughter...", + "TrackId": 1315, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c2f53c1b2b0b2788/request.json b/test-snapshots/query/c2f53c1b2b0b2788/request.json new file mode 100644 index 0000000..b037062 --- /dev/null +++ b/test-snapshots/query/c2f53c1b2b0b2788/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c32fe9cf98528d3/expected.json b/test-snapshots/query/c32fe9cf98528d3/expected.json new file mode 100644 index 0000000..a3b5357 --- /dev/null +++ b/test-snapshots/query/c32fe9cf98528d3/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_8640": 18 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + }, + { + "PlaylistId_8640": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c32fe9cf98528d3/request.json b/test-snapshots/query/c32fe9cf98528d3/request.json new file mode 100644 index 0000000..dee6a72 --- /dev/null +++ b/test-snapshots/query/c32fe9cf98528d3/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8640": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c342d253736f9efe/expected.json b/test-snapshots/query/c342d253736f9efe/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/c342d253736f9efe/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c342d253736f9efe/request.json b/test-snapshots/query/c342d253736f9efe/request.json new file mode 100644 index 0000000..1e9a8f7 --- /dev/null +++ b/test-snapshots/query/c342d253736f9efe/request.json @@ -0,0 +1,91 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c3432db5cc115400/expected.json b/test-snapshots/query/c3432db5cc115400/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c3432db5cc115400/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c3432db5cc115400/request.json b/test-snapshots/query/c3432db5cc115400/request.json new file mode 100644 index 0000000..d603c0f --- /dev/null +++ b/test-snapshots/query/c3432db5cc115400/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c364e4a36aaf807d/expected.json b/test-snapshots/query/c364e4a36aaf807d/expected.json new file mode 100644 index 0000000..1d3ebf9 --- /dev/null +++ b/test-snapshots/query/c364e4a36aaf807d/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c364e4a36aaf807d/request.json b/test-snapshots/query/c364e4a36aaf807d/request.json new file mode 100644 index 0000000..f9963db --- /dev/null +++ b/test-snapshots/query/c364e4a36aaf807d/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "WA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c394ba3c2e102f51/expected.json b/test-snapshots/query/c394ba3c2e102f51/expected.json new file mode 100644 index 0000000..5c5bf64 --- /dev/null +++ b/test-snapshots/query/c394ba3c2e102f51/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_4272": 1, + "Name_3879": "AC/DC" + }, + { + "ArtistId_4272": 2, + "Name_3879": "Accept" + }, + { + "ArtistId_4272": 3, + "Name_3879": "Aerosmith" + }, + { + "ArtistId_4272": 4, + "Name_3879": "Alanis Morissette" + }, + { + "ArtistId_4272": 5, + "Name_3879": "Alice In Chains" + }, + { + "ArtistId_4272": 6, + "Name_3879": "Antônio Carlos Jobim" + }, + { + "ArtistId_4272": 7, + "Name_3879": "Apocalyptica" + }, + { + "ArtistId_4272": 8, + "Name_3879": "Audioslave" + }, + { + "ArtistId_4272": 9, + "Name_3879": "BackBeat" + }, + { + "ArtistId_4272": 10, + "Name_3879": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c394ba3c2e102f51/request.json b/test-snapshots/query/c394ba3c2e102f51/request.json new file mode 100644 index 0000000..76bb30d --- /dev/null +++ b/test-snapshots/query/c394ba3c2e102f51/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_4272": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_3879": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c398f0251ea8ae3b/expected.json b/test-snapshots/query/c398f0251ea8ae3b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c398f0251ea8ae3b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c398f0251ea8ae3b/request.json b/test-snapshots/query/c398f0251ea8ae3b/request.json new file mode 100644 index 0000000..c4fb00e --- /dev/null +++ b/test-snapshots/query/c398f0251ea8ae3b/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c3aac13e2939b21/expected.json b/test-snapshots/query/c3aac13e2939b21/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c3aac13e2939b21/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c3aac13e2939b21/request.json b/test-snapshots/query/c3aac13e2939b21/request.json new file mode 100644 index 0000000..4d789e6 --- /dev/null +++ b/test-snapshots/query/c3aac13e2939b21/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c3ae7ae10366266b/expected.json b/test-snapshots/query/c3ae7ae10366266b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c3ae7ae10366266b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c3ae7ae10366266b/request.json b/test-snapshots/query/c3ae7ae10366266b/request.json new file mode 100644 index 0000000..119c980 --- /dev/null +++ b/test-snapshots/query/c3ae7ae10366266b/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c3bec157024ec7fb/expected.json b/test-snapshots/query/c3bec157024ec7fb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c3bec157024ec7fb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c3bec157024ec7fb/request.json b/test-snapshots/query/c3bec157024ec7fb/request.json new file mode 100644 index 0000000..529640d --- /dev/null +++ b/test-snapshots/query/c3bec157024ec7fb/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c3d61eece1196afc/expected.json b/test-snapshots/query/c3d61eece1196afc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c3d61eece1196afc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c3d61eece1196afc/request.json b/test-snapshots/query/c3d61eece1196afc/request.json new file mode 100644 index 0000000..09c3a5a --- /dev/null +++ b/test-snapshots/query/c3d61eece1196afc/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c410cf6214606101/expected.json b/test-snapshots/query/c410cf6214606101/expected.json new file mode 100644 index 0000000..68141e5 --- /dev/null +++ b/test-snapshots/query/c410cf6214606101/expected.json @@ -0,0 +1,960 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 1, + "Bytes_0565": 11170334, + "GenreId_7101": 1, + "Milliseconds_7232": 343719, + "Name_6238": "For Those About To Rock (We Salute You)", + "TrackId_9494": 1, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 6566314, + "GenreId_7101": 1, + "Milliseconds_7232": 199836, + "Name_6238": "C.O.D.", + "TrackId_9494": 11, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 6599424, + "GenreId_7101": 1, + "Milliseconds_7232": 203102, + "Name_6238": "Snowballed", + "TrackId_9494": 9, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 6706347, + "GenreId_7101": 1, + "Milliseconds_7232": 205688, + "Name_6238": "Night Of The Long Knives", + "TrackId_9494": 13, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 6713451, + "GenreId_7101": 1, + "Milliseconds_7232": 205662, + "Name_6238": "Put The Finger On You", + "TrackId_9494": 6, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 6852860, + "GenreId_7101": 1, + "Milliseconds_7232": 210834, + "Name_6238": "Inject The Venom", + "TrackId_9494": 8, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 7636561, + "GenreId_7101": 1, + "Milliseconds_7232": 233926, + "Name_6238": "Let's Get It Up", + "TrackId_9494": 7, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 8596840, + "GenreId_7101": 1, + "Milliseconds_7232": 263288, + "Name_6238": "Breaking The Rules", + "TrackId_9494": 12, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 8611245, + "GenreId_7101": 1, + "Milliseconds_7232": 263497, + "Name_6238": "Evil Walks", + "TrackId_9494": 10, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 1, + "Bytes_0565": 8817038, + "GenreId_7101": 1, + "Milliseconds_7232": 270863, + "Name_6238": "Spellbound", + "TrackId_9494": 14, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 10, + "Bytes_0565": 4948095, + "GenreId_7101": 1, + "Milliseconds_7232": 206053, + "Name_6238": "Exploder", + "TrackId_9494": 93, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 4961887, + "GenreId_7101": 1, + "Milliseconds_7232": 206628, + "Name_6238": "Hypnotize", + "TrackId_9494": 94, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 5339931, + "GenreId_7101": 1, + "Milliseconds_7232": 222380, + "Name_6238": "Cochise", + "TrackId_9494": 85, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 5988186, + "GenreId_7101": 1, + "Milliseconds_7232": 249391, + "Name_6238": "What You Are", + "TrackId_9494": 88, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 6321091, + "GenreId_7101": 1, + "Milliseconds_7232": 263262, + "Name_6238": "Set It Off", + "TrackId_9494": 90, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 6672176, + "GenreId_7101": 1, + "Milliseconds_7232": 277890, + "Name_6238": "Show Me How to Live", + "TrackId_9494": 86, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 6709793, + "GenreId_7101": 1, + "Milliseconds_7232": 279457, + "Name_6238": "Gasoline", + "TrackId_9494": 87, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 7059624, + "GenreId_7101": 1, + "Milliseconds_7232": 294034, + "Name_6238": "Like a Stone", + "TrackId_9494": 89, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 7193162, + "GenreId_7101": 1, + "Milliseconds_7232": 299598, + "Name_6238": "Getaway Car", + "TrackId_9494": 97, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 10, + "Bytes_0565": 7289084, + "GenreId_7101": 1, + "Milliseconds_7232": 303595, + "Name_6238": "Light My Way", + "TrackId_9494": 96, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 100, + "Bytes_0565": 10276872, + "GenreId_7101": 6, + "Milliseconds_7232": 428016, + "Name_6238": "05 - Phantom of the Opera", + "TrackId_9494": 1272, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 4712576, + "GenreId_7101": 6, + "Milliseconds_7232": 196284, + "Name_6238": "02 - Sanctuary", + "TrackId_9494": 1269, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 4739122, + "GenreId_7101": 6, + "Milliseconds_7232": 197276, + "Name_6238": "04 - Running Free", + "TrackId_9494": 1271, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 5189891, + "GenreId_7101": 6, + "Milliseconds_7232": 216058, + "Name_6238": "09 - Iron Maiden", + "TrackId_9494": 1276, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 5668992, + "GenreId_7101": 6, + "Milliseconds_7232": 236173, + "Name_6238": "01 - Prowler", + "TrackId_9494": 1268, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 6066304, + "GenreId_7101": 6, + "Milliseconds_7232": 252708, + "Name_6238": "08 - Charlotte the Harlot", + "TrackId_9494": 1275, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 6226048, + "GenreId_7101": 6, + "Milliseconds_7232": 259343, + "Name_6238": "06 - Transylvania", + "TrackId_9494": 1273, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 7889024, + "GenreId_7101": 6, + "Milliseconds_7232": 328620, + "Name_6238": "03 - Remember Tomorrow", + "TrackId_9494": 1270, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 100, + "Bytes_0565": 7981184, + "GenreId_7101": 6, + "Milliseconds_7232": 332460, + "Name_6238": "07 - Strange World", + "TrackId_9494": 1274, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 101, + "Bytes_0565": 2543744, + "GenreId_7101": 13, + "Milliseconds_7232": 105926, + "Name_6238": "The Ides Of March", + "TrackId_9494": 1277, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 4188288, + "GenreId_7101": 13, + "Milliseconds_7232": 174471, + "Name_6238": "Wrathchild", + "TrackId_9494": 1278, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 4493440, + "GenreId_7101": 13, + "Milliseconds_7232": 187141, + "Name_6238": "Genghis Khan", + "TrackId_9494": 1281, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 4804736, + "GenreId_7101": 13, + "Milliseconds_7232": 200150, + "Name_6238": "Purgatory", + "TrackId_9494": 1285, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 4874368, + "GenreId_7101": 13, + "Milliseconds_7232": 203049, + "Name_6238": "Another Life", + "TrackId_9494": 1280, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 5584861, + "GenreId_7101": 13, + "Milliseconds_7232": 232515, + "Name_6238": "Innocent Exile", + "TrackId_9494": 1282, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 6205786, + "GenreId_7101": 13, + "Milliseconds_7232": 258377, + "Name_6238": "Murders In The Rue Morgue", + "TrackId_9494": 1279, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 6934660, + "GenreId_7101": 13, + "Milliseconds_7232": 288757, + "Name_6238": "Drifter", + "TrackId_9494": 1286, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 7227440, + "GenreId_7101": 13, + "Milliseconds_7232": 300956, + "Name_6238": "Killers", + "TrackId_9494": 1283, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 101, + "Bytes_0565": 8937600, + "GenreId_7101": 13, + "Milliseconds_7232": 372349, + "Name_6238": "Prodigal Son", + "TrackId_9494": 1284, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 102, + "Bytes_0565": 10589917, + "GenreId_7101": 13, + "Milliseconds_7232": 441155, + "Name_6238": "Phantom Of The Opera", + "TrackId_9494": 1304, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 10836304, + "GenreId_7101": 3, + "Milliseconds_7232": 451422, + "Name_6238": "Hallowed Be Thy Name", + "TrackId_9494": 1296, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 10921567, + "GenreId_7101": 3, + "Milliseconds_7232": 454974, + "Name_6238": "Powerslave", + "TrackId_9494": 1294, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 1154488, + "GenreId_7101": 13, + "Milliseconds_7232": 48013, + "Name_6238": "Intro- Churchill S Speech", + "TrackId_9494": 1287, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 18949518, + "GenreId_7101": 3, + "Milliseconds_7232": 789472, + "Name_6238": "Rime Of The Ancient Mariner", + "TrackId_9494": 1293, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 4410181, + "GenreId_7101": 13, + "Milliseconds_7232": 183666, + "Name_6238": "Wrathchild", + "TrackId_9494": 1300, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 4912986, + "GenreId_7101": 3, + "Milliseconds_7232": 204617, + "Name_6238": "Running Free", + "TrackId_9494": 1299, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 5521744, + "GenreId_7101": 3, + "Milliseconds_7232": 229982, + "Name_6238": "Flight Of Icarus", + "TrackId_9494": 1292, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 5561241, + "GenreId_7101": 3, + "Milliseconds_7232": 231627, + "Name_6238": "Run To The Hills", + "TrackId_9494": 1298, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 102, + "Bytes_0565": 6289117, + "GenreId_7101": 3, + "Milliseconds_7232": 261955, + "Name_6238": "Iron Maiden", + "TrackId_9494": 1297, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 103, + "Bytes_0565": 10361452, + "GenreId_7101": 1, + "Milliseconds_7232": 431542, + "Name_6238": "Fear Of The Dark", + "TrackId_9494": 1314, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 11479913, + "GenreId_7101": 1, + "Milliseconds_7232": 478145, + "Name_6238": "The Evil That Men Do", + "TrackId_9494": 1312, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 4182963, + "GenreId_7101": 1, + "Milliseconds_7232": 174106, + "Name_6238": "Wrathchild", + "TrackId_9494": 1307, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 5118995, + "GenreId_7101": 1, + "Milliseconds_7232": 213106, + "Name_6238": "Can I Play With Madness", + "TrackId_9494": 1309, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 5599853, + "GenreId_7101": 1, + "Milliseconds_7232": 233142, + "Name_6238": "Be Quick Or Be Dead", + "TrackId_9494": 1305, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 5947795, + "GenreId_7101": 1, + "Milliseconds_7232": 247640, + "Name_6238": "Tailgunner", + "TrackId_9494": 1311, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 6831163, + "GenreId_7101": 1, + "Milliseconds_7232": 284447, + "Name_6238": "From Here To Eternity", + "TrackId_9494": 1308, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 7060625, + "GenreId_7101": 1, + "Milliseconds_7232": 294008, + "Name_6238": "The Number Of The Beast", + "TrackId_9494": 1306, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 8091301, + "GenreId_7101": 1, + "Milliseconds_7232": 336953, + "Name_6238": "Wasting Love", + "TrackId_9494": 1310, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 103, + "Bytes_0565": 9905048, + "GenreId_7101": 1, + "Milliseconds_7232": 412525, + "Name_6238": "Afraid To Shoot Strangers", + "TrackId_9494": 1313, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 104, + "Bytes_0565": 10577743, + "GenreId_7101": 1, + "Milliseconds_7232": 440555, + "Name_6238": "Heaven Can Wait", + "TrackId_9494": 1317, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 10751410, + "GenreId_7101": 1, + "Milliseconds_7232": 447791, + "Name_6238": "Hallowed Be Thy Name", + "TrackId_9494": 1321, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 11380851, + "GenreId_7101": 1, + "Milliseconds_7232": 474017, + "Name_6238": "Running Free", + "TrackId_9494": 1324, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 11874875, + "GenreId_7101": 1, + "Milliseconds_7232": 494602, + "Name_6238": "Iron Maiden", + "TrackId_9494": 1320, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 5588560, + "GenreId_7101": 1, + "Milliseconds_7232": 232672, + "Name_6238": "The Trooper", + "TrackId_9494": 1322, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 5665052, + "GenreId_7101": 1, + "Milliseconds_7232": 235859, + "Name_6238": "Run To The Hills", + "TrackId_9494": 1318, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 6302648, + "GenreId_7101": 1, + "Milliseconds_7232": 262426, + "Name_6238": "The Clairvoyant", + "TrackId_9494": 1316, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 7648679, + "GenreId_7101": 1, + "Milliseconds_7232": 318511, + "Name_6238": "Sanctuary", + "TrackId_9494": 1323, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 8122030, + "GenreId_7101": 1, + "Milliseconds_7232": 338233, + "Name_6238": "2 Minutes To Midnight", + "TrackId_9494": 1319, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 104, + "Bytes_0565": 9045532, + "GenreId_7101": 1, + "Milliseconds_7232": 376711, + "Name_6238": "Bring Your Daughter... To The Slaughter...", + "TrackId_9494": 1315, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 105, + "Bytes_0565": 3672064, + "GenreId_7101": 3, + "Milliseconds_7232": 229459, + "Name_6238": "Holy Smoke", + "TrackId_9494": 1326, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 3960832, + "GenreId_7101": 3, + "Milliseconds_7232": 247510, + "Name_6238": "Hooks In You", + "TrackId_9494": 1332, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4018088, + "GenreId_7101": 3, + "Milliseconds_7232": 250853, + "Name_6238": "Fates Warning", + "TrackId_9494": 1329, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4071587, + "GenreId_7101": 3, + "Milliseconds_7232": 254197, + "Name_6238": "Public Enema Number One", + "TrackId_9494": 1328, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4089856, + "GenreId_7101": 3, + "Milliseconds_7232": 255582, + "Name_6238": "Tailgunner", + "TrackId_9494": 1325, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4141056, + "GenreId_7101": 3, + "Milliseconds_7232": 258768, + "Name_6238": "The Assassin", + "TrackId_9494": 1330, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4225024, + "GenreId_7101": 3, + "Milliseconds_7232": 263941, + "Name_6238": "No Prayer For The Dying", + "TrackId_9494": 1327, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4407296, + "GenreId_7101": 3, + "Milliseconds_7232": 275408, + "Name_6238": "Run Silent Run Deep", + "TrackId_9494": 1331, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 4548608, + "GenreId_7101": 3, + "Milliseconds_7232": 284238, + "Name_6238": "Bring Your Daughter... ...To The Slaughter", + "TrackId_9494": 1333, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 105, + "Bytes_0565": 5322752, + "GenreId_7101": 3, + "Milliseconds_7232": 332617, + "Name_6238": "Mother Russia", + "TrackId_9494": 1334, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 106, + "Bytes_0565": 3306324, + "GenreId_7101": 3, + "Milliseconds_7232": 206367, + "Name_6238": "Sun And Steel", + "TrackId_9494": 1342, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 3543040, + "GenreId_7101": 3, + "Milliseconds_7232": 221309, + "Name_6238": "Quest For Fire", + "TrackId_9494": 1341, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 3686400, + "GenreId_7101": 3, + "Milliseconds_7232": 230269, + "Name_6238": "Flight Of The Icarus", + "TrackId_9494": 1337, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 4024320, + "GenreId_7101": 3, + "Milliseconds_7232": 251454, + "Name_6238": "The Trooper", + "TrackId_9494": 1339, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 4710400, + "GenreId_7101": 3, + "Milliseconds_7232": 294347, + "Name_6238": "Still Life", + "TrackId_9494": 1340, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 5212160, + "GenreId_7101": 3, + "Milliseconds_7232": 325694, + "Name_6238": "Die With Your Boots On", + "TrackId_9494": 1338, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 5914624, + "GenreId_7101": 3, + "Milliseconds_7232": 369554, + "Name_6238": "Where Eagles Dare", + "TrackId_9494": 1335, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 6539264, + "GenreId_7101": 3, + "Milliseconds_7232": 408607, + "Name_6238": "Revelations", + "TrackId_9494": 1336, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 106, + "Bytes_0565": 7129264, + "GenreId_7101": 3, + "Milliseconds_7232": 445283, + "Name_6238": "To Tame A Land", + "TrackId_9494": 1343, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_3212": 107, + "Bytes_0565": 19599577, + "GenreId_7101": 3, + "Milliseconds_7232": 816509, + "Name_6238": "Rime of the Ancient Mariner", + "TrackId_9494": 1351, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 5828861, + "GenreId_7101": 3, + "Milliseconds_7232": 242729, + "Name_6238": "Flash of The Blade", + "TrackId_9494": 1347, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 6074756, + "GenreId_7101": 3, + "Milliseconds_7232": 252891, + "Name_6238": "Losfer Words", + "TrackId_9494": 1346, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 6472088, + "GenreId_7101": 3, + "Milliseconds_7232": 269531, + "Name_6238": "Aces High", + "TrackId_9494": 1344, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 7696518, + "GenreId_7101": 3, + "Milliseconds_7232": 320548, + "Name_6238": "Back in the Village", + "TrackId_9494": 1349, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 8638809, + "GenreId_7101": 3, + "Milliseconds_7232": 359810, + "Name_6238": "2 Minutes To Midnight", + "TrackId_9494": 1345, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 8800686, + "GenreId_7101": 3, + "Milliseconds_7232": 366471, + "Name_6238": "Duelists", + "TrackId_9494": 1348, + "UnitPrice_4341": 0.99 + }, + { + "AlbumId_3212": 107, + "Bytes_0565": 9791106, + "GenreId_7101": 3, + "Milliseconds_7232": 407823, + "Name_6238": "Powerslave", + "TrackId_9494": 1350, + "UnitPrice_4341": 0.99 + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c410cf6214606101/request.json b/test-snapshots/query/c410cf6214606101/request.json new file mode 100644 index 0000000..f23cbff --- /dev/null +++ b/test-snapshots/query/c410cf6214606101/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_3212": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_0565": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "TrackId_9494": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "GenreId_7101": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "UnitPrice_4341": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Milliseconds_7232": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_6238": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c46f4187464dc79b/expected.json b/test-snapshots/query/c46f4187464dc79b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c46f4187464dc79b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c46f4187464dc79b/request.json b/test-snapshots/query/c46f4187464dc79b/request.json new file mode 100644 index 0000000..714f90c --- /dev/null +++ b/test-snapshots/query/c46f4187464dc79b/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 262-3322" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1968-01-09" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c4a99011908c9abc/expected.json b/test-snapshots/query/c4a99011908c9abc/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/c4a99011908c9abc/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4a99011908c9abc/request.json b/test-snapshots/query/c4a99011908c9abc/request.json new file mode 100644 index 0000000..eaa4adc --- /dev/null +++ b/test-snapshots/query/c4a99011908c9abc/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c4bac363f9df6b98/expected.json b/test-snapshots/query/c4bac363f9df6b98/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c4bac363f9df6b98/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4bac363f9df6b98/request.json b/test-snapshots/query/c4bac363f9df6b98/request.json new file mode 100644 index 0000000..50d6492 --- /dev/null +++ b/test-snapshots/query/c4bac363f9df6b98/request.json @@ -0,0 +1,188 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edmonton" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1968-01-09" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c4df7dc46906cf05/expected.json b/test-snapshots/query/c4df7dc46906cf05/expected.json new file mode 100644 index 0000000..42086c5 --- /dev/null +++ b/test-snapshots/query/c4df7dc46906cf05/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 11, + "Name": "Bossa Nova" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4df7dc46906cf05/request.json b/test-snapshots/query/c4df7dc46906cf05/request.json new file mode 100644 index 0000000..b42a140 --- /dev/null +++ b/test-snapshots/query/c4df7dc46906cf05/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c4e08904f4377b78/expected.json b/test-snapshots/query/c4e08904f4377b78/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c4e08904f4377b78/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4e08904f4377b78/request.json b/test-snapshots/query/c4e08904f4377b78/request.json new file mode 100644 index 0000000..d87ec35 --- /dev/null +++ b/test-snapshots/query/c4e08904f4377b78/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Microsoft Way" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 255 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c4e3fd077263cf5c/expected.json b/test-snapshots/query/c4e3fd077263cf5c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c4e3fd077263cf5c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4e3fd077263cf5c/request.json b/test-snapshots/query/c4e3fd077263cf5c/request.json new file mode 100644 index 0000000..d049cbb --- /dev/null +++ b/test-snapshots/query/c4e3fd077263cf5c/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "No Prayer For The Dying" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c4e5e1ae0e556ab7/expected.json b/test-snapshots/query/c4e5e1ae0e556ab7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c4e5e1ae0e556ab7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4e5e1ae0e556ab7/request.json b/test-snapshots/query/c4e5e1ae0e556ab7/request.json new file mode 100644 index 0000000..424d1b5 --- /dev/null +++ b/test-snapshots/query/c4e5e1ae0e556ab7/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c4ef2c79de8a69f7/expected.json b/test-snapshots/query/c4ef2c79de8a69f7/expected.json new file mode 100644 index 0000000..cf2f61a --- /dev/null +++ b/test-snapshots/query/c4ef2c79de8a69f7/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_5555": "90’s Music", + "PlaylistId_3526": 5 + }, + { + "Name_5555": "Audiobooks", + "PlaylistId_3526": 6 + }, + { + "Name_5555": "Audiobooks", + "PlaylistId_3526": 4 + }, + { + "Name_5555": "Brazilian Music", + "PlaylistId_3526": 11 + }, + { + "Name_5555": "Classical", + "PlaylistId_3526": 12 + }, + { + "Name_5555": "Classical 101 - Deep Cuts", + "PlaylistId_3526": 13 + }, + { + "Name_5555": "Classical 101 - Next Steps", + "PlaylistId_3526": 14 + }, + { + "Name_5555": "Classical 101 - The Basics", + "PlaylistId_3526": 15 + }, + { + "Name_5555": "Grunge", + "PlaylistId_3526": 16 + }, + { + "Name_5555": "Heavy Metal Classic", + "PlaylistId_3526": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c4ef2c79de8a69f7/request.json b/test-snapshots/query/c4ef2c79de8a69f7/request.json new file mode 100644 index 0000000..af8b375 --- /dev/null +++ b/test-snapshots/query/c4ef2c79de8a69f7/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_5555": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_3526": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c504bf2df46576cc/expected.json b/test-snapshots/query/c504bf2df46576cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c504bf2df46576cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c504bf2df46576cc/request.json b/test-snapshots/query/c504bf2df46576cc/request.json new file mode 100644 index 0000000..4208009 --- /dev/null +++ b/test-snapshots/query/c504bf2df46576cc/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "manoj.pareek@rediff.com" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c523da5c32b8923a/expected.json b/test-snapshots/query/c523da5c32b8923a/expected.json new file mode 100644 index 0000000..faf79a2 --- /dev/null +++ b/test-snapshots/query/c523da5c32b8923a/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_9328": 412, + "InvoiceLineId_9297": 2240, + "TrackId_1896": 3177 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2226, + "TrackId_1896": 3046 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2227, + "TrackId_1896": 3055 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2228, + "TrackId_1896": 3064 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2229, + "TrackId_1896": 3073 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2230, + "TrackId_1896": 3082 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2231, + "TrackId_1896": 3091 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2232, + "TrackId_1896": 3100 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2233, + "TrackId_1896": 3109 + }, + { + "InvoiceId_9328": 411, + "InvoiceLineId_9297": 2234, + "TrackId_1896": 3118 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c523da5c32b8923a/request.json b/test-snapshots/query/c523da5c32b8923a/request.json new file mode 100644 index 0000000..dfa935e --- /dev/null +++ b/test-snapshots/query/c523da5c32b8923a/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_9328": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_9297": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "TrackId_1896": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c52505995d77b76d/expected.json b/test-snapshots/query/c52505995d77b76d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c52505995d77b76d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c52505995d77b76d/request.json b/test-snapshots/query/c52505995d77b76d/request.json new file mode 100644 index 0000000..74b1957 --- /dev/null +++ b/test-snapshots/query/c52505995d77b76d/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c5279c60ec7945a6/expected.json b/test-snapshots/query/c5279c60ec7945a6/expected.json new file mode 100644 index 0000000..d235ad9 --- /dev/null +++ b/test-snapshots/query/c5279c60ec7945a6/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c5279c60ec7945a6/request.json b/test-snapshots/query/c5279c60ec7945a6/request.json new file mode 100644 index 0000000..147812b --- /dev/null +++ b/test-snapshots/query/c5279c60ec7945a6/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c538b5d316d6301/expected.json b/test-snapshots/query/c538b5d316d6301/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c538b5d316d6301/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c538b5d316d6301/request.json b/test-snapshots/query/c538b5d316d6301/request.json new file mode 100644 index 0000000..7d8ff8d --- /dev/null +++ b/test-snapshots/query/c538b5d316d6301/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c54634c5ce31a9b0/expected.json b/test-snapshots/query/c54634c5ce31a9b0/expected.json new file mode 100644 index 0000000..8985636 --- /dev/null +++ b/test-snapshots/query/c54634c5ce31a9b0/expected.json @@ -0,0 +1,312 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_1465": "Audiobooks" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_1465": "Audiobooks" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_1465": "Movies" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_1465": "Movies" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + }, + "Name_1465": "Music" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 10, + "TrackId": 2819 + }, + { + "PlaylistId": 10, + "TrackId": 2820 + }, + { + "PlaylistId": 10, + "TrackId": 2821 + }, + { + "PlaylistId": 10, + "TrackId": 2822 + }, + { + "PlaylistId": 10, + "TrackId": 2823 + }, + { + "PlaylistId": 10, + "TrackId": 2824 + }, + { + "PlaylistId": 10, + "TrackId": 2825 + }, + { + "PlaylistId": 10, + "TrackId": 2826 + }, + { + "PlaylistId": 10, + "TrackId": 2827 + }, + { + "PlaylistId": 10, + "TrackId": 2828 + } + ] + }, + "Name_1465": "TV Shows" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 11, + "TrackId": 1088 + }, + { + "PlaylistId": 11, + "TrackId": 1093 + }, + { + "PlaylistId": 11, + "TrackId": 1099 + }, + { + "PlaylistId": 11, + "TrackId": 1105 + }, + { + "PlaylistId": 11, + "TrackId": 1514 + }, + { + "PlaylistId": 11, + "TrackId": 1518 + }, + { + "PlaylistId": 11, + "TrackId": 1519 + }, + { + "PlaylistId": 11, + "TrackId": 1916 + }, + { + "PlaylistId": 11, + "TrackId": 1921 + }, + { + "PlaylistId": 11, + "TrackId": 1928 + } + ] + }, + "Name_1465": "Brazilian Music" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 12, + "TrackId": 3403 + }, + { + "PlaylistId": 12, + "TrackId": 3404 + }, + { + "PlaylistId": 12, + "TrackId": 3405 + }, + { + "PlaylistId": 12, + "TrackId": 3406 + }, + { + "PlaylistId": 12, + "TrackId": 3407 + }, + { + "PlaylistId": 12, + "TrackId": 3408 + }, + { + "PlaylistId": 12, + "TrackId": 3409 + }, + { + "PlaylistId": 12, + "TrackId": 3410 + }, + { + "PlaylistId": 12, + "TrackId": 3411 + }, + { + "PlaylistId": 12, + "TrackId": 3412 + } + ] + }, + "Name_1465": "Classical" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 13, + "TrackId": 3479 + }, + { + "PlaylistId": 13, + "TrackId": 3480 + }, + { + "PlaylistId": 13, + "TrackId": 3481 + }, + { + "PlaylistId": 13, + "TrackId": 3482 + }, + { + "PlaylistId": 13, + "TrackId": 3483 + }, + { + "PlaylistId": 13, + "TrackId": 3484 + }, + { + "PlaylistId": 13, + "TrackId": 3485 + }, + { + "PlaylistId": 13, + "TrackId": 3486 + }, + { + "PlaylistId": 13, + "TrackId": 3487 + }, + { + "PlaylistId": 13, + "TrackId": 3488 + } + ] + }, + "Name_1465": "Classical 101 - Deep Cuts" + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 14, + "TrackId": 3430 + }, + { + "PlaylistId": 14, + "TrackId": 3431 + }, + { + "PlaylistId": 14, + "TrackId": 3432 + }, + { + "PlaylistId": 14, + "TrackId": 3433 + }, + { + "PlaylistId": 14, + "TrackId": 3434 + }, + { + "PlaylistId": 14, + "TrackId": 3435 + }, + { + "PlaylistId": 14, + "TrackId": 3436 + }, + { + "PlaylistId": 14, + "TrackId": 3437 + }, + { + "PlaylistId": 14, + "TrackId": 3438 + }, + { + "PlaylistId": 14, + "TrackId": 3439 + } + ] + }, + "Name_1465": "Classical 101 - Next Steps" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c54634c5ce31a9b0/request.json b/test-snapshots/query/c54634c5ce31a9b0/request.json new file mode 100644 index 0000000..2d8ebc5 --- /dev/null +++ b/test-snapshots/query/c54634c5ce31a9b0/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_1465": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c546b10eb463d3aa/expected.json b/test-snapshots/query/c546b10eb463d3aa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c546b10eb463d3aa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c546b10eb463d3aa/request.json b/test-snapshots/query/c546b10eb463d3aa/request.json new file mode 100644 index 0000000..b44098a --- /dev/null +++ b/test-snapshots/query/c546b10eb463d3aa/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Science Fiction" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c56a4386f3f10a3e/expected.json b/test-snapshots/query/c56a4386f3f10a3e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c56a4386f3f10a3e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c56a4386f3f10a3e/request.json b/test-snapshots/query/c56a4386f3f10a3e/request.json new file mode 100644 index 0000000..2fb0337 --- /dev/null +++ b/test-snapshots/query/c56a4386f3f10a3e/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c571220d5c21029c/expected.json b/test-snapshots/query/c571220d5c21029c/expected.json new file mode 100644 index 0000000..b44e6ab --- /dev/null +++ b/test-snapshots/query/c571220d5c21029c/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_7639": 5, + "Name_0889": "AAC audio file" + }, + { + "MediaTypeId_7639": 4, + "Name_0889": "Purchased AAC audio file" + }, + { + "MediaTypeId_7639": 3, + "Name_0889": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_7639": 2, + "Name_0889": "Protected AAC audio file" + }, + { + "MediaTypeId_7639": 1, + "Name_0889": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c571220d5c21029c/request.json b/test-snapshots/query/c571220d5c21029c/request.json new file mode 100644 index 0000000..d39ef8a --- /dev/null +++ b/test-snapshots/query/c571220d5c21029c/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_7639": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_0889": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c57b59e14e5969ba/expected.json b/test-snapshots/query/c57b59e14e5969ba/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c57b59e14e5969ba/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c57b59e14e5969ba/request.json b/test-snapshots/query/c57b59e14e5969ba/request.json new file mode 100644 index 0000000..d77a98e --- /dev/null +++ b/test-snapshots/query/c57b59e14e5969ba/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c5929d53d401631a/expected.json b/test-snapshots/query/c5929d53d401631a/expected.json new file mode 100644 index 0000000..405a811 --- /dev/null +++ b/test-snapshots/query/c5929d53d401631a/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_2742": 208, + "ArtistId_3160": 136, + "Title_0107": "[1997] Black Light Syndrome" + }, + { + "AlbumId_2742": 240, + "ArtistId_3160": 150, + "Title_0107": "Zooropa" + }, + { + "AlbumId_2742": 267, + "ArtistId_3160": 202, + "Title_0107": "Worlds" + }, + { + "AlbumId_2742": 334, + "ArtistId_3160": 264, + "Title_0107": "Weill: The Seven Deadly Sins" + }, + { + "AlbumId_2742": 8, + "ArtistId_3160": 6, + "Title_0107": "Warner 25 Anos" + }, + { + "AlbumId_2742": 239, + "ArtistId_3160": 150, + "Title_0107": "War" + }, + { + "AlbumId_2742": 175, + "ArtistId_3160": 115, + "Title_0107": "Walking Into Clarksdale" + }, + { + "AlbumId_2742": 287, + "ArtistId_3160": 221, + "Title_0107": "Wagner: Favourite Overtures" + }, + { + "AlbumId_2742": 182, + "ArtistId_3160": 118, + "Title_0107": "Vs." + }, + { + "AlbumId_2742": 53, + "ArtistId_3160": 21, + "Title_0107": "Vozes do MPB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c5929d53d401631a/request.json b/test-snapshots/query/c5929d53d401631a/request.json new file mode 100644 index 0000000..b30cee6 --- /dev/null +++ b/test-snapshots/query/c5929d53d401631a/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_2742": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_3160": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_0107": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c5dbd4baebcdfbaa/expected.json b/test-snapshots/query/c5dbd4baebcdfbaa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c5dbd4baebcdfbaa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c5dbd4baebcdfbaa/request.json b/test-snapshots/query/c5dbd4baebcdfbaa/request.json new file mode 100644 index 0000000..f773fd3 --- /dev/null +++ b/test-snapshots/query/c5dbd4baebcdfbaa/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c5edf499e2191e0f/expected.json b/test-snapshots/query/c5edf499e2191e0f/expected.json new file mode 100644 index 0000000..0f9cd54 --- /dev/null +++ b/test-snapshots/query/c5edf499e2191e0f/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c5edf499e2191e0f/request.json b/test-snapshots/query/c5edf499e2191e0f/request.json new file mode 100644 index 0000000..8faf1b4 --- /dev/null +++ b/test-snapshots/query/c5edf499e2191e0f/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "113 Lupus St" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c5f462851392aeff/expected.json b/test-snapshots/query/c5f462851392aeff/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c5f462851392aeff/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c5f462851392aeff/request.json b/test-snapshots/query/c5f462851392aeff/request.json new file mode 100644 index 0000000..82cba19 --- /dev/null +++ b/test-snapshots/query/c5f462851392aeff/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (780) 428-3457" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c6020dc26bdbdf44/expected.json b/test-snapshots/query/c6020dc26bdbdf44/expected.json new file mode 100644 index 0000000..aa35e2f --- /dev/null +++ b/test-snapshots/query/c6020dc26bdbdf44/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_4792": 5, + "Name_0793": "AAC audio file" + }, + { + "MediaTypeId_4792": 4, + "Name_0793": "Purchased AAC audio file" + }, + { + "MediaTypeId_4792": 3, + "Name_0793": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_4792": 2, + "Name_0793": "Protected AAC audio file" + }, + { + "MediaTypeId_4792": 1, + "Name_0793": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c6020dc26bdbdf44/request.json b/test-snapshots/query/c6020dc26bdbdf44/request.json new file mode 100644 index 0000000..8135324 --- /dev/null +++ b/test-snapshots/query/c6020dc26bdbdf44/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_4792": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_0793": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c61abae5ee7f2a7f/expected.json b/test-snapshots/query/c61abae5ee7f2a7f/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/c61abae5ee7f2a7f/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c61abae5ee7f2a7f/request.json b/test-snapshots/query/c61abae5ee7f2a7f/request.json new file mode 100644 index 0000000..04c442f --- /dev/null +++ b/test-snapshots/query/c61abae5ee7f2a7f/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c62c4c6c5abd6278/expected.json b/test-snapshots/query/c62c4c6c5abd6278/expected.json new file mode 100644 index 0000000..7f707ca --- /dev/null +++ b/test-snapshots/query/c62c4c6c5abd6278/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 106, + "Name": "Motörhead" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c62c4c6c5abd6278/request.json b/test-snapshots/query/c62c4c6c5abd6278/request.json new file mode 100644 index 0000000..c9c8513 --- /dev/null +++ b/test-snapshots/query/c62c4c6c5abd6278/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c6484c2b709f90d6/expected.json b/test-snapshots/query/c6484c2b709f90d6/expected.json new file mode 100644 index 0000000..a0b0786 --- /dev/null +++ b/test-snapshots/query/c6484c2b709f90d6/expected.json @@ -0,0 +1,54 @@ +[ + { + "rows": [ + { + "BirthDate_2822": "1968-01-09", + "City_9605": "Lethbridge", + "EmployeeId_9250": 8, + "LastName_1467": "Callahan" + }, + { + "BirthDate_2822": "1970-05-29", + "City_9605": "Lethbridge", + "EmployeeId_9250": 7, + "LastName_1467": "King" + }, + { + "BirthDate_2822": "1965-03-03", + "City_9605": "Calgary", + "EmployeeId_9250": 5, + "LastName_1467": "Johnson" + }, + { + "BirthDate_2822": "1973-07-01", + "City_9605": "Calgary", + "EmployeeId_9250": 6, + "LastName_1467": "Mitchell" + }, + { + "BirthDate_2822": "1947-09-19", + "City_9605": "Calgary", + "EmployeeId_9250": 4, + "LastName_1467": "Park" + }, + { + "BirthDate_2822": "1962-02-18", + "City_9605": "Edmonton", + "EmployeeId_9250": 1, + "LastName_1467": "Adams" + }, + { + "BirthDate_2822": "1958-12-08", + "City_9605": "Calgary", + "EmployeeId_9250": 2, + "LastName_1467": "Edwards" + }, + { + "BirthDate_2822": "1973-08-29", + "City_9605": "Calgary", + "EmployeeId_9250": 3, + "LastName_1467": "Peacock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c6484c2b709f90d6/request.json b/test-snapshots/query/c6484c2b709f90d6/request.json new file mode 100644 index 0000000..63b9607 --- /dev/null +++ b/test-snapshots/query/c6484c2b709f90d6/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "EmployeeId_9250": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "BirthDate_2822": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_9605": { + "type": "column", + "column": "City", + "fields": null + }, + "LastName_1467": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c65c83a93c8c1dd2/expected.json b/test-snapshots/query/c65c83a93c8c1dd2/expected.json new file mode 100644 index 0000000..5d74345 --- /dev/null +++ b/test-snapshots/query/c65c83a93c8c1dd2/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "GenreId_5696": 25 + }, + { + "GenreId_5696": 24 + }, + { + "GenreId_5696": 23 + }, + { + "GenreId_5696": 22 + }, + { + "GenreId_5696": 21 + }, + { + "GenreId_5696": 20 + }, + { + "GenreId_5696": 19 + }, + { + "GenreId_5696": 18 + }, + { + "GenreId_5696": 17 + }, + { + "GenreId_5696": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c65c83a93c8c1dd2/request.json b/test-snapshots/query/c65c83a93c8c1dd2/request.json new file mode 100644 index 0000000..a22ccd7 --- /dev/null +++ b/test-snapshots/query/c65c83a93c8c1dd2/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_5696": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c68a9ef2d7500e77/expected.json b/test-snapshots/query/c68a9ef2d7500e77/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c68a9ef2d7500e77/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c68a9ef2d7500e77/request.json b/test-snapshots/query/c68a9ef2d7500e77/request.json new file mode 100644 index 0000000..a72bca0 --- /dev/null +++ b/test-snapshots/query/c68a9ef2d7500e77/request.json @@ -0,0 +1,157 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2002-08-14" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Mitchell" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c6cf233899ad26bd/expected.json b/test-snapshots/query/c6cf233899ad26bd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c6cf233899ad26bd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c6cf233899ad26bd/request.json b/test-snapshots/query/c6cf233899ad26bd/request.json new file mode 100644 index 0000000..8fffe9e --- /dev/null +++ b/test-snapshots/query/c6cf233899ad26bd/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c6dcef9a711f28f/expected.json b/test-snapshots/query/c6dcef9a711f28f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c6dcef9a711f28f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c6dcef9a711f28f/request.json b/test-snapshots/query/c6dcef9a711f28f/request.json new file mode 100644 index 0000000..5777c8e --- /dev/null +++ b/test-snapshots/query/c6dcef9a711f28f/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c6ea5c811ada3b4e/expected.json b/test-snapshots/query/c6ea5c811ada3b4e/expected.json new file mode 100644 index 0000000..c522e29 --- /dev/null +++ b/test-snapshots/query/c6ea5c811ada3b4e/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_1833": 5, + "Name_4126": "AAC audio file" + }, + { + "MediaTypeId_1833": 1, + "Name_4126": "MPEG audio file" + }, + { + "MediaTypeId_1833": 2, + "Name_4126": "Protected AAC audio file" + }, + { + "MediaTypeId_1833": 3, + "Name_4126": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_1833": 4, + "Name_4126": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c6ea5c811ada3b4e/request.json b/test-snapshots/query/c6ea5c811ada3b4e/request.json new file mode 100644 index 0000000..076c2a5 --- /dev/null +++ b/test-snapshots/query/c6ea5c811ada3b4e/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_1833": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_4126": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c702abcf6999a1a5/expected.json b/test-snapshots/query/c702abcf6999a1a5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c702abcf6999a1a5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c702abcf6999a1a5/request.json b/test-snapshots/query/c702abcf6999a1a5/request.json new file mode 100644 index 0000000..bb9bd9b --- /dev/null +++ b/test-snapshots/query/c702abcf6999a1a5/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c726fe813d19fbd7/expected.json b/test-snapshots/query/c726fe813d19fbd7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c726fe813d19fbd7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c726fe813d19fbd7/request.json b/test-snapshots/query/c726fe813d19fbd7/request.json new file mode 100644 index 0000000..d9a6c59 --- /dev/null +++ b/test-snapshots/query/c726fe813d19fbd7/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c745a8cce8fac3f7/expected.json b/test-snapshots/query/c745a8cce8fac3f7/expected.json new file mode 100644 index 0000000..47e416c --- /dev/null +++ b/test-snapshots/query/c745a8cce8fac3f7/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c745a8cce8fac3f7/request.json b/test-snapshots/query/c745a8cce8fac3f7/request.json new file mode 100644 index 0000000..d870549 --- /dev/null +++ b/test-snapshots/query/c745a8cce8fac3f7/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c759b7b8287290e3/expected.json b/test-snapshots/query/c759b7b8287290e3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c759b7b8287290e3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c759b7b8287290e3/request.json b/test-snapshots/query/c759b7b8287290e3/request.json new file mode 100644 index 0000000..7a2fe64 --- /dev/null +++ b/test-snapshots/query/c759b7b8287290e3/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c767af051a3b55f6/expected.json b/test-snapshots/query/c767af051a3b55f6/expected.json new file mode 100644 index 0000000..ed226db --- /dev/null +++ b/test-snapshots/query/c767af051a3b55f6/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + }, + { + "Name": "Music", + "PlaylistId": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c767af051a3b55f6/request.json b/test-snapshots/query/c767af051a3b55f6/request.json new file mode 100644 index 0000000..3f7c3f9 --- /dev/null +++ b/test-snapshots/query/c767af051a3b55f6/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c78e23ad1589de17/expected.json b/test-snapshots/query/c78e23ad1589de17/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/c78e23ad1589de17/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c78e23ad1589de17/request.json b/test-snapshots/query/c78e23ad1589de17/request.json new file mode 100644 index 0000000..1809d36 --- /dev/null +++ b/test-snapshots/query/c78e23ad1589de17/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1009 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c7b0d7073c54a4f1/expected.json b/test-snapshots/query/c7b0d7073c54a4f1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c7b0d7073c54a4f1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c7b0d7073c54a4f1/request.json b/test-snapshots/query/c7b0d7073c54a4f1/request.json new file mode 100644 index 0000000..bdc7887 --- /dev/null +++ b/test-snapshots/query/c7b0d7073c54a4f1/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c7d8626b81cd18d2/expected.json b/test-snapshots/query/c7d8626b81cd18d2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c7d8626b81cd18d2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c7d8626b81cd18d2/request.json b/test-snapshots/query/c7d8626b81cd18d2/request.json new file mode 100644 index 0000000..fcb32dc --- /dev/null +++ b/test-snapshots/query/c7d8626b81cd18d2/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c7e080b48c831025/expected.json b/test-snapshots/query/c7e080b48c831025/expected.json new file mode 100644 index 0000000..66c8e45 --- /dev/null +++ b/test-snapshots/query/c7e080b48c831025/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "CustomerId_median_0958": 30, + "FirstName_min_7429": "Aaron", + "State_max_4952": "WI" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/c7e080b48c831025/request.json b/test-snapshots/query/c7e080b48c831025/request.json new file mode 100644 index 0000000..0723842 --- /dev/null +++ b/test-snapshots/query/c7e080b48c831025/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "FirstName_min_7429": { + "type": "single_column", + "column": "FirstName", + "function": "min" + }, + "CustomerId_median_0958": { + "type": "single_column", + "column": "CustomerId", + "function": "median" + }, + "State_max_4952": { + "type": "single_column", + "column": "State", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c7ea0f0bca9ea831/expected.json b/test-snapshots/query/c7ea0f0bca9ea831/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/c7ea0f0bca9ea831/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c7ea0f0bca9ea831/request.json b/test-snapshots/query/c7ea0f0bca9ea831/request.json new file mode 100644 index 0000000..9b9e2fe --- /dev/null +++ b/test-snapshots/query/c7ea0f0bca9ea831/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c84a384f5497c07b/expected.json b/test-snapshots/query/c84a384f5497c07b/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/c84a384f5497c07b/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c84a384f5497c07b/request.json b/test-snapshots/query/c84a384f5497c07b/request.json new file mode 100644 index 0000000..97f6da7 --- /dev/null +++ b/test-snapshots/query/c84a384f5497c07b/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c86fb26d2082131a/expected.json b/test-snapshots/query/c86fb26d2082131a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c86fb26d2082131a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c86fb26d2082131a/request.json b/test-snapshots/query/c86fb26d2082131a/request.json new file mode 100644 index 0000000..aaed754 --- /dev/null +++ b/test-snapshots/query/c86fb26d2082131a/request.json @@ -0,0 +1,137 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 307 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c8764d60decaa80d/expected.json b/test-snapshots/query/c8764d60decaa80d/expected.json new file mode 100644 index 0000000..cfe3131 --- /dev/null +++ b/test-snapshots/query/c8764d60decaa80d/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c8764d60decaa80d/request.json b/test-snapshots/query/c8764d60decaa80d/request.json new file mode 100644 index 0000000..77131d5 --- /dev/null +++ b/test-snapshots/query/c8764d60decaa80d/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c89bcd1bef698a88/expected.json b/test-snapshots/query/c89bcd1bef698a88/expected.json new file mode 100644 index 0000000..fa56b59 --- /dev/null +++ b/test-snapshots/query/c89bcd1bef698a88/expected.json @@ -0,0 +1,240 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 1 + }, + { + "PlaylistId_5294": 17, + "TrackId_4878": 1 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 11 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 11 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 9 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 9 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 13 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 13 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 6 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 6 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 8 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 8 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 7 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 7 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 12 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 12 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 10 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 10 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "PlaylistId_5294": 1, + "TrackId_4878": 14 + }, + { + "PlaylistId_5294": 8, + "TrackId_4878": 14 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c89bcd1bef698a88/request.json b/test-snapshots/query/c89bcd1bef698a88/request.json new file mode 100644 index 0000000..999321b --- /dev/null +++ b/test-snapshots/query/c89bcd1bef698a88/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId_5294": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_4878": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c89d842e77276821/expected.json b/test-snapshots/query/c89d842e77276821/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c89d842e77276821/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c89d842e77276821/request.json b/test-snapshots/query/c89d842e77276821/request.json new file mode 100644 index 0000000..1f40cd6 --- /dev/null +++ b/test-snapshots/query/c89d842e77276821/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c8afa86e70df63d1/expected.json b/test-snapshots/query/c8afa86e70df63d1/expected.json new file mode 100644 index 0000000..1304a9e --- /dev/null +++ b/test-snapshots/query/c8afa86e70df63d1/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + }, + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c8afa86e70df63d1/request.json b/test-snapshots/query/c8afa86e70df63d1/request.json new file mode 100644 index 0000000..232752a --- /dev/null +++ b/test-snapshots/query/c8afa86e70df63d1/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c8b41f41a3ec777b/expected.json b/test-snapshots/query/c8b41f41a3ec777b/expected.json new file mode 100644 index 0000000..1e708eb --- /dev/null +++ b/test-snapshots/query/c8b41f41a3ec777b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 11, + "TrackId": 1088 + }, + { + "PlaylistId": 11, + "TrackId": 1093 + }, + { + "PlaylistId": 11, + "TrackId": 1099 + }, + { + "PlaylistId": 11, + "TrackId": 1105 + }, + { + "PlaylistId": 11, + "TrackId": 1514 + }, + { + "PlaylistId": 11, + "TrackId": 1518 + }, + { + "PlaylistId": 11, + "TrackId": 1519 + }, + { + "PlaylistId": 11, + "TrackId": 1916 + }, + { + "PlaylistId": 11, + "TrackId": 1921 + }, + { + "PlaylistId": 11, + "TrackId": 1928 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c8b41f41a3ec777b/request.json b/test-snapshots/query/c8b41f41a3ec777b/request.json new file mode 100644 index 0000000..a6596b4 --- /dev/null +++ b/test-snapshots/query/c8b41f41a3ec777b/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Brazilian Music" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c8edec9c23383d0f/expected.json b/test-snapshots/query/c8edec9c23383d0f/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/c8edec9c23383d0f/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c8edec9c23383d0f/request.json b/test-snapshots/query/c8edec9c23383d0f/request.json new file mode 100644 index 0000000..057877e --- /dev/null +++ b/test-snapshots/query/c8edec9c23383d0f/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c90e6b8b284bee54/expected.json b/test-snapshots/query/c90e6b8b284bee54/expected.json new file mode 100644 index 0000000..581b7d5 --- /dev/null +++ b/test-snapshots/query/c90e6b8b284bee54/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "BillingAddress_9191": "1 Microsoft Way", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "1033 N Park Ave", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "11, Place Bellecour", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "110 Raeburn Pl", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "113 Lupus St", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "120 S Orange Ave", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "1498 rue Bélanger", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "1600 Amphitheatre Parkway", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "162 E Superior Street", + "Total_8966": 0.99 + }, + { + "BillingAddress_9191": "194A Chain Lake Drive", + "Total_8966": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c90e6b8b284bee54/request.json b/test-snapshots/query/c90e6b8b284bee54/request.json new file mode 100644 index 0000000..a4e2cb6 --- /dev/null +++ b/test-snapshots/query/c90e6b8b284bee54/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_9191": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "Total_8966": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c91d613141c77b00/expected.json b/test-snapshots/query/c91d613141c77b00/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c91d613141c77b00/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c91d613141c77b00/request.json b/test-snapshots/query/c91d613141c77b00/request.json new file mode 100644 index 0000000..8a52e9e --- /dev/null +++ b/test-snapshots/query/c91d613141c77b00/request.json @@ -0,0 +1,156 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c931335abb797579/expected.json b/test-snapshots/query/c931335abb797579/expected.json new file mode 100644 index 0000000..a9905e7 --- /dev/null +++ b/test-snapshots/query/c931335abb797579/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_5468": 347, + "ArtistId_0727": 275, + "Title_5827": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_5468": 346, + "ArtistId_0727": 274, + "Title_5827": "Mozart: Chamber Music" + }, + { + "AlbumId_5468": 345, + "ArtistId_0727": 273, + "Title_5827": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_5468": 344, + "ArtistId_0727": 272, + "Title_5827": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_5468": 342, + "ArtistId_0727": 271, + "Title_5827": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_5468": 341, + "ArtistId_0727": 270, + "Title_5827": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_5468": 340, + "ArtistId_0727": 269, + "Title_5827": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_5468": 339, + "ArtistId_0727": 268, + "Title_5827": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_5468": 338, + "ArtistId_0727": 267, + "Title_5827": "Nielsen: The Six Symphonies" + }, + { + "AlbumId_5468": 337, + "ArtistId_0727": 266, + "Title_5827": "Szymanowski: Piano Works, Vol. 1" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c931335abb797579/request.json b/test-snapshots/query/c931335abb797579/request.json new file mode 100644 index 0000000..2f24cd6 --- /dev/null +++ b/test-snapshots/query/c931335abb797579/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_5468": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_0727": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_5827": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c9480aeb82caf416/expected.json b/test-snapshots/query/c9480aeb82caf416/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c9480aeb82caf416/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c9480aeb82caf416/request.json b/test-snapshots/query/c9480aeb82caf416/request.json new file mode 100644 index 0000000..ed12a74 --- /dev/null +++ b/test-snapshots/query/c9480aeb82caf416/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c97be0354e1c3a96/expected.json b/test-snapshots/query/c97be0354e1c3a96/expected.json new file mode 100644 index 0000000..8e83bc8 --- /dev/null +++ b/test-snapshots/query/c97be0354e1c3a96/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c97be0354e1c3a96/request.json b/test-snapshots/query/c97be0354e1c3a96/request.json new file mode 100644 index 0000000..e812f2e --- /dev/null +++ b/test-snapshots/query/c97be0354e1c3a96/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c985916d90a92865/expected.json b/test-snapshots/query/c985916d90a92865/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c985916d90a92865/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c985916d90a92865/request.json b/test-snapshots/query/c985916d90a92865/request.json new file mode 100644 index 0000000..b573945 --- /dev/null +++ b/test-snapshots/query/c985916d90a92865/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tucson" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tremblay" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/c9c7a5f22f75b75/expected.json b/test-snapshots/query/c9c7a5f22f75b75/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c9c7a5f22f75b75/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c9c7a5f22f75b75/request.json b/test-snapshots/query/c9c7a5f22f75b75/request.json new file mode 100644 index 0000000..b454cdb --- /dev/null +++ b/test-snapshots/query/c9c7a5f22f75b75/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Delhi" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "India" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 0131 315 3300" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/c9eeb59143e186bf/expected.json b/test-snapshots/query/c9eeb59143e186bf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/c9eeb59143e186bf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/c9eeb59143e186bf/request.json b/test-snapshots/query/c9eeb59143e186bf/request.json new file mode 100644 index 0000000..8dd6ef7 --- /dev/null +++ b/test-snapshots/query/c9eeb59143e186bf/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ca01ba6d249e4b92/expected.json b/test-snapshots/query/ca01ba6d249e4b92/expected.json new file mode 100644 index 0000000..e5977aa --- /dev/null +++ b/test-snapshots/query/ca01ba6d249e4b92/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_4751": 183, + "Bytes_7586": 9147563, + "Composer_5908": "Wright, Waters", + "GenreId_0535": 1, + "MediaTypeId_8559": 1, + "Milliseconds_1628": 284055, + "Name_1930": "The Great Gig In The Sky", + "TrackId_4263": 2232, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 281, + "Bytes_7586": 5760129, + "Composer_5908": "Wolfgang Amadeus Mozart", + "GenreId_0535": 24, + "MediaTypeId_8559": 2, + "Milliseconds_1628": 348971, + "Name_1930": "\"Eine Kleine Nachtmusik\" Serenade In G, K. 525: I. Allegro", + "TrackId_4263": 3412, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 282, + "Bytes_7586": 6474980, + "Composer_5908": "Wolfgang Amadeus Mozart", + "GenreId_0535": 24, + "MediaTypeId_8559": 2, + "Milliseconds_1628": 394482, + "Name_1930": "Concerto for Clarinet in A Major, K. 622: II. Adagio", + "TrackId_4263": 3413, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 317, + "Bytes_7586": 2861468, + "Composer_5908": "Wolfgang Amadeus Mozart", + "GenreId_0535": 25, + "MediaTypeId_8559": 2, + "Milliseconds_1628": 174813, + "Name_1930": "Die Zauberflöte, K.620: \"Der Hölle Rache Kocht in Meinem Herze\"", + "TrackId_4263": 3451, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 320, + "Bytes_7586": 6173269, + "Composer_5908": "Wolfgang Amadeus Mozart", + "GenreId_0535": 24, + "MediaTypeId_8559": 2, + "Milliseconds_1628": 362933, + "Name_1930": "Symphony No. 41 in C Major, K. 551, \"Jupiter\": IV. Molto allegro", + "TrackId_4263": 3454, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 346, + "Bytes_7586": 3665114, + "Composer_5908": "Wolfgang Amadeus Mozart", + "GenreId_0535": 24, + "MediaTypeId_8559": 2, + "Milliseconds_1628": 221331, + "Name_1930": "Quintet for Horn, Violin, 2 Violas, and Cello in E Flat Major, K. 407/386c: III. Allegro", + "TrackId_4263": 3502, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 214, + "Bytes_7586": 7035636, + "Composer_5908": "Willie Dixon, C. Burnett", + "GenreId_0535": 1, + "MediaTypeId_8559": 1, + "Milliseconds_1628": 214360, + "Name_1930": "Back Door Man", + "TrackId_4263": 2645, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 128, + "Bytes_7586": 8437098, + "Composer_5908": "Willie Dixon", + "GenreId_0535": 1, + "MediaTypeId_8559": 1, + "Milliseconds_1628": 258168, + "Name_1930": "I Can't Quit You Baby", + "TrackId_4263": 1589, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 132, + "Bytes_7586": 9252733, + "Composer_5908": "Willie Dixon", + "GenreId_0535": 1, + "MediaTypeId_8559": 1, + "Milliseconds_1628": 282671, + "Name_1930": "I Can't Quit You Baby", + "TrackId_4263": 1625, + "UnitPrice_4859": 0.99 + }, + { + "AlbumId_4751": 20, + "Bytes_7586": 4459946, + "Composer_5908": "Willie Dixon", + "GenreId_0535": 6, + "MediaTypeId_8559": 1, + "Milliseconds_1628": 135053, + "Name_1930": "Too Many Ways (Alternate)", + "TrackId_4263": 203, + "UnitPrice_4859": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ca01ba6d249e4b92/request.json b/test-snapshots/query/ca01ba6d249e4b92/request.json new file mode 100644 index 0000000..c188ece --- /dev/null +++ b/test-snapshots/query/ca01ba6d249e4b92/request.json @@ -0,0 +1,67 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_4751": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7586": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_5908": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_0535": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_8559": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_1628": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_1930": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_4263": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_4859": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ca1f1e17f0559b99/expected.json b/test-snapshots/query/ca1f1e17f0559b99/expected.json new file mode 100644 index 0000000..7d10553 --- /dev/null +++ b/test-snapshots/query/ca1f1e17f0559b99/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "Klanova 9/506", + "BillingCity": "Prague", + "BillingCountry": "Czech Republic", + "BillingPostalCode": "14700", + "BillingState": null, + "CustomerId": 5, + "InvoiceDate": "2010-03-12", + "InvoiceId": 100, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ca1f1e17f0559b99/request.json b/test-snapshots/query/ca1f1e17f0559b99/request.json new file mode 100644 index 0000000..403b01f --- /dev/null +++ b/test-snapshots/query/ca1f1e17f0559b99/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ca53bc009fa608c9/expected.json b/test-snapshots/query/ca53bc009fa608c9/expected.json new file mode 100644 index 0000000..87418cd --- /dev/null +++ b/test-snapshots/query/ca53bc009fa608c9/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_6992": 1, + "Name_3413": "AC/DC" + }, + { + "ArtistId_6992": 2, + "Name_3413": "Accept" + }, + { + "ArtistId_6992": 3, + "Name_3413": "Aerosmith" + }, + { + "ArtistId_6992": 4, + "Name_3413": "Alanis Morissette" + }, + { + "ArtistId_6992": 5, + "Name_3413": "Alice In Chains" + }, + { + "ArtistId_6992": 6, + "Name_3413": "Antônio Carlos Jobim" + }, + { + "ArtistId_6992": 7, + "Name_3413": "Apocalyptica" + }, + { + "ArtistId_6992": 8, + "Name_3413": "Audioslave" + }, + { + "ArtistId_6992": 9, + "Name_3413": "BackBeat" + }, + { + "ArtistId_6992": 10, + "Name_3413": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ca53bc009fa608c9/request.json b/test-snapshots/query/ca53bc009fa608c9/request.json new file mode 100644 index 0000000..da26b34 --- /dev/null +++ b/test-snapshots/query/ca53bc009fa608c9/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_6992": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_3413": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ca74c55928ffbe03/expected.json b/test-snapshots/query/ca74c55928ffbe03/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/ca74c55928ffbe03/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ca74c55928ffbe03/request.json b/test-snapshots/query/ca74c55928ffbe03/request.json new file mode 100644 index 0000000..c37594f --- /dev/null +++ b/test-snapshots/query/ca74c55928ffbe03/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ca7edd52e7355ddb/expected.json b/test-snapshots/query/ca7edd52e7355ddb/expected.json new file mode 100644 index 0000000..e601c7d --- /dev/null +++ b/test-snapshots/query/ca7edd52e7355ddb/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_4823": 1, + "TrackId_0086": 1 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 2 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 3 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 4 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 5 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 6 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 7 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 8 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 9 + }, + { + "PlaylistId_4823": 1, + "TrackId_0086": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ca7edd52e7355ddb/request.json b/test-snapshots/query/ca7edd52e7355ddb/request.json new file mode 100644 index 0000000..5e8a708 --- /dev/null +++ b/test-snapshots/query/ca7edd52e7355ddb/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_4823": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_0086": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cac8eefa3073e61c/expected.json b/test-snapshots/query/cac8eefa3073e61c/expected.json new file mode 100644 index 0000000..fc9707f --- /dev/null +++ b/test-snapshots/query/cac8eefa3073e61c/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cac8eefa3073e61c/request.json b/test-snapshots/query/cac8eefa3073e61c/request.json new file mode 100644 index 0000000..6b42aef --- /dev/null +++ b/test-snapshots/query/cac8eefa3073e61c/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cb10404b3aac81db/expected.json b/test-snapshots/query/cb10404b3aac81db/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/cb10404b3aac81db/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb10404b3aac81db/request.json b/test-snapshots/query/cb10404b3aac81db/request.json new file mode 100644 index 0000000..e4b671b --- /dev/null +++ b/test-snapshots/query/cb10404b3aac81db/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tim" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cb46c99f9d6f5b79/expected.json b/test-snapshots/query/cb46c99f9d6f5b79/expected.json new file mode 100644 index 0000000..333755a --- /dev/null +++ b/test-snapshots/query/cb46c99f9d6f5b79/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 12, + "Name": "Easy Listening" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb46c99f9d6f5b79/request.json b/test-snapshots/query/cb46c99f9d6f5b79/request.json new file mode 100644 index 0000000..1f02512 --- /dev/null +++ b/test-snapshots/query/cb46c99f9d6f5b79/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cb494ca6582258f8/expected.json b/test-snapshots/query/cb494ca6582258f8/expected.json new file mode 100644 index 0000000..bd32036 --- /dev/null +++ b/test-snapshots/query/cb494ca6582258f8/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Address_1293": "11120 Jasper Ave NW", + "City_9781": "Edmonton", + "Fax_8166": "+1 (780) 428-3457" + }, + { + "Address_1293": "825 8 Ave SW", + "City_9781": "Calgary", + "Fax_8166": "+1 (403) 262-3322" + }, + { + "Address_1293": "1111 6 Ave SW", + "City_9781": "Calgary", + "Fax_8166": "+1 (403) 262-6712" + }, + { + "Address_1293": "683 10 Street SW", + "City_9781": "Calgary", + "Fax_8166": "+1 (403) 263-4289" + }, + { + "Address_1293": "7727B 41 Ave", + "City_9781": "Calgary", + "Fax_8166": "1 (780) 836-9543" + }, + { + "Address_1293": "5827 Bowness Road NW", + "City_9781": "Calgary", + "Fax_8166": "+1 (403) 246-9899" + }, + { + "Address_1293": "590 Columbia Boulevard West", + "City_9781": "Lethbridge", + "Fax_8166": "+1 (403) 456-8485" + }, + { + "Address_1293": "923 7 ST NW", + "City_9781": "Lethbridge", + "Fax_8166": "+1 (403) 467-8772" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb494ca6582258f8/request.json b/test-snapshots/query/cb494ca6582258f8/request.json new file mode 100644 index 0000000..bc842d7 --- /dev/null +++ b/test-snapshots/query/cb494ca6582258f8/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_1293": { + "type": "column", + "column": "Address", + "fields": null + }, + "Fax_8166": { + "type": "column", + "column": "Fax", + "fields": null + }, + "City_9781": { + "type": "column", + "column": "City", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Fax", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cb6310d3256ee6f2/expected.json b/test-snapshots/query/cb6310d3256ee6f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cb6310d3256ee6f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb6310d3256ee6f2/request.json b/test-snapshots/query/cb6310d3256ee6f2/request.json new file mode 100644 index 0000000..63f86c1 --- /dev/null +++ b/test-snapshots/query/cb6310d3256ee6f2/request.json @@ -0,0 +1,157 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edmonton" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Margaret" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-3351" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cb798c1bd055b3ab/expected.json b/test-snapshots/query/cb798c1bd055b3ab/expected.json new file mode 100644 index 0000000..93bccce --- /dev/null +++ b/test-snapshots/query/cb798c1bd055b3ab/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "Quantity_median_5294": 1, + "TrackId_avg_7957": 1717.734375, + "UnitPrice_avg_9069": 1.039553571, + "UnitPrice_max_6810": 1.99, + "UnitPrice_sum_6405": 2328.6 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb798c1bd055b3ab/request.json b/test-snapshots/query/cb798c1bd055b3ab/request.json new file mode 100644 index 0000000..6ee6330 --- /dev/null +++ b/test-snapshots/query/cb798c1bd055b3ab/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "UnitPrice_max_6810": { + "type": "single_column", + "column": "UnitPrice", + "function": "max" + }, + "Quantity_median_5294": { + "type": "single_column", + "column": "Quantity", + "function": "median" + }, + "TrackId_avg_7957": { + "type": "single_column", + "column": "TrackId", + "function": "avg" + }, + "UnitPrice_avg_9069": { + "type": "single_column", + "column": "UnitPrice", + "function": "avg" + }, + "UnitPrice_sum_6405": { + "type": "single_column", + "column": "UnitPrice", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cb822d9797dccacb/expected.json b/test-snapshots/query/cb822d9797dccacb/expected.json new file mode 100644 index 0000000..8d41e0e --- /dev/null +++ b/test-snapshots/query/cb822d9797dccacb/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_7918": 18, + "TrackId_3323": 597 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 3290 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 2096 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 2095 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 2094 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 1984 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 1945 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 1942 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 1880 + }, + { + "PlaylistId_7918": 17, + "TrackId_3323": 1876 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb822d9797dccacb/request.json b/test-snapshots/query/cb822d9797dccacb/request.json new file mode 100644 index 0000000..131577c --- /dev/null +++ b/test-snapshots/query/cb822d9797dccacb/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_7918": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_3323": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cb8f6f32c21bf227/expected.json b/test-snapshots/query/cb8f6f32c21bf227/expected.json new file mode 100644 index 0000000..c09678e --- /dev/null +++ b/test-snapshots/query/cb8f6f32c21bf227/expected.json @@ -0,0 +1,72 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5881293, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 175333, + "Name": "Amor De Muito", + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7960868, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 240091, + "Name": "Sobremesa", + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb8f6f32c21bf227/request.json b/test-snapshots/query/cb8f6f32c21bf227/request.json new file mode 100644 index 0000000..3df3765 --- /dev/null +++ b/test-snapshots/query/cb8f6f32c21bf227/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cb9517a4482373fe/expected.json b/test-snapshots/query/cb9517a4482373fe/expected.json new file mode 100644 index 0000000..86224e6 --- /dev/null +++ b/test-snapshots/query/cb9517a4482373fe/expected.json @@ -0,0 +1,12 @@ +[ + { + "aggregates": { + "AlbumId_count": 347, + "AlbumId_distinct_count": 347, + "ArtistId_count": 347, + "ArtistId_distinct_count": 204, + "Title_count": 347, + "Title_distinct_count": 346 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/cb9517a4482373fe/request.json b/test-snapshots/query/cb9517a4482373fe/request.json new file mode 100644 index 0000000..b86a61d --- /dev/null +++ b/test-snapshots/query/cb9517a4482373fe/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Album", + "query": { + "aggregates": { + "AlbumId_count": { + "type": "column_count", + "column": "AlbumId", + "distinct": false + }, + "AlbumId_distinct_count": { + "type": "column_count", + "column": "AlbumId", + "distinct": true + }, + "ArtistId_count": { + "type": "column_count", + "column": "ArtistId", + "distinct": false + }, + "ArtistId_distinct_count": { + "type": "column_count", + "column": "ArtistId", + "distinct": true + }, + "Title_count": { + "type": "column_count", + "column": "Title", + "distinct": false + }, + "Title_distinct_count": { + "type": "column_count", + "column": "Title", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cbbcf0ad43eeba62/expected.json b/test-snapshots/query/cbbcf0ad43eeba62/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cbbcf0ad43eeba62/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cbbcf0ad43eeba62/request.json b/test-snapshots/query/cbbcf0ad43eeba62/request.json new file mode 100644 index 0000000..f2a5701 --- /dev/null +++ b/test-snapshots/query/cbbcf0ad43eeba62/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cbdc5e5cda384f55/expected.json b/test-snapshots/query/cbdc5e5cda384f55/expected.json new file mode 100644 index 0000000..485222c --- /dev/null +++ b/test-snapshots/query/cbdc5e5cda384f55/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cbdc5e5cda384f55/request.json b/test-snapshots/query/cbdc5e5cda384f55/request.json new file mode 100644 index 0000000..cbe97ac --- /dev/null +++ b/test-snapshots/query/cbdc5e5cda384f55/request.json @@ -0,0 +1,144 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Manager" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cbdec9a86cfd8a04/expected.json b/test-snapshots/query/cbdec9a86cfd8a04/expected.json new file mode 100644 index 0000000..4c58de8 --- /dev/null +++ b/test-snapshots/query/cbdec9a86cfd8a04/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "LastName_1362": "Johnson", + "Phone_7810": "1 (780) 836-9987", + "State_1357": "AB" + }, + { + "LastName_1362": "Park", + "Phone_7810": "+1 (403) 263-4423", + "State_1357": "AB" + }, + { + "LastName_1362": "Peacock", + "Phone_7810": "+1 (403) 262-3443", + "State_1357": "AB" + }, + { + "LastName_1362": "Edwards", + "Phone_7810": "+1 (403) 262-3443", + "State_1357": "AB" + }, + { + "LastName_1362": "Callahan", + "Phone_7810": "+1 (403) 467-3351", + "State_1357": "AB" + }, + { + "LastName_1362": "King", + "Phone_7810": "+1 (403) 456-9986", + "State_1357": "AB" + }, + { + "LastName_1362": "Mitchell", + "Phone_7810": "+1 (403) 246-9887", + "State_1357": "AB" + }, + { + "LastName_1362": "Adams", + "Phone_7810": "+1 (780) 428-9482", + "State_1357": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cbdec9a86cfd8a04/request.json b/test-snapshots/query/cbdec9a86cfd8a04/request.json new file mode 100644 index 0000000..0d6b6f0 --- /dev/null +++ b/test-snapshots/query/cbdec9a86cfd8a04/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "LastName_1362": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_7810": { + "type": "column", + "column": "Phone", + "fields": null + }, + "State_1357": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cbfe6c224d307376/expected.json b/test-snapshots/query/cbfe6c224d307376/expected.json new file mode 100644 index 0000000..78a64db --- /dev/null +++ b/test-snapshots/query/cbfe6c224d307376/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "GenreId_4031": 1 + }, + { + "GenreId_4031": 2 + }, + { + "GenreId_4031": 3 + }, + { + "GenreId_4031": 4 + }, + { + "GenreId_4031": 5 + }, + { + "GenreId_4031": 6 + }, + { + "GenreId_4031": 7 + }, + { + "GenreId_4031": 8 + }, + { + "GenreId_4031": 9 + }, + { + "GenreId_4031": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cbfe6c224d307376/request.json b/test-snapshots/query/cbfe6c224d307376/request.json new file mode 100644 index 0000000..86bbb9b --- /dev/null +++ b/test-snapshots/query/cbfe6c224d307376/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_4031": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cc02e2ca8d3b83e0/expected.json b/test-snapshots/query/cc02e2ca8d3b83e0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cc02e2ca8d3b83e0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cc02e2ca8d3b83e0/request.json b/test-snapshots/query/cc02e2ca8d3b83e0/request.json new file mode 100644 index 0000000..024d512 --- /dev/null +++ b/test-snapshots/query/cc02e2ca8d3b83e0/request.json @@ -0,0 +1,152 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1973-08-29" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cc0823b2f314f521/expected.json b/test-snapshots/query/cc0823b2f314f521/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/cc0823b2f314f521/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cc0823b2f314f521/request.json b/test-snapshots/query/cc0823b2f314f521/request.json new file mode 100644 index 0000000..dd6df6c --- /dev/null +++ b/test-snapshots/query/cc0823b2f314f521/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock (We Salute You)" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cc0e4e3d988a3826/expected.json b/test-snapshots/query/cc0e4e3d988a3826/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/cc0e4e3d988a3826/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cc0e4e3d988a3826/request.json b/test-snapshots/query/cc0e4e3d988a3826/request.json new file mode 100644 index 0000000..cb6bb1a --- /dev/null +++ b/test-snapshots/query/cc0e4e3d988a3826/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cc8972034da46206/expected.json b/test-snapshots/query/cc8972034da46206/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cc8972034da46206/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cc8972034da46206/request.json b/test-snapshots/query/cc8972034da46206/request.json new file mode 100644 index 0000000..e97976f --- /dev/null +++ b/test-snapshots/query/cc8972034da46206/request.json @@ -0,0 +1,121 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cc959d740977e39f/expected.json b/test-snapshots/query/cc959d740977e39f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cc959d740977e39f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cc959d740977e39f/request.json b/test-snapshots/query/cc959d740977e39f/request.json new file mode 100644 index 0000000..cc1d100 --- /dev/null +++ b/test-snapshots/query/cc959d740977e39f/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 (780) 836-9543" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Manager" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cc9e06a1bd3e7764/expected.json b/test-snapshots/query/cc9e06a1bd3e7764/expected.json new file mode 100644 index 0000000..a7b5c47 --- /dev/null +++ b/test-snapshots/query/cc9e06a1bd3e7764/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2009-04-22", + "InvoiceId_2328": 27 + }, + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2010-10-14", + "InvoiceId_2328": 148 + }, + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2010-11-24", + "InvoiceId_2328": 159 + }, + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2011-07-25", + "InvoiceId_2328": 214 + }, + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2013-02-28", + "InvoiceId_2328": 343 + }, + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2013-06-02", + "InvoiceId_2328": 366 + }, + { + "BillingAddress_4423": "5112 48 Street", + "BillingCity_6459": "Yellowknife", + "BillingPostalCode_0291": "X1A 1N6", + "CustomerId_6646": 33, + "InvoiceDate_4574": "2013-09-04", + "InvoiceId_2328": 388 + }, + { + "BillingAddress_4423": "700 W Pender Street", + "BillingCity_6459": "Vancouver", + "BillingPostalCode_0291": "V6C 1G8", + "CustomerId_6646": 15, + "InvoiceDate_4574": "2009-06-05", + "InvoiceId_2328": 36 + }, + { + "BillingAddress_4423": "700 W Pender Street", + "BillingCity_6459": "Vancouver", + "BillingPostalCode_0291": "V6C 1G8", + "CustomerId_6646": 15, + "InvoiceDate_4574": "2009-07-16", + "InvoiceId_2328": 47 + }, + { + "BillingAddress_4423": "700 W Pender Street", + "BillingCity_6459": "Vancouver", + "BillingPostalCode_0291": "V6C 1G8", + "CustomerId_6646": 15, + "InvoiceDate_4574": "2010-03-16", + "InvoiceId_2328": 102 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cc9e06a1bd3e7764/request.json b/test-snapshots/query/cc9e06a1bd3e7764/request.json new file mode 100644 index 0000000..56fb25a --- /dev/null +++ b/test-snapshots/query/cc9e06a1bd3e7764/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_4423": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_6459": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "InvoiceId_2328": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "BillingPostalCode_0291": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "InvoiceDate_4574": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "CustomerId_6646": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ccc184a319d78ac4/expected.json b/test-snapshots/query/ccc184a319d78ac4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ccc184a319d78ac4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ccc184a319d78ac4/request.json b/test-snapshots/query/ccc184a319d78ac4/request.json new file mode 100644 index 0000000..181317a --- /dev/null +++ b/test-snapshots/query/ccc184a319d78ac4/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8817038 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cced0adc0b324cbf/expected.json b/test-snapshots/query/cced0adc0b324cbf/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/cced0adc0b324cbf/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cced0adc0b324cbf/request.json b/test-snapshots/query/cced0adc0b324cbf/request.json new file mode 100644 index 0000000..d0479f3 --- /dev/null +++ b/test-snapshots/query/cced0adc0b324cbf/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7636561 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ccf0477e9cd6672c/expected.json b/test-snapshots/query/ccf0477e9cd6672c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ccf0477e9cd6672c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ccf0477e9cd6672c/request.json b/test-snapshots/query/ccf0477e9cd6672c/request.json new file mode 100644 index 0000000..f5b23b0 --- /dev/null +++ b/test-snapshots/query/ccf0477e9cd6672c/request.json @@ -0,0 +1,132 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Robert" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cd1819385d3061bd/expected.json b/test-snapshots/query/cd1819385d3061bd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cd1819385d3061bd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cd1819385d3061bd/request.json b/test-snapshots/query/cd1819385d3061bd/request.json new file mode 100644 index 0000000..cd162f7 --- /dev/null +++ b/test-snapshots/query/cd1819385d3061bd/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1968-01-09" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cd2a58d05dd18765/expected.json b/test-snapshots/query/cd2a58d05dd18765/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cd2a58d05dd18765/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cd2a58d05dd18765/request.json b/test-snapshots/query/cd2a58d05dd18765/request.json new file mode 100644 index 0000000..3641d27 --- /dev/null +++ b/test-snapshots/query/cd2a58d05dd18765/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "steve@chinookcorp.com" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Sales Support Agent" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cd38bef19994d385/expected.json b/test-snapshots/query/cd38bef19994d385/expected.json new file mode 100644 index 0000000..2ce6e95 --- /dev/null +++ b/test-snapshots/query/cd38bef19994d385/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cd38bef19994d385/request.json b/test-snapshots/query/cd38bef19994d385/request.json new file mode 100644 index 0000000..2aeabe6 --- /dev/null +++ b/test-snapshots/query/cd38bef19994d385/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 210 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cd628e1b383ad34/expected.json b/test-snapshots/query/cd628e1b383ad34/expected.json new file mode 100644 index 0000000..0cc5350 --- /dev/null +++ b/test-snapshots/query/cd628e1b383ad34/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 26, + "InvoiceLineId": 136, + "Quantity": 1, + "TrackId": 795, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 137, + "Quantity": 1, + "TrackId": 804, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 138, + "Quantity": 1, + "TrackId": 813, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 139, + "Quantity": 1, + "TrackId": 822, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 140, + "Quantity": 1, + "TrackId": 831, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 141, + "Quantity": 1, + "TrackId": 840, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 142, + "Quantity": 1, + "TrackId": 849, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 143, + "Quantity": 1, + "TrackId": 858, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 144, + "Quantity": 1, + "TrackId": 867, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 26, + "InvoiceLineId": 145, + "Quantity": 1, + "TrackId": 876, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cd628e1b383ad34/request.json b/test-snapshots/query/cd628e1b383ad34/request.json new file mode 100644 index 0000000..ae1a253 --- /dev/null +++ b/test-snapshots/query/cd628e1b383ad34/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 26 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cd6aea49719c5fa9/expected.json b/test-snapshots/query/cd6aea49719c5fa9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cd6aea49719c5fa9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cd6aea49719c5fa9/request.json b/test-snapshots/query/cd6aea49719c5fa9/request.json new file mode 100644 index 0000000..78aaf6b --- /dev/null +++ b/test-snapshots/query/cd6aea49719c5fa9/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Rock" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cd72fd1ddaad0dfe/expected.json b/test-snapshots/query/cd72fd1ddaad0dfe/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/cd72fd1ddaad0dfe/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cd72fd1ddaad0dfe/request.json b/test-snapshots/query/cd72fd1ddaad0dfe/request.json new file mode 100644 index 0000000..b7fff0a --- /dev/null +++ b/test-snapshots/query/cd72fd1ddaad0dfe/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cda3fb3c08820900/expected.json b/test-snapshots/query/cda3fb3c08820900/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/cda3fb3c08820900/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cda3fb3c08820900/request.json b/test-snapshots/query/cda3fb3c08820900/request.json new file mode 100644 index 0000000..7b86a73 --- /dev/null +++ b/test-snapshots/query/cda3fb3c08820900/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cdadb84420170d9e/expected.json b/test-snapshots/query/cdadb84420170d9e/expected.json new file mode 100644 index 0000000..8726d6e --- /dev/null +++ b/test-snapshots/query/cdadb84420170d9e/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Classical", + "PlaylistId": 12 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cdadb84420170d9e/request.json b/test-snapshots/query/cdadb84420170d9e/request.json new file mode 100644 index 0000000..1f771d3 --- /dev/null +++ b/test-snapshots/query/cdadb84420170d9e/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cdee99b01b652741/expected.json b/test-snapshots/query/cdee99b01b652741/expected.json new file mode 100644 index 0000000..2978254 --- /dev/null +++ b/test-snapshots/query/cdee99b01b652741/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "AlbumId_5274": 200, + "Bytes_8895": 38747, + "GenreId_4645": 1, + "Milliseconds_2683": 1071, + "Name_3805": "É Uma Partida De Futebol", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 18, + "Bytes_8895": 161266, + "GenreId_4645": 4, + "Milliseconds_2683": 4884, + "Name_3805": "Now Sports", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 18, + "Bytes_8895": 211997, + "GenreId_4645": 4, + "Milliseconds_2683": 6373, + "Name_3805": "A Statistic", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 18, + "Bytes_8895": 224313, + "GenreId_4645": 4, + "Milliseconds_2683": 6635, + "Name_3805": "Oprah", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 258, + "Bytes_8895": 319888, + "GenreId_4645": 17, + "Milliseconds_2683": 7941, + "Name_3805": "Commercial 1", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 18, + "Bytes_8895": 387360, + "GenreId_4645": 4, + "Milliseconds_2683": 11650, + "Name_3805": "The Real Problem", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 258, + "Bytes_8895": 850698, + "GenreId_4645": 17, + "Milliseconds_2683": 21211, + "Name_3805": "Commercial 2", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 184, + "Bytes_8895": 967098, + "GenreId_4645": 17, + "Milliseconds_2683": 29048, + "Name_3805": "Bossa", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 85, + "Bytes_8895": 1039615, + "GenreId_4645": 10, + "Milliseconds_2683": 32287, + "Name_3805": "Casinha Feliz", + "UnitPrice_6829": 0.99 + }, + { + "AlbumId_5274": 24, + "Bytes_8895": 1103013, + "GenreId_4645": 7, + "Milliseconds_2683": 33149, + "Name_3805": "Mateus Enter", + "UnitPrice_6829": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cdee99b01b652741/request.json b/test-snapshots/query/cdee99b01b652741/request.json new file mode 100644 index 0000000..375ed7b --- /dev/null +++ b/test-snapshots/query/cdee99b01b652741/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_5274": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_8895": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "UnitPrice_6829": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "GenreId_4645": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_3805": { + "type": "column", + "column": "Name", + "fields": null + }, + "Milliseconds_2683": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cdf1101a713cf336/expected.json b/test-snapshots/query/cdf1101a713cf336/expected.json new file mode 100644 index 0000000..bcf0cf7 --- /dev/null +++ b/test-snapshots/query/cdf1101a713cf336/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cdf1101a713cf336/request.json b/test-snapshots/query/cdf1101a713cf336/request.json new file mode 100644 index 0000000..ffd273e --- /dev/null +++ b/test-snapshots/query/cdf1101a713cf336/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ce01bc4036a98704/expected.json b/test-snapshots/query/ce01bc4036a98704/expected.json new file mode 100644 index 0000000..c64f946 --- /dev/null +++ b/test-snapshots/query/ce01bc4036a98704/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ce01bc4036a98704/request.json b/test-snapshots/query/ce01bc4036a98704/request.json new file mode 100644 index 0000000..a0a7910 --- /dev/null +++ b/test-snapshots/query/ce01bc4036a98704/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ce18f34828dbec3c/expected.json b/test-snapshots/query/ce18f34828dbec3c/expected.json new file mode 100644 index 0000000..88cd271 --- /dev/null +++ b/test-snapshots/query/ce18f34828dbec3c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Av. Brigadeiro Faria Lima, 2170" + }, + { + "BillingAddress_4437": "Theodor-Heuss-Straße 34" + }, + { + "BillingAddress_4437": "Theodor-Heuss-Straße 34" + }, + { + "BillingAddress_4437": "Theodor-Heuss-Straße 34" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ce18f34828dbec3c/request.json b/test-snapshots/query/ce18f34828dbec3c/request.json new file mode 100644 index 0000000..2e2985c --- /dev/null +++ b/test-snapshots/query/ce18f34828dbec3c/request.json @@ -0,0 +1,43 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_4437": { + "type": "column", + "column": "BillingAddress", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ce340fab3cb15614/expected.json b/test-snapshots/query/ce340fab3cb15614/expected.json new file mode 100644 index 0000000..5b41551 --- /dev/null +++ b/test-snapshots/query/ce340fab3cb15614/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ce340fab3cb15614/request.json b/test-snapshots/query/ce340fab3cb15614/request.json new file mode 100644 index 0000000..f412ddd --- /dev/null +++ b/test-snapshots/query/ce340fab3cb15614/request.json @@ -0,0 +1,127 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 255 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ce9e6582a6a8c270/expected.json b/test-snapshots/query/ce9e6582a6a8c270/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/ce9e6582a6a8c270/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ce9e6582a6a8c270/request.json b/test-snapshots/query/ce9e6582a6a8c270/request.json new file mode 100644 index 0000000..8557079 --- /dev/null +++ b/test-snapshots/query/ce9e6582a6a8c270/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 264 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cea364ab0f420add/expected.json b/test-snapshots/query/cea364ab0f420add/expected.json new file mode 100644 index 0000000..e881554 --- /dev/null +++ b/test-snapshots/query/cea364ab0f420add/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 6877994, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 209684, + "Name": "Miracle", + "TrackId": 1001, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cea364ab0f420add/request.json b/test-snapshots/query/cea364ab0f420add/request.json new file mode 100644 index 0000000..e8873b4 --- /dev/null +++ b/test-snapshots/query/cea364ab0f420add/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1001 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ced30d169359d97e/expected.json b/test-snapshots/query/ced30d169359d97e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ced30d169359d97e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ced30d169359d97e/request.json b/test-snapshots/query/ced30d169359d97e/request.json new file mode 100644 index 0000000..b22559d --- /dev/null +++ b/test-snapshots/query/ced30d169359d97e/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cf31dbf22402a927/expected.json b/test-snapshots/query/cf31dbf22402a927/expected.json new file mode 100644 index 0000000..3512dbd --- /dev/null +++ b/test-snapshots/query/cf31dbf22402a927/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cf31dbf22402a927/request.json b/test-snapshots/query/cf31dbf22402a927/request.json new file mode 100644 index 0000000..ad7bfd0 --- /dev/null +++ b/test-snapshots/query/cf31dbf22402a927/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6852860 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cf7ea211701b83d3/expected.json b/test-snapshots/query/cf7ea211701b83d3/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/cf7ea211701b83d3/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cf7ea211701b83d3/request.json b/test-snapshots/query/cf7ea211701b83d3/request.json new file mode 100644 index 0000000..e6d26ba --- /dev/null +++ b/test-snapshots/query/cf7ea211701b83d3/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cfcd04ad838a7698/expected.json b/test-snapshots/query/cfcd04ad838a7698/expected.json new file mode 100644 index 0000000..3acda97 --- /dev/null +++ b/test-snapshots/query/cfcd04ad838a7698/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cfcd04ad838a7698/request.json b/test-snapshots/query/cfcd04ad838a7698/request.json new file mode 100644 index 0000000..5f2bb12 --- /dev/null +++ b/test-snapshots/query/cfcd04ad838a7698/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 343719 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cfd2dd09a0d209f0/expected.json b/test-snapshots/query/cfd2dd09a0d209f0/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/cfd2dd09a0d209f0/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cfd2dd09a0d209f0/request.json b/test-snapshots/query/cfd2dd09a0d209f0/request.json new file mode 100644 index 0000000..0a53190 --- /dev/null +++ b/test-snapshots/query/cfd2dd09a0d209f0/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/cfd5256bff4599e8/expected.json b/test-snapshots/query/cfd5256bff4599e8/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/cfd5256bff4599e8/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cfd5256bff4599e8/request.json b/test-snapshots/query/cfd5256bff4599e8/request.json new file mode 100644 index 0000000..a6ddb17 --- /dev/null +++ b/test-snapshots/query/cfd5256bff4599e8/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jack" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/cfda4e0d6ec3841a/expected.json b/test-snapshots/query/cfda4e0d6ec3841a/expected.json new file mode 100644 index 0000000..d408c74 --- /dev/null +++ b/test-snapshots/query/cfda4e0d6ec3841a/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_5243": 227, + "Bytes_6467": 1054423946, + "Composer_4191": null, + "GenreId_3299": 19, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 5286953, + "Name_4520": "Occupation / Precipice", + "TrackId_9782": 2820, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 229, + "Bytes_6467": 1059546140, + "Composer_4191": null, + "GenreId_3299": 21, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 5088838, + "Name_4520": "Through a Looking Glass", + "TrackId_9782": 3224, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 536824558, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2960293, + "Name_4520": "Greetings from Earth, Pt. 1", + "TrackId_9782": 3244, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 577829804, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2956998, + "Name_4520": "The Man With Nine Lives", + "TrackId_9782": 3242, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 521387924, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2956081, + "Name_4520": "Battlestar Galactica, Pt. 2", + "TrackId_9782": 3227, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 541359437, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2952702, + "Name_4520": "Battlestar Galactica, Pt. 1", + "TrackId_9782": 3226, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 551759986, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2935894, + "Name_4520": "Murder On the Rising Star", + "TrackId_9782": 3243, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 554509033, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2927802, + "Name_4520": "Battlestar Galactica, Pt. 3", + "TrackId_9782": 3228, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 512381289, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2927677, + "Name_4520": "Take the Celestra", + "TrackId_9782": 3248, + "UnitPrice_4975": 1.99 + }, + { + "AlbumId_5243": 253, + "Bytes_6467": 536784757, + "Composer_4191": null, + "GenreId_3299": 20, + "MediaTypeId_7026": 3, + "Milliseconds_4021": 2926593, + "Name_4520": "Fire In Space", + "TrackId_9782": 3239, + "UnitPrice_4975": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/cfda4e0d6ec3841a/request.json b/test-snapshots/query/cfda4e0d6ec3841a/request.json new file mode 100644 index 0000000..c9ffafc --- /dev/null +++ b/test-snapshots/query/cfda4e0d6ec3841a/request.json @@ -0,0 +1,75 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_5243": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6467": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_4191": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_3299": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_7026": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_4021": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_4520": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_9782": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_4975": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/comparison_relationship/expected.json b/test-snapshots/query/comparison_relationship/expected.json new file mode 100644 index 0000000..73990cb --- /dev/null +++ b/test-snapshots/query/comparison_relationship/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "FirstName": "Aaron" + }, + { + "FirstName": "Alexandre" + }, + { + "FirstName": "Astrid" + }, + { + "FirstName": "Bjørn" + }, + { + "FirstName": "Camille" + }, + { + "FirstName": "Daan" + }, + { + "FirstName": "Dan" + }, + { + "FirstName": "Diego" + }, + { + "FirstName": "Dominique" + }, + { + "FirstName": "Eduardo" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/comparison_relationship/request.json b/test-snapshots/query/comparison_relationship/request.json new file mode 100644 index 0000000..4393f1a --- /dev/null +++ b/test-snapshots/query/comparison_relationship/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [ + { + "relationship": "CustomerToEmployee", + "arguments": {} + }, + { + "relationship": "EmployeeReportsTo", + "arguments": {} + } + ] + }, + "operator": "less", + "value": { + "type": "scalar", + "value": 100 + } + } + }, + "arguments": {}, + "collection_relationships": { + "CustomerToEmployee": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + }, + "EmployeeReportsTo": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d00ce7fcb7ff258b/expected.json b/test-snapshots/query/d00ce7fcb7ff258b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d00ce7fcb7ff258b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d00ce7fcb7ff258b/request.json b/test-snapshots/query/d00ce7fcb7ff258b/request.json new file mode 100644 index 0000000..e6479f4 --- /dev/null +++ b/test-snapshots/query/d00ce7fcb7ff258b/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Staff" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Johnson" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d00e14ec0140a70b/expected.json b/test-snapshots/query/d00e14ec0140a70b/expected.json new file mode 100644 index 0000000..b69d3de --- /dev/null +++ b/test-snapshots/query/d00e14ec0140a70b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1057 + }, + { + "PlaylistId": 1, + "TrackId": 1058 + }, + { + "PlaylistId": 1, + "TrackId": 1059 + }, + { + "PlaylistId": 1, + "TrackId": 1060 + }, + { + "PlaylistId": 1, + "TrackId": 1061 + }, + { + "PlaylistId": 1, + "TrackId": 1062 + }, + { + "PlaylistId": 1, + "TrackId": 1063 + }, + { + "PlaylistId": 1, + "TrackId": 1064 + }, + { + "PlaylistId": 1, + "TrackId": 1066 + }, + { + "PlaylistId": 1, + "TrackId": 1067 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d00e14ec0140a70b/request.json b/test-snapshots/query/d00e14ec0140a70b/request.json new file mode 100644 index 0000000..f560fa3 --- /dev/null +++ b/test-snapshots/query/d00e14ec0140a70b/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d046eb12b985973b/expected.json b/test-snapshots/query/d046eb12b985973b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d046eb12b985973b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d046eb12b985973b/request.json b/test-snapshots/query/d046eb12b985973b/request.json new file mode 100644 index 0000000..78a3a6b --- /dev/null +++ b/test-snapshots/query/d046eb12b985973b/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d05a456c5c76242b/expected.json b/test-snapshots/query/d05a456c5c76242b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d05a456c5c76242b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d05a456c5c76242b/request.json b/test-snapshots/query/d05a456c5c76242b/request.json new file mode 100644 index 0000000..cf83943 --- /dev/null +++ b/test-snapshots/query/d05a456c5c76242b/request.json @@ -0,0 +1,77 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d08dc4ec9157b67f/expected.json b/test-snapshots/query/d08dc4ec9157b67f/expected.json new file mode 100644 index 0000000..063844e --- /dev/null +++ b/test-snapshots/query/d08dc4ec9157b67f/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 6355088, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 193280, + "Name": "Friend Of A Friend", + "TrackId": 1003, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d08dc4ec9157b67f/request.json b/test-snapshots/query/d08dc4ec9157b67f/request.json new file mode 100644 index 0000000..aa36200 --- /dev/null +++ b/test-snapshots/query/d08dc4ec9157b67f/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d08eaf01076ab959/expected.json b/test-snapshots/query/d08eaf01076ab959/expected.json new file mode 100644 index 0000000..e8777f6 --- /dev/null +++ b/test-snapshots/query/d08eaf01076ab959/expected.json @@ -0,0 +1,36 @@ +[ + { + "aggregates": { + "Address_count": 8, + "Address_distinct_count": 8, + "BirthDate_count": 8, + "BirthDate_distinct_count": 8, + "City_count": 8, + "City_distinct_count": 3, + "Country_count": 8, + "Country_distinct_count": 1, + "Email_count": 8, + "Email_distinct_count": 8, + "EmployeeId_count": 8, + "EmployeeId_distinct_count": 8, + "Fax_count": 8, + "Fax_distinct_count": 8, + "FirstName_count": 8, + "FirstName_distinct_count": 8, + "HireDate_count": 8, + "HireDate_distinct_count": 7, + "LastName_count": 8, + "LastName_distinct_count": 8, + "Phone_count": 8, + "Phone_distinct_count": 7, + "PostalCode_count": 8, + "PostalCode_distinct_count": 8, + "ReportsTo_count": 7, + "ReportsTo_distinct_count": 3, + "State_count": 8, + "State_distinct_count": 1, + "Title_count": 8, + "Title_distinct_count": 5 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/d08eaf01076ab959/request.json b/test-snapshots/query/d08eaf01076ab959/request.json new file mode 100644 index 0000000..79bb920 --- /dev/null +++ b/test-snapshots/query/d08eaf01076ab959/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "aggregates": { + "Address_count": { + "type": "column_count", + "column": "Address", + "distinct": false + }, + "Address_distinct_count": { + "type": "column_count", + "column": "Address", + "distinct": true + }, + "BirthDate_count": { + "type": "column_count", + "column": "BirthDate", + "distinct": false + }, + "BirthDate_distinct_count": { + "type": "column_count", + "column": "BirthDate", + "distinct": true + }, + "City_count": { + "type": "column_count", + "column": "City", + "distinct": false + }, + "City_distinct_count": { + "type": "column_count", + "column": "City", + "distinct": true + }, + "Country_count": { + "type": "column_count", + "column": "Country", + "distinct": false + }, + "Country_distinct_count": { + "type": "column_count", + "column": "Country", + "distinct": true + }, + "Email_count": { + "type": "column_count", + "column": "Email", + "distinct": false + }, + "Email_distinct_count": { + "type": "column_count", + "column": "Email", + "distinct": true + }, + "EmployeeId_count": { + "type": "column_count", + "column": "EmployeeId", + "distinct": false + }, + "EmployeeId_distinct_count": { + "type": "column_count", + "column": "EmployeeId", + "distinct": true + }, + "Fax_count": { + "type": "column_count", + "column": "Fax", + "distinct": false + }, + "Fax_distinct_count": { + "type": "column_count", + "column": "Fax", + "distinct": true + }, + "FirstName_count": { + "type": "column_count", + "column": "FirstName", + "distinct": false + }, + "FirstName_distinct_count": { + "type": "column_count", + "column": "FirstName", + "distinct": true + }, + "HireDate_count": { + "type": "column_count", + "column": "HireDate", + "distinct": false + }, + "HireDate_distinct_count": { + "type": "column_count", + "column": "HireDate", + "distinct": true + }, + "LastName_count": { + "type": "column_count", + "column": "LastName", + "distinct": false + }, + "LastName_distinct_count": { + "type": "column_count", + "column": "LastName", + "distinct": true + }, + "Phone_count": { + "type": "column_count", + "column": "Phone", + "distinct": false + }, + "Phone_distinct_count": { + "type": "column_count", + "column": "Phone", + "distinct": true + }, + "PostalCode_count": { + "type": "column_count", + "column": "PostalCode", + "distinct": false + }, + "PostalCode_distinct_count": { + "type": "column_count", + "column": "PostalCode", + "distinct": true + }, + "ReportsTo_count": { + "type": "column_count", + "column": "ReportsTo", + "distinct": false + }, + "ReportsTo_distinct_count": { + "type": "column_count", + "column": "ReportsTo", + "distinct": true + }, + "State_count": { + "type": "column_count", + "column": "State", + "distinct": false + }, + "State_distinct_count": { + "type": "column_count", + "column": "State", + "distinct": true + }, + "Title_count": { + "type": "column_count", + "column": "Title", + "distinct": false + }, + "Title_distinct_count": { + "type": "column_count", + "column": "Title", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d09cb4229d28fccb/expected.json b/test-snapshots/query/d09cb4229d28fccb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d09cb4229d28fccb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d09cb4229d28fccb/request.json b/test-snapshots/query/d09cb4229d28fccb/request.json new file mode 100644 index 0000000..b3905d0 --- /dev/null +++ b/test-snapshots/query/d09cb4229d28fccb/request.json @@ -0,0 +1,106 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (514) 721-4711" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "marc.dubois@hotmail.com" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d0cc4d7d9807e328/expected.json b/test-snapshots/query/d0cc4d7d9807e328/expected.json new file mode 100644 index 0000000..4da8629 --- /dev/null +++ b/test-snapshots/query/d0cc4d7d9807e328/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "City_6692": "Budapest", + "Company_7335": null, + "Country_3479": "Hungary", + "CustomerId_3746": 45, + "Email_3177": "ladislav_kovacs@apple.hu", + "Fax_6538": null, + "FirstName_8760": "Ladislav", + "LastName_6010": "Kovács", + "Phone_5765": null, + "PostalCode_2847": "H-1073", + "State_6475": null, + "SupportRepId_9405": 3 + }, + { + "City_6692": "Winnipeg", + "Company_7335": null, + "Country_3479": "Canada", + "CustomerId_3746": 32, + "Email_3177": "aaronmitchell@yahoo.ca", + "Fax_6538": null, + "FirstName_8760": "Aaron", + "LastName_6010": "Mitchell", + "Phone_5765": "+1 (204) 452-6452", + "PostalCode_2847": "R3L 2B9", + "State_6475": "MB", + "SupportRepId_9405": 4 + }, + { + "City_6692": "New York", + "Company_7335": null, + "Country_3479": "USA", + "CustomerId_3746": 18, + "Email_3177": "michelleb@aol.com", + "Fax_6538": "+1 (212) 221-4679", + "FirstName_8760": "Michelle", + "LastName_6010": "Brooks", + "Phone_5765": "+1 (212) 221-3546", + "PostalCode_2847": "10012-2612", + "State_6475": "NY", + "SupportRepId_9405": 3 + }, + { + "City_6692": "Chicago", + "Company_7335": null, + "Country_3479": "USA", + "CustomerId_3746": 24, + "Email_3177": "fralston@gmail.com", + "Fax_6538": null, + "FirstName_8760": "Frank", + "LastName_6010": "Ralston", + "Phone_5765": "+1 (312) 332-3232", + "PostalCode_2847": "60611", + "State_6475": "IL", + "SupportRepId_9405": 3 + }, + { + "City_6692": "Orlando", + "Company_7335": null, + "Country_3479": "USA", + "CustomerId_3746": 22, + "Email_3177": "hleacock@gmail.com", + "Fax_6538": null, + "FirstName_8760": "Heather", + "LastName_6010": "Leacock", + "Phone_5765": "+1 (407) 999-7788", + "PostalCode_2847": "32801", + "State_6475": "FL", + "SupportRepId_9405": 4 + }, + { + "City_6692": "Cupertino", + "Company_7335": "Apple Inc.", + "Country_3479": "USA", + "CustomerId_3746": 19, + "Email_3177": "tgoyer@apple.com", + "Fax_6538": "+1 (408) 996-1011", + "FirstName_8760": "Tim", + "LastName_6010": "Goyer", + "Phone_5765": "+1 (408) 996-1010", + "PostalCode_2847": "95014", + "State_6475": "CA", + "SupportRepId_9405": 3 + }, + { + "City_6692": "Toronto", + "Company_7335": null, + "Country_3479": "Canada", + "CustomerId_3746": 29, + "Email_3177": "robbrown@shaw.ca", + "Fax_6538": null, + "FirstName_8760": "Robert", + "LastName_6010": "Brown", + "Phone_5765": "+1 (416) 363-8888", + "PostalCode_2847": "M6J 1V1", + "State_6475": "ON", + "SupportRepId_9405": 3 + }, + { + "City_6692": "Redmond", + "Company_7335": "Microsoft Corporation", + "Country_3479": "USA", + "CustomerId_3746": 17, + "Email_3177": "jacksmith@microsoft.com", + "Fax_6538": "+1 (425) 882-8081", + "FirstName_8760": "Jack", + "LastName_6010": "Smith", + "Phone_5765": "+1 (425) 882-8080", + "PostalCode_2847": "98052-8300", + "State_6475": "WA", + "SupportRepId_9405": 5 + }, + { + "City_6692": "Montréal", + "Company_7335": null, + "Country_3479": "Canada", + "CustomerId_3746": 3, + "Email_3177": "ftremblay@gmail.com", + "Fax_6538": null, + "FirstName_8760": "François", + "LastName_6010": "Tremblay", + "Phone_5765": "+1 (514) 721-4711", + "PostalCode_2847": "H2G 1A7", + "State_6475": "QC", + "SupportRepId_9405": 3 + }, + { + "City_6692": "Tucson", + "Company_7335": null, + "Country_3479": "USA", + "CustomerId_3746": 27, + "Email_3177": "patrick.gray@aol.com", + "Fax_6538": null, + "FirstName_8760": "Patrick", + "LastName_6010": "Gray", + "Phone_5765": "+1 (520) 622-4200", + "PostalCode_2847": "85719", + "State_6475": "AZ", + "SupportRepId_9405": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d0cc4d7d9807e328/request.json b/test-snapshots/query/d0cc4d7d9807e328/request.json new file mode 100644 index 0000000..f352966 --- /dev/null +++ b/test-snapshots/query/d0cc4d7d9807e328/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_9405": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "City_6692": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_7335": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_3479": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_3746": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_3177": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_6538": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_8760": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_6010": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_5765": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_2847": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_6475": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "City", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d0d313afea88b143/expected.json b/test-snapshots/query/d0d313afea88b143/expected.json new file mode 100644 index 0000000..19421a0 --- /dev/null +++ b/test-snapshots/query/d0d313afea88b143/expected.json @@ -0,0 +1,18 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d0d313afea88b143/request.json b/test-snapshots/query/d0d313afea88b143/request.json new file mode 100644 index 0000000..3db9794 --- /dev/null +++ b/test-snapshots/query/d0d313afea88b143/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d0d55c317bdbfcab/expected.json b/test-snapshots/query/d0d55c317bdbfcab/expected.json new file mode 100644 index 0000000..967cee1 --- /dev/null +++ b/test-snapshots/query/d0d55c317bdbfcab/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "Address_7675": "3,Raj Bhavan Road", + "City_4629": "Bangalore", + "Email_0360": "puja_srivastava@yahoo.in", + "FirstName_6068": "Puja", + "LastName_3637": "Srivastava", + "State_8038": null, + "SupportRepId_5510": 3 + }, + { + "Address_7675": "12,Community Centre", + "City_4629": "Delhi", + "Email_0360": "manoj.pareek@rediff.com", + "FirstName_6068": "Manoj", + "LastName_3637": "Pareek", + "State_8038": null, + "SupportRepId_5510": 3 + }, + { + "Address_7675": "Calle Lira, 198", + "City_4629": "Santiago", + "Email_0360": "luisrojas@yahoo.cl", + "FirstName_6068": "Luis", + "LastName_3637": "Rojas", + "State_8038": null, + "SupportRepId_5510": 5 + }, + { + "Address_7675": "307 Macacha Güemes", + "City_4629": "Buenos Aires", + "Email_0360": "diego.gutierrez@yahoo.ar", + "FirstName_6068": "Diego", + "LastName_3637": "Gutiérrez", + "State_8038": null, + "SupportRepId_5510": 4 + }, + { + "Address_7675": "421 Bourke Street", + "City_4629": "Sidney", + "Email_0360": "mark.taylor@yahoo.au", + "FirstName_6068": "Mark", + "LastName_3637": "Taylor", + "State_8038": "NSW", + "SupportRepId_5510": 4 + }, + { + "Address_7675": "110 Raeburn Pl", + "City_4629": "Edinburgh ", + "Email_0360": "steve.murray@yahoo.uk", + "FirstName_6068": "Steve", + "LastName_3637": "Murray", + "State_8038": null, + "SupportRepId_5510": 5 + }, + { + "Address_7675": "113 Lupus St", + "City_4629": "London", + "Email_0360": "phil.hughes@gmail.com", + "FirstName_6068": "Phil", + "LastName_3637": "Hughes", + "State_8038": null, + "SupportRepId_5510": 3 + }, + { + "Address_7675": "202 Hoxton Street", + "City_4629": "London", + "Email_0360": "emma_jones@hotmail.com", + "FirstName_6068": "Emma", + "LastName_3637": "Jones", + "State_8038": null, + "SupportRepId_5510": 3 + }, + { + "Address_7675": "Celsiusg. 9", + "City_4629": "Stockholm", + "Email_0360": "joakim.johansson@yahoo.se", + "FirstName_6068": "Joakim", + "LastName_3637": "Johansson", + "State_8038": null, + "SupportRepId_5510": 5 + }, + { + "Address_7675": "C/ San Bernardo 85", + "City_4629": "Madrid", + "Email_0360": "enrique_munoz@yahoo.es", + "FirstName_6068": "Enrique", + "LastName_3637": "Muñoz", + "State_8038": null, + "SupportRepId_5510": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d0d55c317bdbfcab/request.json b/test-snapshots/query/d0d55c317bdbfcab/request.json new file mode 100644 index 0000000..378611a --- /dev/null +++ b/test-snapshots/query/d0d55c317bdbfcab/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_7675": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_4629": { + "type": "column", + "column": "City", + "fields": null + }, + "SupportRepId_5510": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "State_8038": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_6068": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Email_0360": { + "type": "column", + "column": "Email", + "fields": null + }, + "LastName_3637": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d0d91153925cbdd0/expected.json b/test-snapshots/query/d0d91153925cbdd0/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/d0d91153925cbdd0/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d0d91153925cbdd0/request.json b/test-snapshots/query/d0d91153925cbdd0/request.json new file mode 100644 index 0000000..927a698 --- /dev/null +++ b/test-snapshots/query/d0d91153925cbdd0/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d118685856b5641b/expected.json b/test-snapshots/query/d118685856b5641b/expected.json new file mode 100644 index 0000000..d93be85 --- /dev/null +++ b/test-snapshots/query/d118685856b5641b/expected.json @@ -0,0 +1,15 @@ +[ + { + "aggregates": { + "Address_max_9249": "Via Degli Scipioni, 43", + "Company_count_9455": 10, + "CustomerId_avg_8160": 30, + "CustomerId_sum_2572": 1770, + "Fax_max_7125": "+55 (61) 3363-7855", + "LastName_max_8116": "Zimmermann", + "Phone_count_4039": 58, + "State_max_4296": "WI", + "SupportRepId_min_4979": 3 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/d118685856b5641b/request.json b/test-snapshots/query/d118685856b5641b/request.json new file mode 100644 index 0000000..bd4b09b --- /dev/null +++ b/test-snapshots/query/d118685856b5641b/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "CustomerId_avg_8160": { + "type": "single_column", + "column": "CustomerId", + "function": "avg" + }, + "CustomerId_sum_2572": { + "type": "single_column", + "column": "CustomerId", + "function": "sum" + }, + "Address_max_9249": { + "type": "single_column", + "column": "Address", + "function": "max" + }, + "Phone_count_4039": { + "type": "single_column", + "column": "Phone", + "function": "count" + }, + "LastName_max_8116": { + "type": "single_column", + "column": "LastName", + "function": "max" + }, + "Fax_max_7125": { + "type": "single_column", + "column": "Fax", + "function": "max" + }, + "SupportRepId_min_4979": { + "type": "single_column", + "column": "SupportRepId", + "function": "min" + }, + "State_max_4296": { + "type": "single_column", + "column": "State", + "function": "max" + }, + "Company_count_9455": { + "type": "single_column", + "column": "Company", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d1400e00c42494a3/expected.json b/test-snapshots/query/d1400e00c42494a3/expected.json new file mode 100644 index 0000000..0f9cd54 --- /dev/null +++ b/test-snapshots/query/d1400e00c42494a3/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d1400e00c42494a3/request.json b/test-snapshots/query/d1400e00c42494a3/request.json new file mode 100644 index 0000000..5bc9b03 --- /dev/null +++ b/test-snapshots/query/d1400e00c42494a3/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 020 7976 5722" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Apple Inc." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d15bc1940a7b7ab1/expected.json b/test-snapshots/query/d15bc1940a7b7ab1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d15bc1940a7b7ab1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d15bc1940a7b7ab1/request.json b/test-snapshots/query/d15bc1940a7b7ab1/request.json new file mode 100644 index 0000000..52e72ce --- /dev/null +++ b/test-snapshots/query/d15bc1940a7b7ab1/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Manager" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Callahan" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d17ef98bb1cbc812/expected.json b/test-snapshots/query/d17ef98bb1cbc812/expected.json new file mode 100644 index 0000000..c852662 --- /dev/null +++ b/test-snapshots/query/d17ef98bb1cbc812/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 102, + "Name": "Marillion" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d17ef98bb1cbc812/request.json b/test-snapshots/query/d17ef98bb1cbc812/request.json new file mode 100644 index 0000000..2b87db2 --- /dev/null +++ b/test-snapshots/query/d17ef98bb1cbc812/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d193ea6d423f2d0/expected.json b/test-snapshots/query/d193ea6d423f2d0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d193ea6d423f2d0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d193ea6d423f2d0/request.json b/test-snapshots/query/d193ea6d423f2d0/request.json new file mode 100644 index 0000000..7ae41da --- /dev/null +++ b/test-snapshots/query/d193ea6d423f2d0/request.json @@ -0,0 +1,136 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.98 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 81 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d199dc9719c252e/expected.json b/test-snapshots/query/d199dc9719c252e/expected.json new file mode 100644 index 0000000..041b810 --- /dev/null +++ b/test-snapshots/query/d199dc9719c252e/expected.json @@ -0,0 +1,105 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d199dc9719c252e/request.json b/test-snapshots/query/d199dc9719c252e/request.json new file mode 100644 index 0000000..992b266 --- /dev/null +++ b/test-snapshots/query/d199dc9719c252e/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d1a05fc6f38674f3/expected.json b/test-snapshots/query/d1a05fc6f38674f3/expected.json new file mode 100644 index 0000000..f6f5fb6 --- /dev/null +++ b/test-snapshots/query/d1a05fc6f38674f3/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6905": "90’s Music" + }, + { + "Name_6905": "Audiobooks" + }, + { + "Name_6905": "Audiobooks" + }, + { + "Name_6905": "Brazilian Music" + }, + { + "Name_6905": "Classical" + }, + { + "Name_6905": "Classical 101 - Deep Cuts" + }, + { + "Name_6905": "Classical 101 - Next Steps" + }, + { + "Name_6905": "Classical 101 - The Basics" + }, + { + "Name_6905": "Grunge" + }, + { + "Name_6905": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d1a05fc6f38674f3/request.json b/test-snapshots/query/d1a05fc6f38674f3/request.json new file mode 100644 index 0000000..52dad0a --- /dev/null +++ b/test-snapshots/query/d1a05fc6f38674f3/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_6905": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d1aaa8ab6ea3b30e/expected.json b/test-snapshots/query/d1aaa8ab6ea3b30e/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/d1aaa8ab6ea3b30e/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d1aaa8ab6ea3b30e/request.json b/test-snapshots/query/d1aaa8ab6ea3b30e/request.json new file mode 100644 index 0000000..8c459c4 --- /dev/null +++ b/test-snapshots/query/d1aaa8ab6ea3b30e/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 19 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d1ea5e97a4b682b7/expected.json b/test-snapshots/query/d1ea5e97a4b682b7/expected.json new file mode 100644 index 0000000..e672708 --- /dev/null +++ b/test-snapshots/query/d1ea5e97a4b682b7/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "City_4131": "Winnipeg", + "FirstName_3806": "Aaron", + "SupportRepId_4276": 4 + }, + { + "City_4131": "São Paulo", + "FirstName_3806": "Alexandre", + "SupportRepId_4276": 5 + }, + { + "City_4131": "Vienne", + "FirstName_3806": "Astrid", + "SupportRepId_4276": 5 + }, + { + "City_4131": "Oslo", + "FirstName_3806": "Bjørn", + "SupportRepId_4276": 4 + }, + { + "City_4131": "Paris", + "FirstName_3806": "Camille", + "SupportRepId_4276": 4 + }, + { + "City_4131": "Brussels", + "FirstName_3806": "Daan", + "SupportRepId_4276": 4 + }, + { + "City_4131": "Mountain View", + "FirstName_3806": "Dan", + "SupportRepId_4276": 4 + }, + { + "City_4131": "Buenos Aires", + "FirstName_3806": "Diego", + "SupportRepId_4276": 4 + }, + { + "City_4131": "Paris", + "FirstName_3806": "Dominique", + "SupportRepId_4276": 4 + }, + { + "City_4131": "São Paulo", + "FirstName_3806": "Eduardo", + "SupportRepId_4276": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d1ea5e97a4b682b7/request.json b/test-snapshots/query/d1ea5e97a4b682b7/request.json new file mode 100644 index 0000000..9412f5f --- /dev/null +++ b/test-snapshots/query/d1ea5e97a4b682b7/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_4276": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "City_4131": { + "type": "column", + "column": "City", + "fields": null + }, + "FirstName_3806": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d1f4eded7708ebd/expected.json b/test-snapshots/query/d1f4eded7708ebd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d1f4eded7708ebd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d1f4eded7708ebd/request.json b/test-snapshots/query/d1f4eded7708ebd/request.json new file mode 100644 index 0000000..196b2a7 --- /dev/null +++ b/test-snapshots/query/d1f4eded7708ebd/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Goyer" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d1f66ba7d214e835/expected.json b/test-snapshots/query/d1f66ba7d214e835/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d1f66ba7d214e835/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d1f66ba7d214e835/request.json b/test-snapshots/query/d1f66ba7d214e835/request.json new file mode 100644 index 0000000..0415530 --- /dev/null +++ b/test-snapshots/query/d1f66ba7d214e835/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "C.O.D." + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205662 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d22fe1380f018abb/expected.json b/test-snapshots/query/d22fe1380f018abb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d22fe1380f018abb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d22fe1380f018abb/request.json b/test-snapshots/query/d22fe1380f018abb/request.json new file mode 100644 index 0000000..db7bfe0 --- /dev/null +++ b/test-snapshots/query/d22fe1380f018abb/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "11, Place Bellecour" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d2369faef345003/expected.json b/test-snapshots/query/d2369faef345003/expected.json new file mode 100644 index 0000000..93f7f9c --- /dev/null +++ b/test-snapshots/query/d2369faef345003/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "CustomerId_6469": 59, + "Email_3861": "puja_srivastava@yahoo.in", + "LastName_4065": "Srivastava" + }, + { + "CustomerId_6469": 58, + "Email_3861": "manoj.pareek@rediff.com", + "LastName_4065": "Pareek" + }, + { + "CustomerId_6469": 55, + "Email_3861": "mark.taylor@yahoo.au", + "LastName_4065": "Taylor" + }, + { + "CustomerId_6469": 57, + "Email_3861": "luisrojas@yahoo.cl", + "LastName_4065": "Rojas" + }, + { + "CustomerId_6469": 13, + "Email_3861": "fernadaramos4@uol.com.br", + "LastName_4065": "Ramos" + }, + { + "CustomerId_6469": 12, + "Email_3861": "roberto.almeida@riotur.gov.br", + "LastName_4065": "Almeida" + }, + { + "CustomerId_6469": 1, + "Email_3861": "luisg@embraer.com.br", + "LastName_4065": "Gonçalves" + }, + { + "CustomerId_6469": 11, + "Email_3861": "alero@uol.com.br", + "LastName_4065": "Rocha" + }, + { + "CustomerId_6469": 10, + "Email_3861": "eduardo@woodstock.com.br", + "LastName_4065": "Martins" + }, + { + "CustomerId_6469": 56, + "Email_3861": "diego.gutierrez@yahoo.ar", + "LastName_4065": "Gutiérrez" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d2369faef345003/request.json b/test-snapshots/query/d2369faef345003/request.json new file mode 100644 index 0000000..7713d3f --- /dev/null +++ b/test-snapshots/query/d2369faef345003/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "LastName_4065": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Email_3861": { + "type": "column", + "column": "Email", + "fields": null + }, + "CustomerId_6469": { + "type": "column", + "column": "CustomerId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d242dd32cad825b8/expected.json b/test-snapshots/query/d242dd32cad825b8/expected.json new file mode 100644 index 0000000..d235ad9 --- /dev/null +++ b/test-snapshots/query/d242dd32cad825b8/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d242dd32cad825b8/request.json b/test-snapshots/query/d242dd32cad825b8/request.json new file mode 100644 index 0000000..47287c6 --- /dev/null +++ b/test-snapshots/query/d242dd32cad825b8/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d26d5cb30c51d1f7/expected.json b/test-snapshots/query/d26d5cb30c51d1f7/expected.json new file mode 100644 index 0000000..addd6ca --- /dev/null +++ b/test-snapshots/query/d26d5cb30c51d1f7/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 184, + "Bytes": 10426550, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 315637, + "Name": "ZeroVinteUm", + "TrackId": 2238, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 13559173, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 410409, + "Name": "Se Liga", + "TrackId": 2253, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 3304738, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 100858, + "Name": "Seus Amigos", + "TrackId": 2247, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 3947664, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 121704, + "Name": "Quem Me Cobrou?", + "TrackId": 2252, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 4116536, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 121808, + "Name": "Nega Do Cabelo Duro", + "TrackId": 2250, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 4991935, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 151536, + "Name": "Hip Hop Rio", + "TrackId": 2240, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 5407744, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 165146, + "Name": "100% HardCore", + "TrackId": 2242, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 5683369, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 171964, + "Name": "O Bicho Tá Pregando", + "TrackId": 2245, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 5723677, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 172591, + "Name": "Queimando Tudo", + "TrackId": 2239, + "UnitPrice": 0.99 + }, + { + "AlbumId": 184, + "Bytes": 6009946, + "Composer": null, + "GenreId": 17, + "MediaTypeId": 1, + "Milliseconds": 185103, + "Name": "Adoled (Ocean)", + "TrackId": 2246, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d26d5cb30c51d1f7/request.json b/test-snapshots/query/d26d5cb30c51d1f7/request.json new file mode 100644 index 0000000..affd3bf --- /dev/null +++ b/test-snapshots/query/d26d5cb30c51d1f7/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d27d2c58f84fbd11/expected.json b/test-snapshots/query/d27d2c58f84fbd11/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d27d2c58f84fbd11/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d27d2c58f84fbd11/request.json b/test-snapshots/query/d27d2c58f84fbd11/request.json new file mode 100644 index 0000000..db383db --- /dev/null +++ b/test-snapshots/query/d27d2c58f84fbd11/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d2951abc969e9049/expected.json b/test-snapshots/query/d2951abc969e9049/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/d2951abc969e9049/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d2951abc969e9049/request.json b/test-snapshots/query/d2951abc969e9049/request.json new file mode 100644 index 0000000..86ebee8 --- /dev/null +++ b/test-snapshots/query/d2951abc969e9049/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 270863 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d2d6098fd4d5801d/expected.json b/test-snapshots/query/d2d6098fd4d5801d/expected.json new file mode 100644 index 0000000..2fe4664 --- /dev/null +++ b/test-snapshots/query/d2d6098fd4d5801d/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d2d6098fd4d5801d/request.json b/test-snapshots/query/d2d6098fd4d5801d/request.json new file mode 100644 index 0000000..9ff80a3 --- /dev/null +++ b/test-snapshots/query/d2d6098fd4d5801d/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d3146a60e31b7d5a/expected.json b/test-snapshots/query/d3146a60e31b7d5a/expected.json new file mode 100644 index 0000000..3f68b52 --- /dev/null +++ b/test-snapshots/query/d3146a60e31b7d5a/expected.json @@ -0,0 +1,134 @@ +[ + { + "rows": [ + { + "Address_6414": "7727B 41 Ave", + "BirthDate_3998": "1965-03-03", + "City_5441": "Calgary", + "Country_6338": "Canada", + "Email_9696": "steve@chinookcorp.com", + "EmployeeId_8113": 5, + "Fax_7860": "1 (780) 836-9543", + "HireDate_1181": "2003-10-17", + "LastName_5239": "Johnson", + "Phone_1217": "1 (780) 836-9987", + "PostalCode_9009": "T3B 1Y7", + "ReportsTo_8480": 2, + "State_2572": "AB", + "Title_1733": "Sales Support Agent" + }, + { + "Address_6414": "11120 Jasper Ave NW", + "BirthDate_3998": "1962-02-18", + "City_5441": "Edmonton", + "Country_6338": "Canada", + "Email_9696": "andrew@chinookcorp.com", + "EmployeeId_8113": 1, + "Fax_7860": "+1 (780) 428-3457", + "HireDate_1181": "2002-08-14", + "LastName_5239": "Adams", + "Phone_1217": "+1 (780) 428-9482", + "PostalCode_9009": "T5K 2N1", + "ReportsTo_8480": null, + "State_2572": "AB", + "Title_1733": "General Manager" + }, + { + "Address_6414": "923 7 ST NW", + "BirthDate_3998": "1968-01-09", + "City_5441": "Lethbridge", + "Country_6338": "Canada", + "Email_9696": "laura@chinookcorp.com", + "EmployeeId_8113": 8, + "Fax_7860": "+1 (403) 467-8772", + "HireDate_1181": "2004-03-04", + "LastName_5239": "Callahan", + "Phone_1217": "+1 (403) 467-3351", + "PostalCode_9009": "T1H 1Y8", + "ReportsTo_8480": 6, + "State_2572": "AB", + "Title_1733": "IT Staff" + }, + { + "Address_6414": "590 Columbia Boulevard West", + "BirthDate_3998": "1970-05-29", + "City_5441": "Lethbridge", + "Country_6338": "Canada", + "Email_9696": "robert@chinookcorp.com", + "EmployeeId_8113": 7, + "Fax_7860": "+1 (403) 456-8485", + "HireDate_1181": "2004-01-02", + "LastName_5239": "King", + "Phone_1217": "+1 (403) 456-9986", + "PostalCode_9009": "T1K 5N8", + "ReportsTo_8480": 6, + "State_2572": "AB", + "Title_1733": "IT Staff" + }, + { + "Address_6414": "683 10 Street SW", + "BirthDate_3998": "1947-09-19", + "City_5441": "Calgary", + "Country_6338": "Canada", + "Email_9696": "margaret@chinookcorp.com", + "EmployeeId_8113": 4, + "Fax_7860": "+1 (403) 263-4289", + "HireDate_1181": "2003-05-03", + "LastName_5239": "Park", + "Phone_1217": "+1 (403) 263-4423", + "PostalCode_9009": "T2P 5G3", + "ReportsTo_8480": 2, + "State_2572": "AB", + "Title_1733": "Sales Support Agent" + }, + { + "Address_6414": "1111 6 Ave SW", + "BirthDate_3998": "1973-08-29", + "City_5441": "Calgary", + "Country_6338": "Canada", + "Email_9696": "jane@chinookcorp.com", + "EmployeeId_8113": 3, + "Fax_7860": "+1 (403) 262-6712", + "HireDate_1181": "2002-04-01", + "LastName_5239": "Peacock", + "Phone_1217": "+1 (403) 262-3443", + "PostalCode_9009": "T2P 5M5", + "ReportsTo_8480": 2, + "State_2572": "AB", + "Title_1733": "Sales Support Agent" + }, + { + "Address_6414": "825 8 Ave SW", + "BirthDate_3998": "1958-12-08", + "City_5441": "Calgary", + "Country_6338": "Canada", + "Email_9696": "nancy@chinookcorp.com", + "EmployeeId_8113": 2, + "Fax_7860": "+1 (403) 262-3322", + "HireDate_1181": "2002-05-01", + "LastName_5239": "Edwards", + "Phone_1217": "+1 (403) 262-3443", + "PostalCode_9009": "T2P 2T3", + "ReportsTo_8480": 1, + "State_2572": "AB", + "Title_1733": "Sales Manager" + }, + { + "Address_6414": "5827 Bowness Road NW", + "BirthDate_3998": "1973-07-01", + "City_5441": "Calgary", + "Country_6338": "Canada", + "Email_9696": "michael@chinookcorp.com", + "EmployeeId_8113": 6, + "Fax_7860": "+1 (403) 246-9899", + "HireDate_1181": "2003-10-17", + "LastName_5239": "Mitchell", + "Phone_1217": "+1 (403) 246-9887", + "PostalCode_9009": "T3B 0C5", + "ReportsTo_8480": 1, + "State_2572": "AB", + "Title_1733": "IT Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d3146a60e31b7d5a/request.json b/test-snapshots/query/d3146a60e31b7d5a/request.json new file mode 100644 index 0000000..275ddb9 --- /dev/null +++ b/test-snapshots/query/d3146a60e31b7d5a/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_6414": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_3998": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_5441": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_6338": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_9696": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_8113": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_7860": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Title_1733": { + "type": "column", + "column": "Title", + "fields": null + }, + "HireDate_1181": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_5239": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_1217": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_9009": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_8480": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_2572": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d3241070136f271e/expected.json b/test-snapshots/query/d3241070136f271e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d3241070136f271e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d3241070136f271e/request.json b/test-snapshots/query/d3241070136f271e/request.json new file mode 100644 index 0000000..f56921b --- /dev/null +++ b/test-snapshots/query/d3241070136f271e/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d357e3ccb7d6561d/expected.json b/test-snapshots/query/d357e3ccb7d6561d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d357e3ccb7d6561d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d357e3ccb7d6561d/request.json b/test-snapshots/query/d357e3ccb7d6561d/request.json new file mode 100644 index 0000000..3696dac --- /dev/null +++ b/test-snapshots/query/d357e3ccb7d6561d/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11170334 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d36bd0ae517f91a/expected.json b/test-snapshots/query/d36bd0ae517f91a/expected.json new file mode 100644 index 0000000..31718cb --- /dev/null +++ b/test-snapshots/query/d36bd0ae517f91a/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_2762": "AC/DC" + }, + { + "Name_2762": "Accept" + }, + { + "Name_2762": "Aerosmith" + }, + { + "Name_2762": "Alanis Morissette" + }, + { + "Name_2762": "Alice In Chains" + }, + { + "Name_2762": "Antônio Carlos Jobim" + }, + { + "Name_2762": "Apocalyptica" + }, + { + "Name_2762": "Audioslave" + }, + { + "Name_2762": "BackBeat" + }, + { + "Name_2762": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d36bd0ae517f91a/request.json b/test-snapshots/query/d36bd0ae517f91a/request.json new file mode 100644 index 0000000..ebc5cad --- /dev/null +++ b/test-snapshots/query/d36bd0ae517f91a/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_2762": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d36c029200d42c03/expected.json b/test-snapshots/query/d36c029200d42c03/expected.json new file mode 100644 index 0000000..8820581 --- /dev/null +++ b/test-snapshots/query/d36c029200d42c03/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10003747, + "MediaTypeId_9003": 1, + "Name_3738": "Linha Do Equador", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 218 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10003747, + "MediaTypeId_9003": 1, + "Name_3738": "Linha Do Equador", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 5, + "TrackId": 218 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10003747, + "MediaTypeId_9003": 1, + "Name_3738": "Linha Do Equador", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 218 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10003794, + "MediaTypeId_9003": 1, + "Name_3738": "Believer", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 2101 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10003794, + "MediaTypeId_9003": 1, + "Name_3738": "Believer", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 2101 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10005675, + "MediaTypeId_9003": 1, + "Name_3738": "Fire In The Head", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 2712 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10005675, + "MediaTypeId_9003": 1, + "Name_3738": "Fire In The Head", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 5, + "TrackId": 2712 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10005675, + "MediaTypeId_9003": 1, + "Name_3738": "Fire In The Head", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 2712 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10009697, + "MediaTypeId_9003": 1, + "Name_3738": "Killers", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 1, + "TrackId": 2140 + }, + { + "FK_PlaylistTrackTrackId": { + "rows": [ + { + "Bytes_9531": 10009697, + "MediaTypeId_9003": 1, + "Name_3738": "Killers", + "UnitPrice_7545": 0.99 + } + ] + }, + "PlaylistId": 8, + "TrackId": 2140 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d36c029200d42c03/request.json b/test-snapshots/query/d36c029200d42c03/request.json new file mode 100644 index 0000000..83803fc --- /dev/null +++ b/test-snapshots/query/d36c029200d42c03/request.json @@ -0,0 +1,59 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId_9003": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Bytes_9531": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Name_3738": { + "type": "column", + "column": "Name", + "fields": null + }, + "UnitPrice_7545": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d37f6b0ecb06f7b8/expected.json b/test-snapshots/query/d37f6b0ecb06f7b8/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/d37f6b0ecb06f7b8/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d37f6b0ecb06f7b8/request.json b/test-snapshots/query/d37f6b0ecb06f7b8/request.json new file mode 100644 index 0000000..acc8879 --- /dev/null +++ b/test-snapshots/query/d37f6b0ecb06f7b8/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d39e49c9c37da74f/expected.json b/test-snapshots/query/d39e49c9c37da74f/expected.json new file mode 100644 index 0000000..55dd007 --- /dev/null +++ b/test-snapshots/query/d39e49c9c37da74f/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_6065": 1, + "InvoiceLineId_0306": 1, + "Quantity_3929": 1, + "TrackId_1100": 2 + }, + { + "InvoiceId_6065": 1, + "InvoiceLineId_0306": 2, + "Quantity_3929": 1, + "TrackId_1100": 4 + }, + { + "InvoiceId_6065": 2, + "InvoiceLineId_0306": 3, + "Quantity_3929": 1, + "TrackId_1100": 6 + }, + { + "InvoiceId_6065": 2, + "InvoiceLineId_0306": 4, + "Quantity_3929": 1, + "TrackId_1100": 8 + }, + { + "InvoiceId_6065": 2, + "InvoiceLineId_0306": 5, + "Quantity_3929": 1, + "TrackId_1100": 10 + }, + { + "InvoiceId_6065": 2, + "InvoiceLineId_0306": 6, + "Quantity_3929": 1, + "TrackId_1100": 12 + }, + { + "InvoiceId_6065": 3, + "InvoiceLineId_0306": 10, + "Quantity_3929": 1, + "TrackId_1100": 28 + }, + { + "InvoiceId_6065": 3, + "InvoiceLineId_0306": 11, + "Quantity_3929": 1, + "TrackId_1100": 32 + }, + { + "InvoiceId_6065": 3, + "InvoiceLineId_0306": 12, + "Quantity_3929": 1, + "TrackId_1100": 36 + }, + { + "InvoiceId_6065": 3, + "InvoiceLineId_0306": 7, + "Quantity_3929": 1, + "TrackId_1100": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d39e49c9c37da74f/request.json b/test-snapshots/query/d39e49c9c37da74f/request.json new file mode 100644 index 0000000..dd30e66 --- /dev/null +++ b/test-snapshots/query/d39e49c9c37da74f/request.json @@ -0,0 +1,58 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_6065": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_0306": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_3929": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_1100": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d3bcaaa9713912b5/expected.json b/test-snapshots/query/d3bcaaa9713912b5/expected.json new file mode 100644 index 0000000..69eb316 --- /dev/null +++ b/test-snapshots/query/d3bcaaa9713912b5/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d3bcaaa9713912b5/request.json b/test-snapshots/query/d3bcaaa9713912b5/request.json new file mode 100644 index 0000000..ceba9ad --- /dev/null +++ b/test-snapshots/query/d3bcaaa9713912b5/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d3c6d4f498d287cb/expected.json b/test-snapshots/query/d3c6d4f498d287cb/expected.json new file mode 100644 index 0000000..c54e83f --- /dev/null +++ b/test-snapshots/query/d3c6d4f498d287cb/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d3c6d4f498d287cb/request.json b/test-snapshots/query/d3c6d4f498d287cb/request.json new file mode 100644 index 0000000..da77597 --- /dev/null +++ b/test-snapshots/query/d3c6d4f498d287cb/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1009 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d3e96078933faf61/expected.json b/test-snapshots/query/d3e96078933faf61/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/d3e96078933faf61/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d3e96078933faf61/request.json b/test-snapshots/query/d3e96078933faf61/request.json new file mode 100644 index 0000000..34f5465 --- /dev/null +++ b/test-snapshots/query/d3e96078933faf61/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d3e9752d02391b7/expected.json b/test-snapshots/query/d3e9752d02391b7/expected.json new file mode 100644 index 0000000..75a28d2 --- /dev/null +++ b/test-snapshots/query/d3e9752d02391b7/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 12, + "TrackId": 3403 + }, + { + "PlaylistId": 12, + "TrackId": 3404 + }, + { + "PlaylistId": 12, + "TrackId": 3405 + }, + { + "PlaylistId": 12, + "TrackId": 3406 + }, + { + "PlaylistId": 12, + "TrackId": 3407 + }, + { + "PlaylistId": 12, + "TrackId": 3408 + }, + { + "PlaylistId": 12, + "TrackId": 3409 + }, + { + "PlaylistId": 12, + "TrackId": 3410 + }, + { + "PlaylistId": 12, + "TrackId": 3411 + }, + { + "PlaylistId": 12, + "TrackId": 3412 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d3e9752d02391b7/request.json b/test-snapshots/query/d3e9752d02391b7/request.json new file mode 100644 index 0000000..be9b56a --- /dev/null +++ b/test-snapshots/query/d3e9752d02391b7/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d42ca2d77fb3c1f2/expected.json b/test-snapshots/query/d42ca2d77fb3c1f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d42ca2d77fb3c1f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d42ca2d77fb3c1f2/request.json b/test-snapshots/query/d42ca2d77fb3c1f2/request.json new file mode 100644 index 0000000..5e3ba29 --- /dev/null +++ b/test-snapshots/query/d42ca2d77fb3c1f2/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected AAC audio file" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d44de03bc294dbc9/expected.json b/test-snapshots/query/d44de03bc294dbc9/expected.json new file mode 100644 index 0000000..cdb5419 --- /dev/null +++ b/test-snapshots/query/d44de03bc294dbc9/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "BillingAddress_5258": "Calle Lira, 198", + "BillingCity_3409": "Santiago", + "BillingCountry_9745": "Chile", + "BillingPostalCode_0613": null, + "BillingState_9817": null, + "CustomerId_9341": 57, + "InvoiceDate_2121": "2012-10-14", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "307 Macacha Güemes", + "BillingCity_3409": "Buenos Aires", + "BillingCountry_9745": "Argentina", + "BillingPostalCode_0613": "1106", + "BillingState_9817": null, + "CustomerId_9341": 56, + "InvoiceDate_2121": "2011-08-07", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "421 Bourke Street", + "BillingCity_3409": "Sidney", + "BillingCountry_9745": "Australia", + "BillingPostalCode_0613": "2010", + "BillingState_9817": "NSW", + "CustomerId_9341": 55, + "InvoiceDate_2121": "2010-05-30", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "110 Raeburn Pl", + "BillingCity_3409": "Edinburgh ", + "BillingCountry_9745": "United Kingdom", + "BillingPostalCode_0613": "EH4 1HH", + "BillingState_9817": null, + "CustomerId_9341": 54, + "InvoiceDate_2121": "2009-03-22", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "113 Lupus St", + "BillingCity_3409": "London", + "BillingCountry_9745": "United Kingdom", + "BillingPostalCode_0613": "SW1V 3EN", + "BillingState_9817": null, + "CustomerId_9341": 53, + "InvoiceDate_2121": "2013-01-15", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "202 Hoxton Street", + "BillingCity_3409": "London", + "BillingCountry_9745": "United Kingdom", + "BillingPostalCode_0613": "N1 5LH", + "BillingState_9817": null, + "CustomerId_9341": 52, + "InvoiceDate_2121": "2011-11-08", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "Celsiusg. 9", + "BillingCity_3409": "Stockholm", + "BillingCountry_9745": "Sweden", + "BillingPostalCode_0613": "11230", + "BillingState_9817": null, + "CustomerId_9341": 51, + "InvoiceDate_2121": "2010-08-31", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "C/ San Bernardo 85", + "BillingCity_3409": "Madrid", + "BillingCountry_9745": "Spain", + "BillingPostalCode_0613": "28015", + "BillingState_9817": null, + "CustomerId_9341": 50, + "InvoiceDate_2121": "2009-06-23", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "Ordynacka 10", + "BillingCity_3409": "Warsaw", + "BillingCountry_9745": "Poland", + "BillingPostalCode_0613": "00-358", + "BillingState_9817": null, + "CustomerId_9341": 49, + "InvoiceDate_2121": "2013-04-18", + "Total_8078": 0.99 + }, + { + "BillingAddress_5258": "Lijnbaansgracht 120bg", + "BillingCity_3409": "Amsterdam", + "BillingCountry_9745": "Netherlands", + "BillingPostalCode_0613": "1016", + "BillingState_9817": "VV", + "CustomerId_9341": 48, + "InvoiceDate_2121": "2012-02-09", + "Total_8078": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d44de03bc294dbc9/request.json b/test-snapshots/query/d44de03bc294dbc9/request.json new file mode 100644 index 0000000..1b62487 --- /dev/null +++ b/test-snapshots/query/d44de03bc294dbc9/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_5258": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_3409": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_9745": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_0613": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_9817": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_9341": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_2121": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "Total_8078": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Total", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d44e29feeba7af9c/expected.json b/test-snapshots/query/d44e29feeba7af9c/expected.json new file mode 100644 index 0000000..944f333 --- /dev/null +++ b/test-snapshots/query/d44e29feeba7af9c/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "AlbumId_3747": 102, + "Bytes_4377": 10921567, + "GenreId_3210": 3, + "Milliseconds_6528": 454974, + "Name_7373": "Powerslave", + "TrackId_3309": 1294, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 102, + "Bytes_4377": 1154488, + "GenreId_3210": 13, + "Milliseconds_6528": 48013, + "Name_7373": "Intro- Churchill S Speech", + "TrackId_3309": 1287, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 102, + "Bytes_4377": 18949518, + "GenreId_3210": 3, + "Milliseconds_6528": 789472, + "Name_7373": "Rime Of The Ancient Mariner", + "TrackId_3309": 1293, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 102, + "Bytes_4377": 6635187, + "GenreId_3210": 13, + "Milliseconds_6528": 276375, + "Name_7373": "Aces High", + "TrackId_3309": 1288, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 102, + "Bytes_4377": 9119118, + "GenreId_3210": 13, + "Milliseconds_6528": 379872, + "Name_7373": "Acacia Avenue", + "TrackId_3309": 1301, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 103, + "Bytes_4377": 10361452, + "GenreId_3210": 1, + "Milliseconds_6528": 431542, + "Name_7373": "Fear Of The Dark", + "TrackId_3309": 1314, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 103, + "Bytes_4377": 11479913, + "GenreId_3210": 1, + "Milliseconds_6528": 478145, + "Name_7373": "The Evil That Men Do", + "TrackId_3309": 1312, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 103, + "Bytes_4377": 4182963, + "GenreId_3210": 1, + "Milliseconds_6528": 174106, + "Name_7373": "Wrathchild", + "TrackId_3309": 1307, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 103, + "Bytes_4377": 5118995, + "GenreId_3210": 1, + "Milliseconds_6528": 213106, + "Name_7373": "Can I Play With Madness", + "TrackId_3309": 1309, + "UnitPrice_4729": 0.99 + }, + { + "AlbumId_3747": 103, + "Bytes_4377": 5599853, + "GenreId_3210": 1, + "Milliseconds_6528": 233142, + "Name_7373": "Be Quick Or Be Dead", + "TrackId_3309": 1305, + "UnitPrice_4729": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d44e29feeba7af9c/request.json b/test-snapshots/query/d44e29feeba7af9c/request.json new file mode 100644 index 0000000..654f641 --- /dev/null +++ b/test-snapshots/query/d44e29feeba7af9c/request.json @@ -0,0 +1,57 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_3747": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_4377": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "UnitPrice_4729": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "GenreId_3210": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "TrackId_3309": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Milliseconds_6528": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_7373": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d4574304f5b12cd3/expected.json b/test-snapshots/query/d4574304f5b12cd3/expected.json new file mode 100644 index 0000000..485222c --- /dev/null +++ b/test-snapshots/query/d4574304f5b12cd3/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d4574304f5b12cd3/request.json b/test-snapshots/query/d4574304f5b12cd3/request.json new file mode 100644 index 0000000..2ae0475 --- /dev/null +++ b/test-snapshots/query/d4574304f5b12cd3/request.json @@ -0,0 +1,112 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "825 8 Ave SW" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d4881584ba7296a0/expected.json b/test-snapshots/query/d4881584ba7296a0/expected.json new file mode 100644 index 0000000..9775a8b --- /dev/null +++ b/test-snapshots/query/d4881584ba7296a0/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_1751": "TV Shows", + "PlaylistId_1700": 3 + }, + { + "Name_1751": "TV Shows", + "PlaylistId_1700": 10 + }, + { + "Name_1751": "On-The-Go 1", + "PlaylistId_1700": 18 + }, + { + "Name_1751": "Music Videos", + "PlaylistId_1700": 9 + }, + { + "Name_1751": "Music", + "PlaylistId_1700": 1 + }, + { + "Name_1751": "Music", + "PlaylistId_1700": 8 + }, + { + "Name_1751": "Movies", + "PlaylistId_1700": 2 + }, + { + "Name_1751": "Movies", + "PlaylistId_1700": 7 + }, + { + "Name_1751": "Heavy Metal Classic", + "PlaylistId_1700": 17 + }, + { + "Name_1751": "Grunge", + "PlaylistId_1700": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d4881584ba7296a0/request.json b/test-snapshots/query/d4881584ba7296a0/request.json new file mode 100644 index 0000000..936989c --- /dev/null +++ b/test-snapshots/query/d4881584ba7296a0/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_1751": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_1700": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d49855178ad2157/expected.json b/test-snapshots/query/d49855178ad2157/expected.json new file mode 100644 index 0000000..d2db55e --- /dev/null +++ b/test-snapshots/query/d49855178ad2157/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceLineId_4175": 1727, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 578, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 1153, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 577, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 1726, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 1152, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 576, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 575, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 1151, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + }, + { + "InvoiceLineId_4175": 1725, + "Quantity_6230": 1, + "UnitPrice_4141": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d49855178ad2157/request.json b/test-snapshots/query/d49855178ad2157/request.json new file mode 100644 index 0000000..4e565d8 --- /dev/null +++ b/test-snapshots/query/d49855178ad2157/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "UnitPrice_4141": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "InvoiceLineId_4175": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_6230": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d4c1b2c41ee83492/expected.json b/test-snapshots/query/d4c1b2c41ee83492/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/d4c1b2c41ee83492/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d4c1b2c41ee83492/request.json b/test-snapshots/query/d4c1b2c41ee83492/request.json new file mode 100644 index 0000000..2aa606b --- /dev/null +++ b/test-snapshots/query/d4c1b2c41ee83492/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d4e727f242f14164/expected.json b/test-snapshots/query/d4e727f242f14164/expected.json new file mode 100644 index 0000000..27a3bca --- /dev/null +++ b/test-snapshots/query/d4e727f242f14164/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 107, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d4e727f242f14164/request.json b/test-snapshots/query/d4e727f242f14164/request.json new file mode 100644 index 0000000..3082fff --- /dev/null +++ b/test-snapshots/query/d4e727f242f14164/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Motörhead & Girlschool" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d4e89fff3ae0914b/expected.json b/test-snapshots/query/d4e89fff3ae0914b/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/d4e89fff3ae0914b/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d4e89fff3ae0914b/request.json b/test-snapshots/query/d4e89fff3ae0914b/request.json new file mode 100644 index 0000000..bf3714c --- /dev/null +++ b/test-snapshots/query/d4e89fff3ae0914b/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d4f625b056410953/expected.json b/test-snapshots/query/d4f625b056410953/expected.json new file mode 100644 index 0000000..92f6167 --- /dev/null +++ b/test-snapshots/query/d4f625b056410953/expected.json @@ -0,0 +1,34 @@ +[ + { + "rows": [ + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d4f625b056410953/request.json b/test-snapshots/query/d4f625b056410953/request.json new file mode 100644 index 0000000..b66a00b --- /dev/null +++ b/test-snapshots/query/d4f625b056410953/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d50ae4452cc3e827/expected.json b/test-snapshots/query/d50ae4452cc3e827/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d50ae4452cc3e827/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d50ae4452cc3e827/request.json b/test-snapshots/query/d50ae4452cc3e827/request.json new file mode 100644 index 0000000..44b0a03 --- /dev/null +++ b/test-snapshots/query/d50ae4452cc3e827/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263288 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d51c6671ef5b4855/expected.json b/test-snapshots/query/d51c6671ef5b4855/expected.json new file mode 100644 index 0000000..9e58587 --- /dev/null +++ b/test-snapshots/query/d51c6671ef5b4855/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_1576": "Rock" + }, + { + "Name_1576": "Jazz" + }, + { + "Name_1576": "Metal" + }, + { + "Name_1576": "Alternative & Punk" + }, + { + "Name_1576": "Rock And Roll" + }, + { + "Name_1576": "Blues" + }, + { + "Name_1576": "Latin" + }, + { + "Name_1576": "Reggae" + }, + { + "Name_1576": "Pop" + }, + { + "Name_1576": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d51c6671ef5b4855/request.json b/test-snapshots/query/d51c6671ef5b4855/request.json new file mode 100644 index 0000000..9ce41c7 --- /dev/null +++ b/test-snapshots/query/d51c6671ef5b4855/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_1576": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d534eb8f4b981147/expected.json b/test-snapshots/query/d534eb8f4b981147/expected.json new file mode 100644 index 0000000..edd4ca8 --- /dev/null +++ b/test-snapshots/query/d534eb8f4b981147/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_7467": 1 + }, + { + "ArtistId_7467": 2 + }, + { + "ArtistId_7467": 2 + }, + { + "ArtistId_7467": 1 + }, + { + "ArtistId_7467": 3 + }, + { + "ArtistId_7467": 4 + }, + { + "ArtistId_7467": 5 + }, + { + "ArtistId_7467": 6 + }, + { + "ArtistId_7467": 7 + }, + { + "ArtistId_7467": 8 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d534eb8f4b981147/request.json b/test-snapshots/query/d534eb8f4b981147/request.json new file mode 100644 index 0000000..9e37158 --- /dev/null +++ b/test-snapshots/query/d534eb8f4b981147/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "ArtistId_7467": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d53a825f1fec1597/expected.json b/test-snapshots/query/d53a825f1fec1597/expected.json new file mode 100644 index 0000000..948a776 --- /dev/null +++ b/test-snapshots/query/d53a825f1fec1597/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 1, + "InvoiceLineId": 2, + "Quantity": 1, + "TrackId": 4, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d53a825f1fec1597/request.json b/test-snapshots/query/d53a825f1fec1597/request.json new file mode 100644 index 0000000..d0382aa --- /dev/null +++ b/test-snapshots/query/d53a825f1fec1597/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d58da3322e6f4ec6/expected.json b/test-snapshots/query/d58da3322e6f4ec6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d58da3322e6f4ec6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d58da3322e6f4ec6/request.json b/test-snapshots/query/d58da3322e6f4ec6/request.json new file mode 100644 index 0000000..898d8f3 --- /dev/null +++ b/test-snapshots/query/d58da3322e6f4ec6/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d58eba12bb8042fb/expected.json b/test-snapshots/query/d58eba12bb8042fb/expected.json new file mode 100644 index 0000000..4eca4cb --- /dev/null +++ b/test-snapshots/query/d58eba12bb8042fb/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId_9062": 108, + "InvoiceLineId_7565": 578, + "Quantity_6855": 1, + "TrackId_4684": 3500, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 319, + "InvoiceLineId_7565": 1727, + "Quantity_6855": 1, + "TrackId_4684": 3500, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 214, + "InvoiceLineId_7565": 1153, + "Quantity_6855": 1, + "TrackId_4684": 3499, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 108, + "InvoiceLineId_7565": 577, + "Quantity_6855": 1, + "TrackId_4684": 3496, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 319, + "InvoiceLineId_7565": 1726, + "Quantity_6855": 1, + "TrackId_4684": 3494, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 213, + "InvoiceLineId_7565": 1152, + "Quantity_6855": 1, + "TrackId_4684": 3493, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 107, + "InvoiceLineId_7565": 576, + "Quantity_6855": 1, + "TrackId_4684": 3492, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 107, + "InvoiceLineId_7565": 575, + "Quantity_6855": 1, + "TrackId_4684": 3490, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 213, + "InvoiceLineId_7565": 1151, + "Quantity_6855": 1, + "TrackId_4684": 3489, + "UnitPrice_1290": 0.99 + }, + { + "InvoiceId_9062": 107, + "InvoiceLineId_7565": 574, + "Quantity_6855": 1, + "TrackId_4684": 3488, + "UnitPrice_1290": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d58eba12bb8042fb/request.json b/test-snapshots/query/d58eba12bb8042fb/request.json new file mode 100644 index 0000000..b66f282 --- /dev/null +++ b/test-snapshots/query/d58eba12bb8042fb/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_9062": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_7565": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_6855": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_4684": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_1290": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d5b6c02419cb2165/expected.json b/test-snapshots/query/d5b6c02419cb2165/expected.json new file mode 100644 index 0000000..21cd6d1 --- /dev/null +++ b/test-snapshots/query/d5b6c02419cb2165/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "Bytes_4633": 52490554, + "MediaTypeId_8018": 1, + "TrackId_4639": 1666 + }, + { + "Bytes_4633": 39267613, + "MediaTypeId_8018": 1, + "TrackId_4639": 620 + }, + { + "Bytes_4633": 36052247, + "MediaTypeId_8018": 1, + "TrackId_4639": 1581 + }, + { + "Bytes_4633": 34618222, + "MediaTypeId_8018": 1, + "TrackId_4639": 2429 + }, + { + "Bytes_4633": 30200730, + "MediaTypeId_8018": 1, + "TrackId_4639": 2432 + }, + { + "Bytes_4633": 29846063, + "MediaTypeId_8018": 1, + "TrackId_4639": 621 + }, + { + "Bytes_4633": 29207100, + "MediaTypeId_8018": 1, + "TrackId_4639": 2427 + }, + { + "Bytes_4633": 29008407, + "MediaTypeId_8018": 1, + "TrackId_4639": 2565 + }, + { + "Bytes_4633": 28191437, + "MediaTypeId_8018": 1, + "TrackId_4639": 1670 + }, + { + "Bytes_4633": 27775442, + "MediaTypeId_8018": 1, + "TrackId_4639": 622 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d5b6c02419cb2165/request.json b/test-snapshots/query/d5b6c02419cb2165/request.json new file mode 100644 index 0000000..8c1641c --- /dev/null +++ b/test-snapshots/query/d5b6c02419cb2165/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "MediaTypeId_8018": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Bytes_4633": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "TrackId_4639": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d5d35a774d96eda3/expected.json b/test-snapshots/query/d5d35a774d96eda3/expected.json new file mode 100644 index 0000000..3512dbd --- /dev/null +++ b/test-snapshots/query/d5d35a774d96eda3/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d5d35a774d96eda3/request.json b/test-snapshots/query/d5d35a774d96eda3/request.json new file mode 100644 index 0000000..57f6d44 --- /dev/null +++ b/test-snapshots/query/d5d35a774d96eda3/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6852860 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d5dbe0d2a65d3512/expected.json b/test-snapshots/query/d5dbe0d2a65d3512/expected.json new file mode 100644 index 0000000..34fda32 --- /dev/null +++ b/test-snapshots/query/d5dbe0d2a65d3512/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "InvoiceDate_1926": "2009-10-07" + }, + { + "InvoiceDate_1926": "2010-01-09" + }, + { + "InvoiceDate_1926": "2010-04-13" + }, + { + "InvoiceDate_1926": "2010-12-02" + }, + { + "InvoiceDate_1926": "2012-05-25" + }, + { + "InvoiceDate_1926": "2012-07-05" + }, + { + "InvoiceDate_1926": "2013-03-05" + }, + { + "InvoiceDate_1926": "2009-01-02" + }, + { + "InvoiceDate_1926": "2009-04-06" + }, + { + "InvoiceDate_1926": "2009-11-25" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d5dbe0d2a65d3512/request.json b/test-snapshots/query/d5dbe0d2a65d3512/request.json new file mode 100644 index 0000000..302a161 --- /dev/null +++ b/test-snapshots/query/d5dbe0d2a65d3512/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceDate_1926": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d5dd8a6d8e7baf53/expected.json b/test-snapshots/query/d5dd8a6d8e7baf53/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/d5dd8a6d8e7baf53/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d5dd8a6d8e7baf53/request.json b/test-snapshots/query/d5dd8a6d8e7baf53/request.json new file mode 100644 index 0000000..4f21a0c --- /dev/null +++ b/test-snapshots/query/d5dd8a6d8e7baf53/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 199836 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d628c1dbe169a30d/expected.json b/test-snapshots/query/d628c1dbe169a30d/expected.json new file mode 100644 index 0000000..8f045d5 --- /dev/null +++ b/test-snapshots/query/d628c1dbe169a30d/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "68, Rue Jouvence", + "City": "Dijon", + "Company": null, + "Country": "France", + "CustomerId": 43, + "Email": "isabelle_mercier@apple.fr", + "Fax": null, + "FirstName": "Isabelle", + "LastName": "Mercier", + "Phone": "+33 03 80 73 66 99", + "PostalCode": "21000", + "State": null, + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d628c1dbe169a30d/request.json b/test-snapshots/query/d628c1dbe169a30d/request.json new file mode 100644 index 0000000..b905a90 --- /dev/null +++ b/test-snapshots/query/d628c1dbe169a30d/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AZ" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d648c67d239e37d4/expected.json b/test-snapshots/query/d648c67d239e37d4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d648c67d239e37d4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d648c67d239e37d4/request.json b/test-snapshots/query/d648c67d239e37d4/request.json new file mode 100644 index 0000000..955c38f --- /dev/null +++ b/test-snapshots/query/d648c67d239e37d4/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jane" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d68024782443ca7a/expected.json b/test-snapshots/query/d68024782443ca7a/expected.json new file mode 100644 index 0000000..934a59b --- /dev/null +++ b/test-snapshots/query/d68024782443ca7a/expected.json @@ -0,0 +1,96 @@ +[ + { + "rows": [ + { + "AlbumId_7796": 227, + "Bytes_3485": 1054423946, + "GenreId_2507": 19, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 5286953, + "TrackId_0516": 2820, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 229, + "Bytes_3485": 1059546140, + "GenreId_2507": 21, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 5088838, + "TrackId_0516": 3224, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 536824558, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2960293, + "TrackId_0516": 3244, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 577829804, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2956998, + "TrackId_0516": 3242, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 521387924, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2956081, + "TrackId_0516": 3227, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 541359437, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2952702, + "TrackId_0516": 3226, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 551759986, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2935894, + "TrackId_0516": 3243, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 554509033, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2927802, + "TrackId_0516": 3228, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 512381289, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2927677, + "TrackId_0516": 3248, + "UnitPrice_1927": 1.99 + }, + { + "AlbumId_7796": 253, + "Bytes_3485": 536784757, + "GenreId_2507": 20, + "MediaTypeId_4048": 3, + "Milliseconds_8762": 2926593, + "TrackId_0516": 3239, + "UnitPrice_1927": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d68024782443ca7a/request.json b/test-snapshots/query/d68024782443ca7a/request.json new file mode 100644 index 0000000..739f49e --- /dev/null +++ b/test-snapshots/query/d68024782443ca7a/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_7796": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_3485": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "TrackId_0516": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "GenreId_2507": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4048": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_8762": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "UnitPrice_1927": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d68523eab11e65b9/expected.json b/test-snapshots/query/d68523eab11e65b9/expected.json new file mode 100644 index 0000000..2838b9e --- /dev/null +++ b/test-snapshots/query/d68523eab11e65b9/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9071997, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 271908, + "Name": "On The Mend", + "TrackId": 1005, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d68523eab11e65b9/request.json b/test-snapshots/query/d68523eab11e65b9/request.json new file mode 100644 index 0000000..28787d8 --- /dev/null +++ b/test-snapshots/query/d68523eab11e65b9/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1005 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d6c082893fa9ba8c/expected.json b/test-snapshots/query/d6c082893fa9ba8c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d6c082893fa9ba8c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d6c082893fa9ba8c/request.json b/test-snapshots/query/d6c082893fa9ba8c/request.json new file mode 100644 index 0000000..9f28d90 --- /dev/null +++ b/test-snapshots/query/d6c082893fa9ba8c/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Nancy" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d6cca198110e0de7/expected.json b/test-snapshots/query/d6cca198110e0de7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d6cca198110e0de7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d6cca198110e0de7/request.json b/test-snapshots/query/d6cca198110e0de7/request.json new file mode 100644 index 0000000..e531a3e --- /dev/null +++ b/test-snapshots/query/d6cca198110e0de7/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d6d6073b14fb660c/expected.json b/test-snapshots/query/d6d6073b14fb660c/expected.json new file mode 100644 index 0000000..12d43ef --- /dev/null +++ b/test-snapshots/query/d6d6073b14fb660c/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1004 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d6d6073b14fb660c/request.json b/test-snapshots/query/d6d6073b14fb660c/request.json new file mode 100644 index 0000000..688e2f3 --- /dev/null +++ b/test-snapshots/query/d6d6073b14fb660c/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1004 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d6e8b61ed7a23334/expected.json b/test-snapshots/query/d6e8b61ed7a23334/expected.json new file mode 100644 index 0000000..5d6a514 --- /dev/null +++ b/test-snapshots/query/d6e8b61ed7a23334/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "AlbumId": 260, + "Bytes": 8052374, + "Composer": null, + "GenreId": 23, + "MediaTypeId": 4, + "Milliseconds": 234013, + "Name": "War Pigs", + "TrackId": 3336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 283, + "Bytes": 10085867, + "Composer": "Franz Joseph Haydn", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 306687, + "Name": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId": 3414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 318, + "Bytes": 3819535, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 101293, + "Name": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId": 3452, + "UnitPrice": 0.99 + }, + { + "AlbumId": 324, + "Bytes": 10887931, + "Composer": "Ludwig van Beethoven", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 339567, + "Name": "Prometheus Overture, Op. 43", + "TrackId": 3479, + "UnitPrice": 0.99 + }, + { + "AlbumId": 325, + "Bytes": 9785346, + "Composer": "Béla Bartók", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 299350, + "Name": "Sonata for Solo Violin: IV: Presto", + "TrackId": 3480, + "UnitPrice": 0.99 + }, + { + "AlbumId": 340, + "Bytes": 2229617, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 51780, + "Name": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "TrackId": 3496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 342, + "Bytes": 16454937, + "Composer": "Pietro Antonio Locatelli", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 493573, + "Name": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId": 3498, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d6e8b61ed7a23334/request.json b/test-snapshots/query/d6e8b61ed7a23334/request.json new file mode 100644 index 0000000..65fd8aa --- /dev/null +++ b/test-snapshots/query/d6e8b61ed7a23334/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d707ad602ed4f4/expected.json b/test-snapshots/query/d707ad602ed4f4/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/d707ad602ed4f4/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d707ad602ed4f4/request.json b/test-snapshots/query/d707ad602ed4f4/request.json new file mode 100644 index 0000000..5e63f00 --- /dev/null +++ b/test-snapshots/query/d707ad602ed4f4/request.json @@ -0,0 +1,101 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d79bba286393c51c/expected.json b/test-snapshots/query/d79bba286393c51c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d79bba286393c51c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d79bba286393c51c/request.json b/test-snapshots/query/d79bba286393c51c/request.json new file mode 100644 index 0000000..57fe1a7 --- /dev/null +++ b/test-snapshots/query/d79bba286393c51c/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Murray" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "France" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lyon" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d7b14d0bdb8cd43c/expected.json b/test-snapshots/query/d7b14d0bdb8cd43c/expected.json new file mode 100644 index 0000000..c6174c3 --- /dev/null +++ b/test-snapshots/query/d7b14d0bdb8cd43c/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "PlaylistId_4593": 12 + }, + { + "PlaylistId_4593": 13 + }, + { + "PlaylistId_4593": 1 + }, + { + "PlaylistId_4593": 5 + }, + { + "PlaylistId_4593": 8 + }, + { + "PlaylistId_4593": 12 + }, + { + "PlaylistId_4593": 13 + }, + { + "PlaylistId_4593": 1 + }, + { + "PlaylistId_4593": 8 + }, + { + "PlaylistId_4593": 12 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d7b14d0bdb8cd43c/request.json b/test-snapshots/query/d7b14d0bdb8cd43c/request.json new file mode 100644 index 0000000..03460c4 --- /dev/null +++ b/test-snapshots/query/d7b14d0bdb8cd43c/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_4593": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d7d92d4f5233472a/expected.json b/test-snapshots/query/d7d92d4f5233472a/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/d7d92d4f5233472a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d7d92d4f5233472a/request.json b/test-snapshots/query/d7d92d4f5233472a/request.json new file mode 100644 index 0000000..f1b8f03 --- /dev/null +++ b/test-snapshots/query/d7d92d4f5233472a/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1005 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d7de69efe0a2f427/expected.json b/test-snapshots/query/d7de69efe0a2f427/expected.json new file mode 100644 index 0000000..fa02251 --- /dev/null +++ b/test-snapshots/query/d7de69efe0a2f427/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_4478": 1, + "InvoiceLineId_8992": 1, + "TrackId_2172": 2, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 1, + "InvoiceLineId_8992": 2, + "TrackId_2172": 4, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 2, + "InvoiceLineId_8992": 3, + "TrackId_2172": 6, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 2, + "InvoiceLineId_8992": 4, + "TrackId_2172": 8, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 2, + "InvoiceLineId_8992": 5, + "TrackId_2172": 10, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 2, + "InvoiceLineId_8992": 6, + "TrackId_2172": 12, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 3, + "InvoiceLineId_8992": 10, + "TrackId_2172": 28, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 3, + "InvoiceLineId_8992": 11, + "TrackId_2172": 32, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 3, + "InvoiceLineId_8992": 12, + "TrackId_2172": 36, + "UnitPrice_1527": 0.99 + }, + { + "InvoiceId_4478": 3, + "InvoiceLineId_8992": 7, + "TrackId_2172": 16, + "UnitPrice_1527": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d7de69efe0a2f427/request.json b/test-snapshots/query/d7de69efe0a2f427/request.json new file mode 100644 index 0000000..849ea0c --- /dev/null +++ b/test-snapshots/query/d7de69efe0a2f427/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_4478": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_8992": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "UnitPrice_1527": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "TrackId_2172": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d7e5eb5f180b5f9f/expected.json b/test-snapshots/query/d7e5eb5f180b5f9f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d7e5eb5f180b5f9f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d7e5eb5f180b5f9f/request.json b/test-snapshots/query/d7e5eb5f180b5f9f/request.json new file mode 100644 index 0000000..1330d38 --- /dev/null +++ b/test-snapshots/query/d7e5eb5f180b5f9f/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d7f266631492a939/expected.json b/test-snapshots/query/d7f266631492a939/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d7f266631492a939/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d7f266631492a939/request.json b/test-snapshots/query/d7f266631492a939/request.json new file mode 100644 index 0000000..14085ab --- /dev/null +++ b/test-snapshots/query/d7f266631492a939/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "manoj.pareek@rediff.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d81c64a49c9e62cc/expected.json b/test-snapshots/query/d81c64a49c9e62cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d81c64a49c9e62cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d81c64a49c9e62cc/request.json b/test-snapshots/query/d81c64a49c9e62cc/request.json new file mode 100644 index 0000000..31fb23e --- /dev/null +++ b/test-snapshots/query/d81c64a49c9e62cc/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 12 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d81f5c2eeef163de/expected.json b/test-snapshots/query/d81f5c2eeef163de/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d81f5c2eeef163de/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d81f5c2eeef163de/request.json b/test-snapshots/query/d81f5c2eeef163de/request.json new file mode 100644 index 0000000..2f27bcc --- /dev/null +++ b/test-snapshots/query/d81f5c2eeef163de/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d82349701bfa9478/expected.json b/test-snapshots/query/d82349701bfa9478/expected.json new file mode 100644 index 0000000..f45c7cc --- /dev/null +++ b/test-snapshots/query/d82349701bfa9478/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_4826": "90’s Music" + }, + { + "Name_4826": "Audiobooks" + }, + { + "Name_4826": "Audiobooks" + }, + { + "Name_4826": "Brazilian Music" + }, + { + "Name_4826": "Classical" + }, + { + "Name_4826": "Classical 101 - Deep Cuts" + }, + { + "Name_4826": "Classical 101 - Next Steps" + }, + { + "Name_4826": "Classical 101 - The Basics" + }, + { + "Name_4826": "Grunge" + }, + { + "Name_4826": "Heavy Metal Classic" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d82349701bfa9478/request.json b/test-snapshots/query/d82349701bfa9478/request.json new file mode 100644 index 0000000..e7c2cd8 --- /dev/null +++ b/test-snapshots/query/d82349701bfa9478/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_4826": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d82e7e262055a3d1/expected.json b/test-snapshots/query/d82e7e262055a3d1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d82e7e262055a3d1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d82e7e262055a3d1/request.json b/test-snapshots/query/d82e7e262055a3d1/request.json new file mode 100644 index 0000000..587ebef --- /dev/null +++ b/test-snapshots/query/d82e7e262055a3d1/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d843685af6024239/expected.json b/test-snapshots/query/d843685af6024239/expected.json new file mode 100644 index 0000000..d0af527 --- /dev/null +++ b/test-snapshots/query/d843685af6024239/expected.json @@ -0,0 +1,12 @@ +[ + { + "aggregates": { + "Address_count_8489": 59, + "CustomerId_avg_3517": 30, + "FirstName_min_7696": "Aaron", + "Phone_count_7381": 58, + "PostalCode_count_0511": 55, + "PostalCode_max_9121": "X1A 1N6" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/d843685af6024239/request.json b/test-snapshots/query/d843685af6024239/request.json new file mode 100644 index 0000000..590e805 --- /dev/null +++ b/test-snapshots/query/d843685af6024239/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Customer", + "query": { + "aggregates": { + "Address_count_8489": { + "type": "single_column", + "column": "Address", + "function": "count" + }, + "PostalCode_max_9121": { + "type": "single_column", + "column": "PostalCode", + "function": "max" + }, + "FirstName_min_7696": { + "type": "single_column", + "column": "FirstName", + "function": "min" + }, + "CustomerId_avg_3517": { + "type": "single_column", + "column": "CustomerId", + "function": "avg" + }, + "Phone_count_7381": { + "type": "single_column", + "column": "Phone", + "function": "count" + }, + "PostalCode_count_0511": { + "type": "single_column", + "column": "PostalCode", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d87c49aabfd8ef18/expected.json b/test-snapshots/query/d87c49aabfd8ef18/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d87c49aabfd8ef18/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d87c49aabfd8ef18/request.json b/test-snapshots/query/d87c49aabfd8ef18/request.json new file mode 100644 index 0000000..2068244 --- /dev/null +++ b/test-snapshots/query/d87c49aabfd8ef18/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marisa Monte" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d8a1d42557110631/expected.json b/test-snapshots/query/d8a1d42557110631/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/d8a1d42557110631/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d8a1d42557110631/request.json b/test-snapshots/query/d8a1d42557110631/request.json new file mode 100644 index 0000000..7c465cf --- /dev/null +++ b/test-snapshots/query/d8a1d42557110631/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d8c548b55900b560/expected.json b/test-snapshots/query/d8c548b55900b560/expected.json new file mode 100644 index 0000000..57556a1 --- /dev/null +++ b/test-snapshots/query/d8c548b55900b560/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1020 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d8c548b55900b560/request.json b/test-snapshots/query/d8c548b55900b560/request.json new file mode 100644 index 0000000..8c0bd70 --- /dev/null +++ b/test-snapshots/query/d8c548b55900b560/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d8c70ae8e2b676c8/expected.json b/test-snapshots/query/d8c70ae8e2b676c8/expected.json new file mode 100644 index 0000000..4742fc8 --- /dev/null +++ b/test-snapshots/query/d8c70ae8e2b676c8/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_0677": "Philip Glass Ensemble" + }, + { + "Name_0677": "Nash Ensemble" + }, + { + "Name_0677": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "Name_0677": "Emerson String Quartet" + }, + { + "Name_0677": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "Name_0677": "Gerald Moore" + }, + { + "Name_0677": "Michele Campanella" + }, + { + "Name_0677": "Itzhak Perlman" + }, + { + "Name_0677": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "Name_0677": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d8c70ae8e2b676c8/request.json b/test-snapshots/query/d8c70ae8e2b676c8/request.json new file mode 100644 index 0000000..85a1b45 --- /dev/null +++ b/test-snapshots/query/d8c70ae8e2b676c8/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_0677": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d8d80bd6377831d4/expected.json b/test-snapshots/query/d8d80bd6377831d4/expected.json new file mode 100644 index 0000000..35fac56 --- /dev/null +++ b/test-snapshots/query/d8d80bd6377831d4/expected.json @@ -0,0 +1,390 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 15, + "InvoiceLineId_2157": 77, + "Quantity_6028": 1, + "TrackId_6013": 466 + }, + { + "InvoiceId_7878": 15, + "InvoiceLineId_2157": 78, + "Quantity_6028": 1, + "TrackId_6013": 468 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 210, + "InvoiceLineId_2157": 1139, + "Quantity_6028": 1, + "TrackId_6013": 3456 + }, + { + "InvoiceId_7878": 210, + "InvoiceLineId_2157": 1140, + "Quantity_6028": 1, + "TrackId_6013": 3457 + } + ] + }, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 233, + "InvoiceLineId_2157": 1257, + "Quantity_6028": 1, + "TrackId_6013": 656 + }, + { + "InvoiceId_7878": 233, + "InvoiceLineId_2157": 1258, + "Quantity_6028": 1, + "TrackId_6013": 658 + }, + { + "InvoiceId_7878": 233, + "InvoiceLineId_2157": 1259, + "Quantity_6028": 1, + "TrackId_6013": 660 + }, + { + "InvoiceId_7878": 233, + "InvoiceLineId_2157": 1260, + "Quantity_6028": 1, + "TrackId_6013": 662 + } + ] + }, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 255, + "InvoiceLineId_2157": 1375, + "Quantity_6028": 1, + "TrackId_6013": 1362 + }, + { + "InvoiceId_7878": 255, + "InvoiceLineId_2157": 1376, + "Quantity_6028": 1, + "TrackId_6013": 1366 + }, + { + "InvoiceId_7878": 255, + "InvoiceLineId_2157": 1377, + "Quantity_6028": 1, + "TrackId_6013": 1370 + }, + { + "InvoiceId_7878": 255, + "InvoiceLineId_2157": 1378, + "Quantity_6028": 1, + "TrackId_6013": 1374 + }, + { + "InvoiceId_7878": 255, + "InvoiceLineId_2157": 1379, + "Quantity_6028": 1, + "TrackId_6013": 1378 + }, + { + "InvoiceId_7878": 255, + "InvoiceLineId_2157": 1380, + "Quantity_6028": 1, + "TrackId_6013": 1382 + } + ] + }, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 136, + "Quantity_6028": 1, + "TrackId_6013": 795 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 137, + "Quantity_6028": 1, + "TrackId_6013": 804 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 138, + "Quantity_6028": 1, + "TrackId_6013": 813 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 139, + "Quantity_6028": 1, + "TrackId_6013": 822 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 140, + "Quantity_6028": 1, + "TrackId_6013": 831 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 141, + "Quantity_6028": 1, + "TrackId_6013": 840 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 142, + "Quantity_6028": 1, + "TrackId_6013": 849 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 143, + "Quantity_6028": 1, + "TrackId_6013": 858 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 144, + "Quantity_6028": 1, + "TrackId_6013": 867 + }, + { + "InvoiceId_7878": 26, + "InvoiceLineId_2157": 145, + "Quantity_6028": 1, + "TrackId_6013": 876 + } + ] + }, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 307, + "InvoiceLineId_2157": 1670, + "Quantity_6028": 1, + "TrackId_6013": 3200 + } + ] + }, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 431, + "Quantity_6028": 1, + "TrackId_6013": 2594 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 432, + "Quantity_6028": 1, + "TrackId_6013": 2600 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 433, + "Quantity_6028": 1, + "TrackId_6013": 2606 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 434, + "Quantity_6028": 1, + "TrackId_6013": 2612 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 435, + "Quantity_6028": 1, + "TrackId_6013": 2618 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 436, + "Quantity_6028": 1, + "TrackId_6013": 2624 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 437, + "Quantity_6028": 1, + "TrackId_6013": 2630 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 438, + "Quantity_6028": 1, + "TrackId_6013": 2636 + }, + { + "InvoiceId_7878": 81, + "InvoiceLineId_2157": 439, + "Quantity_6028": 1, + "TrackId_6013": 2642 + } + ] + }, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 111, + "InvoiceLineId_2157": 606, + "Quantity_6028": 1, + "TrackId_6013": 207 + } + ] + }, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 14, + "InvoiceLineId_2157": 75, + "Quantity_6028": 1, + "TrackId_6013": 463 + }, + { + "InvoiceId_7878": 14, + "InvoiceLineId_2157": 76, + "Quantity_6028": 1, + "TrackId_6013": 464 + } + ] + }, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "FK_InvoiceLineInvoiceId": { + "rows": [ + { + "InvoiceId_7878": 232, + "InvoiceLineId_2157": 1255, + "Quantity_6028": 1, + "TrackId_6013": 652 + }, + { + "InvoiceId_7878": 232, + "InvoiceLineId_2157": 1256, + "Quantity_6028": 1, + "TrackId_6013": 654 + } + ] + }, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d8d80bd6377831d4/request.json b/test-snapshots/query/d8d80bd6377831d4/request.json new file mode 100644 index 0000000..e68d336 --- /dev/null +++ b/test-snapshots/query/d8d80bd6377831d4/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + }, + "FK_InvoiceLineInvoiceId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId_7878": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_2157": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_6028": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_6013": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d8ddc814e61e6d3b/expected.json b/test-snapshots/query/d8ddc814e61e6d3b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d8ddc814e61e6d3b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d8ddc814e61e6d3b/request.json b/test-snapshots/query/d8ddc814e61e6d3b/request.json new file mode 100644 index 0000000..056762b --- /dev/null +++ b/test-snapshots/query/d8ddc814e61e6d3b/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1600 Amphitheatre Parkway" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "ftremblay@gmail.com" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d92027a1ed7d9571/expected.json b/test-snapshots/query/d92027a1ed7d9571/expected.json new file mode 100644 index 0000000..71877bb --- /dev/null +++ b/test-snapshots/query/d92027a1ed7d9571/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2009-05-10", + "InvoiceId_7538": 32, + "Total_7873": 8.91 + }, + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2010-12-15", + "InvoiceId_7538": 161, + "Total_7873": 1.98 + }, + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2011-03-19", + "InvoiceId_7538": 184, + "Total_7873": 3.96 + }, + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2011-06-21", + "InvoiceId_7538": 206, + "Total_7873": 8.94 + }, + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2012-02-09", + "InvoiceId_7538": 258, + "Total_7873": 0.99 + }, + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2013-08-02", + "InvoiceId_7538": 379, + "Total_7873": 1.98 + }, + { + "BillingPostalCode_5841": "1016", + "BillingState_0227": "VV", + "InvoiceDate_2701": "2013-09-12", + "InvoiceId_7538": 390, + "Total_7873": 13.86 + }, + { + "BillingPostalCode_5841": "560001", + "BillingState_0227": null, + "InvoiceDate_2701": "2009-04-05", + "InvoiceId_7538": 23, + "Total_7873": 3.96 + }, + { + "BillingPostalCode_5841": "560001", + "BillingState_0227": null, + "InvoiceDate_2701": "2009-07-08", + "InvoiceId_7538": 45, + "Total_7873": 5.94 + }, + { + "BillingPostalCode_5841": "560001", + "BillingState_0227": null, + "InvoiceDate_2701": "2010-02-26", + "InvoiceId_7538": 97, + "Total_7873": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d92027a1ed7d9571/request.json b/test-snapshots/query/d92027a1ed7d9571/request.json new file mode 100644 index 0000000..659ec39 --- /dev/null +++ b/test-snapshots/query/d92027a1ed7d9571/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceDate_2701": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_7538": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total_7873": { + "type": "column", + "column": "Total", + "fields": null + }, + "BillingPostalCode_5841": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_0227": { + "type": "column", + "column": "BillingState", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d92bd3d92ddd1780/expected.json b/test-snapshots/query/d92bd3d92ddd1780/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d92bd3d92ddd1780/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d92bd3d92ddd1780/request.json b/test-snapshots/query/d92bd3d92ddd1780/request.json new file mode 100644 index 0000000..7066de2 --- /dev/null +++ b/test-snapshots/query/d92bd3d92ddd1780/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d94b16627243a85b/expected.json b/test-snapshots/query/d94b16627243a85b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d94b16627243a85b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d94b16627243a85b/request.json b/test-snapshots/query/d94b16627243a85b/request.json new file mode 100644 index 0000000..2aa47fe --- /dev/null +++ b/test-snapshots/query/d94b16627243a85b/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d95e3e83c9cba0fb/expected.json b/test-snapshots/query/d95e3e83c9cba0fb/expected.json new file mode 100644 index 0000000..d535ca9 --- /dev/null +++ b/test-snapshots/query/d95e3e83c9cba0fb/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_2459": "Music", + "PlaylistId_3198": 1 + }, + { + "Name_2459": "Movies", + "PlaylistId_3198": 2 + }, + { + "Name_2459": "TV Shows", + "PlaylistId_3198": 3 + }, + { + "Name_2459": "Audiobooks", + "PlaylistId_3198": 4 + }, + { + "Name_2459": "90’s Music", + "PlaylistId_3198": 5 + }, + { + "Name_2459": "Audiobooks", + "PlaylistId_3198": 6 + }, + { + "Name_2459": "Movies", + "PlaylistId_3198": 7 + }, + { + "Name_2459": "Music", + "PlaylistId_3198": 8 + }, + { + "Name_2459": "Music Videos", + "PlaylistId_3198": 9 + }, + { + "Name_2459": "TV Shows", + "PlaylistId_3198": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d95e3e83c9cba0fb/request.json b/test-snapshots/query/d95e3e83c9cba0fb/request.json new file mode 100644 index 0000000..6cc8d96 --- /dev/null +++ b/test-snapshots/query/d95e3e83c9cba0fb/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_2459": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_3198": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/d973ef5aff109271/expected.json b/test-snapshots/query/d973ef5aff109271/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d973ef5aff109271/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d973ef5aff109271/request.json b/test-snapshots/query/d973ef5aff109271/request.json new file mode 100644 index 0000000..9591901 --- /dev/null +++ b/test-snapshots/query/d973ef5aff109271/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Soundtrack" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d97f98ea813a8b64/expected.json b/test-snapshots/query/d97f98ea813a8b64/expected.json new file mode 100644 index 0000000..1f3ad7f --- /dev/null +++ b/test-snapshots/query/d97f98ea813a8b64/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 159, + "ArtistId": 42, + "Title": "Minas" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d97f98ea813a8b64/request.json b/test-snapshots/query/d97f98ea813a8b64/request.json new file mode 100644 index 0000000..52e6531 --- /dev/null +++ b/test-snapshots/query/d97f98ea813a8b64/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205688 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d98c08986d9d0039/expected.json b/test-snapshots/query/d98c08986d9d0039/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d98c08986d9d0039/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d98c08986d9d0039/request.json b/test-snapshots/query/d98c08986d9d0039/request.json new file mode 100644 index 0000000..937d981 --- /dev/null +++ b/test-snapshots/query/d98c08986d9d0039/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d98d72c0d3c17d4/expected.json b/test-snapshots/query/d98d72c0d3c17d4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d98d72c0d3c17d4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d98d72c0d3c17d4/request.json b/test-snapshots/query/d98d72c0d3c17d4/request.json new file mode 100644 index 0000000..ec5606d --- /dev/null +++ b/test-snapshots/query/d98d72c0d3c17d4/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "7727B 41 Ave" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-8772" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d9e7ac1c7f93c57a/expected.json b/test-snapshots/query/d9e7ac1c7f93c57a/expected.json new file mode 100644 index 0000000..96f339a --- /dev/null +++ b/test-snapshots/query/d9e7ac1c7f93c57a/expected.json @@ -0,0 +1,57 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d9e7ac1c7f93c57a/request.json b/test-snapshots/query/d9e7ac1c7f93c57a/request.json new file mode 100644 index 0000000..1658775 --- /dev/null +++ b/test-snapshots/query/d9e7ac1c7f93c57a/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "32801" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/d9ecac84a6c92f44/expected.json b/test-snapshots/query/d9ecac84a6c92f44/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/d9ecac84a6c92f44/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/d9ecac84a6c92f44/request.json b/test-snapshots/query/d9ecac84a6c92f44/request.json new file mode 100644 index 0000000..568be5a --- /dev/null +++ b/test-snapshots/query/d9ecac84a6c92f44/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da0528d3a0387a09/expected.json b/test-snapshots/query/da0528d3a0387a09/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/da0528d3a0387a09/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da0528d3a0387a09/request.json b/test-snapshots/query/da0528d3a0387a09/request.json new file mode 100644 index 0000000..c265662 --- /dev/null +++ b/test-snapshots/query/da0528d3a0387a09/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da0f1b6653e1a607/expected.json b/test-snapshots/query/da0f1b6653e1a607/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da0f1b6653e1a607/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da0f1b6653e1a607/request.json b/test-snapshots/query/da0f1b6653e1a607/request.json new file mode 100644 index 0000000..a879c71 --- /dev/null +++ b/test-snapshots/query/da0f1b6653e1a607/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/da134e8c66361751/expected.json b/test-snapshots/query/da134e8c66361751/expected.json new file mode 100644 index 0000000..1ac0676 --- /dev/null +++ b/test-snapshots/query/da134e8c66361751/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "Name_count_7791": 18, + "Name_max_5539": "TV Shows", + "Name_min_2844": "90’s Music", + "PlaylistId_max_0644": 18 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/da134e8c66361751/request.json b/test-snapshots/query/da134e8c66361751/request.json new file mode 100644 index 0000000..b4b885e --- /dev/null +++ b/test-snapshots/query/da134e8c66361751/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.Playlist", + "query": { + "aggregates": { + "Name_count_7791": { + "type": "single_column", + "column": "Name", + "function": "count" + }, + "Name_max_5539": { + "type": "single_column", + "column": "Name", + "function": "max" + }, + "Name_min_2844": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "PlaylistId_max_0644": { + "type": "single_column", + "column": "PlaylistId", + "function": "max" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/da189886edbbd4af/expected.json b/test-snapshots/query/da189886edbbd4af/expected.json new file mode 100644 index 0000000..3c3abf7 --- /dev/null +++ b/test-snapshots/query/da189886edbbd4af/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_8848": 1 + }, + { + "ArtistId_8848": 2 + }, + { + "ArtistId_8848": 3 + }, + { + "ArtistId_8848": 4 + }, + { + "ArtistId_8848": 5 + }, + { + "ArtistId_8848": 6 + }, + { + "ArtistId_8848": 7 + }, + { + "ArtistId_8848": 8 + }, + { + "ArtistId_8848": 9 + }, + { + "ArtistId_8848": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da189886edbbd4af/request.json b/test-snapshots/query/da189886edbbd4af/request.json new file mode 100644 index 0000000..4e12bd4 --- /dev/null +++ b/test-snapshots/query/da189886edbbd4af/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_8848": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/da1bd8f7229ea61f/expected.json b/test-snapshots/query/da1bd8f7229ea61f/expected.json new file mode 100644 index 0000000..eaad8d7 --- /dev/null +++ b/test-snapshots/query/da1bd8f7229ea61f/expected.json @@ -0,0 +1,22 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da1bd8f7229ea61f/request.json b/test-snapshots/query/da1bd8f7229ea61f/request.json new file mode 100644 index 0000000..3555246 --- /dev/null +++ b/test-snapshots/query/da1bd8f7229ea61f/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da24f19c0811f91e/expected.json b/test-snapshots/query/da24f19c0811f91e/expected.json new file mode 100644 index 0000000..cdf4678 --- /dev/null +++ b/test-snapshots/query/da24f19c0811f91e/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "AlbumId_5478": 200, + "Bytes_7182": 38747, + "Composer_3138": "Samuel Rosa", + "GenreId_5029": 1, + "Milliseconds_6978": 1071, + "Name_5843": "É Uma Partida De Futebol" + }, + { + "AlbumId_5478": 18, + "Bytes_7182": 161266, + "Composer_3138": null, + "GenreId_5029": 4, + "Milliseconds_6978": 4884, + "Name_5843": "Now Sports" + }, + { + "AlbumId_5478": 18, + "Bytes_7182": 211997, + "Composer_3138": null, + "GenreId_5029": 4, + "Milliseconds_6978": 6373, + "Name_5843": "A Statistic" + }, + { + "AlbumId_5478": 18, + "Bytes_7182": 224313, + "Composer_3138": null, + "GenreId_5029": 4, + "Milliseconds_6978": 6635, + "Name_5843": "Oprah" + }, + { + "AlbumId_5478": 258, + "Bytes_7182": 319888, + "Composer_3138": "L. Muggerud", + "GenreId_5029": 17, + "Milliseconds_6978": 7941, + "Name_5843": "Commercial 1" + }, + { + "AlbumId_5478": 18, + "Bytes_7182": 387360, + "Composer_3138": null, + "GenreId_5029": 4, + "Milliseconds_6978": 11650, + "Name_5843": "The Real Problem" + }, + { + "AlbumId_5478": 258, + "Bytes_7182": 850698, + "Composer_3138": "L. Muggerud", + "GenreId_5029": 17, + "Milliseconds_6978": 21211, + "Name_5843": "Commercial 2" + }, + { + "AlbumId_5478": 184, + "Bytes_7182": 967098, + "Composer_3138": null, + "GenreId_5029": 17, + "Milliseconds_6978": 29048, + "Name_5843": "Bossa" + }, + { + "AlbumId_5478": 85, + "Bytes_7182": 1039615, + "Composer_3138": "Gilberto Gil", + "GenreId_5029": 10, + "Milliseconds_6978": 32287, + "Name_5843": "Casinha Feliz" + }, + { + "AlbumId_5478": 24, + "Bytes_7182": 1103013, + "Composer_3138": "Chico Science", + "GenreId_5029": 7, + "Milliseconds_6978": 33149, + "Name_5843": "Mateus Enter" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da24f19c0811f91e/request.json b/test-snapshots/query/da24f19c0811f91e/request.json new file mode 100644 index 0000000..37b4fb5 --- /dev/null +++ b/test-snapshots/query/da24f19c0811f91e/request.json @@ -0,0 +1,60 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_5478": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7182": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_3138": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_5029": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_5843": { + "type": "column", + "column": "Name", + "fields": null + }, + "Milliseconds_6978": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/da3197ffb091c5a3/expected.json b/test-snapshots/query/da3197ffb091c5a3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da3197ffb091c5a3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da3197ffb091c5a3/request.json b/test-snapshots/query/da3197ffb091c5a3/request.json new file mode 100644 index 0000000..0f43e22 --- /dev/null +++ b/test-snapshots/query/da3197ffb091c5a3/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/da5017f6b8e9f32e/expected.json b/test-snapshots/query/da5017f6b8e9f32e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da5017f6b8e9f32e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da5017f6b8e9f32e/request.json b/test-snapshots/query/da5017f6b8e9f32e/request.json new file mode 100644 index 0000000..96e33ea --- /dev/null +++ b/test-snapshots/query/da5017f6b8e9f32e/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Steve" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da67031e8d391874/expected.json b/test-snapshots/query/da67031e8d391874/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da67031e8d391874/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da67031e8d391874/request.json b/test-snapshots/query/da67031e8d391874/request.json new file mode 100644 index 0000000..ed21886 --- /dev/null +++ b/test-snapshots/query/da67031e8d391874/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da771956596639ab/expected.json b/test-snapshots/query/da771956596639ab/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da771956596639ab/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da771956596639ab/request.json b/test-snapshots/query/da771956596639ab/request.json new file mode 100644 index 0000000..8398ddb --- /dev/null +++ b/test-snapshots/query/da771956596639ab/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Park" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-05-03" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da87224d94144f2/expected.json b/test-snapshots/query/da87224d94144f2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da87224d94144f2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da87224d94144f2/request.json b/test-snapshots/query/da87224d94144f2/request.json new file mode 100644 index 0000000..faca060 --- /dev/null +++ b/test-snapshots/query/da87224d94144f2/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da8d1a5fc36be52b/expected.json b/test-snapshots/query/da8d1a5fc36be52b/expected.json new file mode 100644 index 0000000..09fbb30 --- /dev/null +++ b/test-snapshots/query/da8d1a5fc36be52b/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_4745": 43, + "Name_0025": "A Cor Do Som" + }, + { + "ArtistId_4745": 230, + "Name_0025": "Aaron Copland & London Symphony Orchestra" + }, + { + "ArtistId_4745": 202, + "Name_0025": "Aaron Goldberg" + }, + { + "ArtistId_4745": 1, + "Name_0025": "AC/DC" + }, + { + "ArtistId_4745": 214, + "Name_0025": "Academy of St. Martin in the Fields & Sir Neville Marriner" + }, + { + "ArtistId_4745": 215, + "Name_0025": "Academy of St. Martin in the Fields Chamber Ensemble & Sir Neville Marriner" + }, + { + "ArtistId_4745": 222, + "Name_0025": "Academy of St. Martin in the Fields, John Birch, Sir Neville Marriner & Sylvia McNair" + }, + { + "ArtistId_4745": 257, + "Name_0025": "Academy of St. Martin in the Fields, Sir Neville Marriner & Thurston Dart" + }, + { + "ArtistId_4745": 239, + "Name_0025": "Academy of St. Martin in the Fields, Sir Neville Marriner & William Bennett" + }, + { + "ArtistId_4745": 2, + "Name_0025": "Accept" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da8d1a5fc36be52b/request.json b/test-snapshots/query/da8d1a5fc36be52b/request.json new file mode 100644 index 0000000..6697534 --- /dev/null +++ b/test-snapshots/query/da8d1a5fc36be52b/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_4745": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_0025": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/da9081d766a9b0ee/expected.json b/test-snapshots/query/da9081d766a9b0ee/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/da9081d766a9b0ee/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da9081d766a9b0ee/request.json b/test-snapshots/query/da9081d766a9b0ee/request.json new file mode 100644 index 0000000..3580660 --- /dev/null +++ b/test-snapshots/query/da9081d766a9b0ee/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/da9db5cab79c5941/expected.json b/test-snapshots/query/da9db5cab79c5941/expected.json new file mode 100644 index 0000000..e93dd69 --- /dev/null +++ b/test-snapshots/query/da9db5cab79c5941/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_8964": "Zeca Pagodinho" + }, + { + "Name_8964": "Youssou N'Dour" + }, + { + "Name_8964": "Yo-Yo Ma" + }, + { + "Name_8964": "Yehudi Menuhin" + }, + { + "Name_8964": "Xis" + }, + { + "Name_8964": "Wilhelm Kempff" + }, + { + "Name_8964": "Whitesnake" + }, + { + "Name_8964": "Vinicius, Toquinho & Quarteto Em Cy" + }, + { + "Name_8964": "Vinícius E Qurteto Em Cy" + }, + { + "Name_8964": "Vinícius E Odette Lara" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/da9db5cab79c5941/request.json b/test-snapshots/query/da9db5cab79c5941/request.json new file mode 100644 index 0000000..c56e14f --- /dev/null +++ b/test-snapshots/query/da9db5cab79c5941/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_8964": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/daa6c08495dc0332/expected.json b/test-snapshots/query/daa6c08495dc0332/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/daa6c08495dc0332/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/daa6c08495dc0332/request.json b/test-snapshots/query/daa6c08495dc0332/request.json new file mode 100644 index 0000000..74bf339 --- /dev/null +++ b/test-snapshots/query/daa6c08495dc0332/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Manager" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/daad398de45c2980/expected.json b/test-snapshots/query/daad398de45c2980/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/daad398de45c2980/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/daad398de45c2980/request.json b/test-snapshots/query/daad398de45c2980/request.json new file mode 100644 index 0000000..88d422d --- /dev/null +++ b/test-snapshots/query/daad398de45c2980/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dac256b8f54e048e/expected.json b/test-snapshots/query/dac256b8f54e048e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dac256b8f54e048e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dac256b8f54e048e/request.json b/test-snapshots/query/dac256b8f54e048e/request.json new file mode 100644 index 0000000..7b85205 --- /dev/null +++ b/test-snapshots/query/dac256b8f54e048e/request.json @@ -0,0 +1,101 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/daea6b10f09a952d/expected.json b/test-snapshots/query/daea6b10f09a952d/expected.json new file mode 100644 index 0000000..9416051 --- /dev/null +++ b/test-snapshots/query/daea6b10f09a952d/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_9324": 275, + "Name_9524": "Philip Glass Ensemble" + }, + { + "ArtistId_9324": 274, + "Name_9524": "Nash Ensemble" + }, + { + "ArtistId_9324": 273, + "Name_9524": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "ArtistId_9324": 272, + "Name_9524": "Emerson String Quartet" + }, + { + "ArtistId_9324": 271, + "Name_9524": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "ArtistId_9324": 270, + "Name_9524": "Gerald Moore" + }, + { + "ArtistId_9324": 269, + "Name_9524": "Michele Campanella" + }, + { + "ArtistId_9324": 268, + "Name_9524": "Itzhak Perlman" + }, + { + "ArtistId_9324": 267, + "Name_9524": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "ArtistId_9324": 266, + "Name_9524": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/daea6b10f09a952d/request.json b/test-snapshots/query/daea6b10f09a952d/request.json new file mode 100644 index 0000000..670d218 --- /dev/null +++ b/test-snapshots/query/daea6b10f09a952d/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_9324": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_9524": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/daf56a44b27e59cb/expected.json b/test-snapshots/query/daf56a44b27e59cb/expected.json new file mode 100644 index 0000000..91a4ea9 --- /dev/null +++ b/test-snapshots/query/daf56a44b27e59cb/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "GenreId_4296": 16 + }, + { + "GenreId_4296": 19 + }, + { + "GenreId_4296": 10 + }, + { + "GenreId_4296": 18 + }, + { + "GenreId_4296": 20 + }, + { + "GenreId_4296": 5 + }, + { + "GenreId_4296": 1 + }, + { + "GenreId_4296": 8 + }, + { + "GenreId_4296": 14 + }, + { + "GenreId_4296": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/daf56a44b27e59cb/request.json b/test-snapshots/query/daf56a44b27e59cb/request.json new file mode 100644 index 0000000..e10ed30 --- /dev/null +++ b/test-snapshots/query/daf56a44b27e59cb/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_4296": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/daf96ca890814db1/expected.json b/test-snapshots/query/daf96ca890814db1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/daf96ca890814db1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/daf96ca890814db1/request.json b/test-snapshots/query/daf96ca890814db1/request.json new file mode 100644 index 0000000..a949088 --- /dev/null +++ b/test-snapshots/query/daf96ca890814db1/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 47 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3254 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/db015e00d0ca75e8/expected.json b/test-snapshots/query/db015e00d0ca75e8/expected.json new file mode 100644 index 0000000..2a71f3e --- /dev/null +++ b/test-snapshots/query/db015e00d0ca75e8/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_4507": 1 + }, + { + "ArtistId_4507": 2 + }, + { + "ArtistId_4507": 3 + }, + { + "ArtistId_4507": 4 + }, + { + "ArtistId_4507": 5 + }, + { + "ArtistId_4507": 6 + }, + { + "ArtistId_4507": 7 + }, + { + "ArtistId_4507": 8 + }, + { + "ArtistId_4507": 9 + }, + { + "ArtistId_4507": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db015e00d0ca75e8/request.json b/test-snapshots/query/db015e00d0ca75e8/request.json new file mode 100644 index 0000000..729748d --- /dev/null +++ b/test-snapshots/query/db015e00d0ca75e8/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_4507": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db0de212bcd59c8e/expected.json b/test-snapshots/query/db0de212bcd59c8e/expected.json new file mode 100644 index 0000000..9ef7492 --- /dev/null +++ b/test-snapshots/query/db0de212bcd59c8e/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId_8966": 18, + "TrackId_4743": 597 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1278 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1283 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1335 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1345 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1380 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1392 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 152 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 160 + }, + { + "PlaylistId_8966": 17, + "TrackId_4743": 1801 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db0de212bcd59c8e/request.json b/test-snapshots/query/db0de212bcd59c8e/request.json new file mode 100644 index 0000000..7d9aea8 --- /dev/null +++ b/test-snapshots/query/db0de212bcd59c8e/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId_8966": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_4743": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db1238c0b7a52317/expected.json b/test-snapshots/query/db1238c0b7a52317/expected.json new file mode 100644 index 0000000..3512dbd --- /dev/null +++ b/test-snapshots/query/db1238c0b7a52317/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db1238c0b7a52317/request.json b/test-snapshots/query/db1238c0b7a52317/request.json new file mode 100644 index 0000000..722ea70 --- /dev/null +++ b/test-snapshots/query/db1238c0b7a52317/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db26ad2ae273b8ce/expected.json b/test-snapshots/query/db26ad2ae273b8ce/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/db26ad2ae273b8ce/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db26ad2ae273b8ce/request.json b/test-snapshots/query/db26ad2ae273b8ce/request.json new file mode 100644 index 0000000..ab0024b --- /dev/null +++ b/test-snapshots/query/db26ad2ae273b8ce/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 343719 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/db2fe05997742fed/expected.json b/test-snapshots/query/db2fe05997742fed/expected.json new file mode 100644 index 0000000..7d9f7cf --- /dev/null +++ b/test-snapshots/query/db2fe05997742fed/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db2fe05997742fed/request.json b/test-snapshots/query/db2fe05997742fed/request.json new file mode 100644 index 0000000..92a0b8c --- /dev/null +++ b/test-snapshots/query/db2fe05997742fed/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13.86 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/db37041f3eff683/expected.json b/test-snapshots/query/db37041f3eff683/expected.json new file mode 100644 index 0000000..f45d8c0 --- /dev/null +++ b/test-snapshots/query/db37041f3eff683/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db37041f3eff683/request.json b/test-snapshots/query/db37041f3eff683/request.json new file mode 100644 index 0000000..d7e70c0 --- /dev/null +++ b/test-snapshots/query/db37041f3eff683/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.98 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db57fc1948d8afcc/expected.json b/test-snapshots/query/db57fc1948d8afcc/expected.json new file mode 100644 index 0000000..37b610d --- /dev/null +++ b/test-snapshots/query/db57fc1948d8afcc/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_3556": 347, + "ArtistId_5064": 275, + "Title_7769": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_3556": 346, + "ArtistId_5064": 274, + "Title_7769": "Mozart: Chamber Music" + }, + { + "AlbumId_3556": 345, + "ArtistId_5064": 273, + "Title_7769": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_3556": 344, + "ArtistId_5064": 272, + "Title_7769": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_3556": 343, + "ArtistId_5064": 226, + "Title_7769": "Respighi:Pines of Rome" + }, + { + "AlbumId_3556": 342, + "ArtistId_5064": 271, + "Title_7769": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_3556": 341, + "ArtistId_5064": 270, + "Title_7769": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_3556": 340, + "ArtistId_5064": 269, + "Title_7769": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_3556": 339, + "ArtistId_5064": 268, + "Title_7769": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_3556": 338, + "ArtistId_5064": 267, + "Title_7769": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db57fc1948d8afcc/request.json b/test-snapshots/query/db57fc1948d8afcc/request.json new file mode 100644 index 0000000..651994b --- /dev/null +++ b/test-snapshots/query/db57fc1948d8afcc/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_3556": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_5064": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_7769": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db5dc065eee1afa1/expected.json b/test-snapshots/query/db5dc065eee1afa1/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/db5dc065eee1afa1/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db5dc065eee1afa1/request.json b/test-snapshots/query/db5dc065eee1afa1/request.json new file mode 100644 index 0000000..2a4f70e --- /dev/null +++ b/test-snapshots/query/db5dc065eee1afa1/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db697990ea99d69c/expected.json b/test-snapshots/query/db697990ea99d69c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/db697990ea99d69c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db697990ea99d69c/request.json b/test-snapshots/query/db697990ea99d69c/request.json new file mode 100644 index 0000000..9b7ff5f --- /dev/null +++ b/test-snapshots/query/db697990ea99d69c/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - The Basics" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db6adaa4ff4ce158/expected.json b/test-snapshots/query/db6adaa4ff4ce158/expected.json new file mode 100644 index 0000000..3a1a0f8 --- /dev/null +++ b/test-snapshots/query/db6adaa4ff4ce158/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_0093": 25, + "Name_1674": "Opera" + }, + { + "GenreId_0093": 24, + "Name_1674": "Classical" + }, + { + "GenreId_0093": 23, + "Name_1674": "Alternative" + }, + { + "GenreId_0093": 22, + "Name_1674": "Comedy" + }, + { + "GenreId_0093": 21, + "Name_1674": "Drama" + }, + { + "GenreId_0093": 20, + "Name_1674": "Sci Fi & Fantasy" + }, + { + "GenreId_0093": 19, + "Name_1674": "TV Shows" + }, + { + "GenreId_0093": 18, + "Name_1674": "Science Fiction" + }, + { + "GenreId_0093": 17, + "Name_1674": "Hip Hop/Rap" + }, + { + "GenreId_0093": 16, + "Name_1674": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db6adaa4ff4ce158/request.json b/test-snapshots/query/db6adaa4ff4ce158/request.json new file mode 100644 index 0000000..87c942b --- /dev/null +++ b/test-snapshots/query/db6adaa4ff4ce158/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_0093": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_1674": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db77d250968b0def/expected.json b/test-snapshots/query/db77d250968b0def/expected.json new file mode 100644 index 0000000..e4dd014 --- /dev/null +++ b/test-snapshots/query/db77d250968b0def/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "AlbumId_5390": 1 + }, + { + "AlbumId_5390": 4 + }, + { + "AlbumId_5390": 2 + }, + { + "AlbumId_5390": 3 + }, + { + "AlbumId_5390": 5 + }, + { + "AlbumId_5390": 6 + }, + { + "AlbumId_5390": 7 + }, + { + "AlbumId_5390": 34 + }, + { + "AlbumId_5390": 8 + }, + { + "AlbumId_5390": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db77d250968b0def/request.json b/test-snapshots/query/db77d250968b0def/request.json new file mode 100644 index 0000000..8e9101c --- /dev/null +++ b/test-snapshots/query/db77d250968b0def/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_5390": { + "type": "column", + "column": "AlbumId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/db7b04738add47b7/expected.json b/test-snapshots/query/db7b04738add47b7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/db7b04738add47b7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/db7b04738add47b7/request.json b/test-snapshots/query/db7b04738add47b7/request.json new file mode 100644 index 0000000..af3e94d --- /dev/null +++ b/test-snapshots/query/db7b04738add47b7/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal Classic" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dba384f2d8bc0b1e/expected.json b/test-snapshots/query/dba384f2d8bc0b1e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dba384f2d8bc0b1e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dba384f2d8bc0b1e/request.json b/test-snapshots/query/dba384f2d8bc0b1e/request.json new file mode 100644 index 0000000..d1d70f9 --- /dev/null +++ b/test-snapshots/query/dba384f2d8bc0b1e/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dbaa509f664d2b8/expected.json b/test-snapshots/query/dbaa509f664d2b8/expected.json new file mode 100644 index 0000000..1f4040c --- /dev/null +++ b/test-snapshots/query/dbaa509f664d2b8/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dbaa509f664d2b8/request.json b/test-snapshots/query/dbaa509f664d2b8/request.json new file mode 100644 index 0000000..02fe058 --- /dev/null +++ b/test-snapshots/query/dbaa509f664d2b8/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dbbafa53140fabe6/expected.json b/test-snapshots/query/dbbafa53140fabe6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dbbafa53140fabe6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dbbafa53140fabe6/request.json b/test-snapshots/query/dbbafa53140fabe6/request.json new file mode 100644 index 0000000..17fad94 --- /dev/null +++ b/test-snapshots/query/dbbafa53140fabe6/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Soundtrack" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dbc367023d65f502/expected.json b/test-snapshots/query/dbc367023d65f502/expected.json new file mode 100644 index 0000000..d206b20 --- /dev/null +++ b/test-snapshots/query/dbc367023d65f502/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1007 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dbc367023d65f502/request.json b/test-snapshots/query/dbc367023d65f502/request.json new file mode 100644 index 0000000..a34722e --- /dev/null +++ b/test-snapshots/query/dbc367023d65f502/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1007 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dbd1bc88c95413fc/expected.json b/test-snapshots/query/dbd1bc88c95413fc/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/dbd1bc88c95413fc/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dbd1bc88c95413fc/request.json b/test-snapshots/query/dbd1bc88c95413fc/request.json new file mode 100644 index 0000000..4e22ab3 --- /dev/null +++ b/test-snapshots/query/dbd1bc88c95413fc/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dbdead57c42a8295/expected.json b/test-snapshots/query/dbdead57c42a8295/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dbdead57c42a8295/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dbdead57c42a8295/request.json b/test-snapshots/query/dbdead57c42a8295/request.json new file mode 100644 index 0000000..906f9c1 --- /dev/null +++ b/test-snapshots/query/dbdead57c42a8295/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dbf2e9cac468a2fa/expected.json b/test-snapshots/query/dbf2e9cac468a2fa/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dbf2e9cac468a2fa/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dbf2e9cac468a2fa/request.json b/test-snapshots/query/dbf2e9cac468a2fa/request.json new file mode 100644 index 0000000..4a85787 --- /dev/null +++ b/test-snapshots/query/dbf2e9cac468a2fa/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc06ae558fef80ff/expected.json b/test-snapshots/query/dc06ae558fef80ff/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/dc06ae558fef80ff/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc06ae558fef80ff/request.json b/test-snapshots/query/dc06ae558fef80ff/request.json new file mode 100644 index 0000000..3ab7a4c --- /dev/null +++ b/test-snapshots/query/dc06ae558fef80ff/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Breaking The Rules" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc0bb790be677583/expected.json b/test-snapshots/query/dc0bb790be677583/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dc0bb790be677583/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc0bb790be677583/request.json b/test-snapshots/query/dc0bb790be677583/request.json new file mode 100644 index 0000000..5ccb17a --- /dev/null +++ b/test-snapshots/query/dc0bb790be677583/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc358186ca9369ab/expected.json b/test-snapshots/query/dc358186ca9369ab/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dc358186ca9369ab/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc358186ca9369ab/request.json b/test-snapshots/query/dc358186ca9369ab/request.json new file mode 100644 index 0000000..07b8111 --- /dev/null +++ b/test-snapshots/query/dc358186ca9369ab/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc3e6962f09fb423/expected.json b/test-snapshots/query/dc3e6962f09fb423/expected.json new file mode 100644 index 0000000..bd930e3 --- /dev/null +++ b/test-snapshots/query/dc3e6962f09fb423/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "BillingAddress": "5112 48 Street", + "BillingCity": "Yellowknife", + "BillingCountry": "Canada", + "BillingPostalCode": "X1A 1N6", + "BillingState": "NT", + "CustomerId": 33, + "InvoiceDate": "2011-07-25", + "InvoiceId": 214, + "Total": 8.91 + }, + { + "BillingAddress": "Theodor-Heuss-Straße 34", + "BillingCity": "Stuttgart", + "BillingCountry": "Germany", + "BillingPostalCode": "70174", + "BillingState": null, + "CustomerId": 2, + "InvoiceDate": "2009-01-01", + "InvoiceId": 1, + "Total": 1.98 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc3e6962f09fb423/request.json b/test-snapshots/query/dc3e6962f09fb423/request.json new file mode 100644 index 0000000..2bf4308 --- /dev/null +++ b/test-snapshots/query/dc3e6962f09fb423/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc450e2fba6abc80/expected.json b/test-snapshots/query/dc450e2fba6abc80/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dc450e2fba6abc80/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc450e2fba6abc80/request.json b/test-snapshots/query/dc450e2fba6abc80/request.json new file mode 100644 index 0000000..b41fe84 --- /dev/null +++ b/test-snapshots/query/dc450e2fba6abc80/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc6fcc5b37327e08/expected.json b/test-snapshots/query/dc6fcc5b37327e08/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dc6fcc5b37327e08/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc6fcc5b37327e08/request.json b/test-snapshots/query/dc6fcc5b37327e08/request.json new file mode 100644 index 0000000..4a8cb3e --- /dev/null +++ b/test-snapshots/query/dc6fcc5b37327e08/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Spellbound" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dc76d33a15ea9670/expected.json b/test-snapshots/query/dc76d33a15ea9670/expected.json new file mode 100644 index 0000000..b4d2f75 --- /dev/null +++ b/test-snapshots/query/dc76d33a15ea9670/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9929799, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 302994, + "Name": "What If I Do?", + "TrackId": 1000, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dc76d33a15ea9670/request.json b/test-snapshots/query/dc76d33a15ea9670/request.json new file mode 100644 index 0000000..b8b9e67 --- /dev/null +++ b/test-snapshots/query/dc76d33a15ea9670/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1000 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dca6401cac3b33f3/expected.json b/test-snapshots/query/dca6401cac3b33f3/expected.json new file mode 100644 index 0000000..27a3bca --- /dev/null +++ b/test-snapshots/query/dca6401cac3b33f3/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 107, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dca6401cac3b33f3/request.json b/test-snapshots/query/dca6401cac3b33f3/request.json new file mode 100644 index 0000000..2fe3c28 --- /dev/null +++ b/test-snapshots/query/dca6401cac3b33f3/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dcdef1aeed003aef/expected.json b/test-snapshots/query/dcdef1aeed003aef/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/dcdef1aeed003aef/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dcdef1aeed003aef/request.json b/test-snapshots/query/dcdef1aeed003aef/request.json new file mode 100644 index 0000000..21d44ad --- /dev/null +++ b/test-snapshots/query/dcdef1aeed003aef/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6599424 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dcffdbca86774ab3/expected.json b/test-snapshots/query/dcffdbca86774ab3/expected.json new file mode 100644 index 0000000..ae2963e --- /dev/null +++ b/test-snapshots/query/dcffdbca86774ab3/expected.json @@ -0,0 +1,126 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1020 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1021 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1022 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1023 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1024 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1025 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1026 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1027 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1028 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "Name_5257": "90’s Music", + "PlaylistId_5630": 5 + } + ] + }, + "PlaylistId": 5, + "TrackId": 1029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dcffdbca86774ab3/request.json b/test-snapshots/query/dcffdbca86774ab3/request.json new file mode 100644 index 0000000..e7d2373 --- /dev/null +++ b/test-snapshots/query/dcffdbca86774ab3/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "Name_5257": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_5630": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dd050d591440a235/expected.json b/test-snapshots/query/dd050d591440a235/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/dd050d591440a235/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dd050d591440a235/request.json b/test-snapshots/query/dd050d591440a235/request.json new file mode 100644 index 0000000..7f8c666 --- /dev/null +++ b/test-snapshots/query/dd050d591440a235/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dd83e55413616e6a/expected.json b/test-snapshots/query/dd83e55413616e6a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/dd83e55413616e6a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dd83e55413616e6a/request.json b/test-snapshots/query/dd83e55413616e6a/request.json new file mode 100644 index 0000000..8718d5d --- /dev/null +++ b/test-snapshots/query/dd83e55413616e6a/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ddb1dc6b0e483c4d/expected.json b/test-snapshots/query/ddb1dc6b0e483c4d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ddb1dc6b0e483c4d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ddb1dc6b0e483c4d/request.json b/test-snapshots/query/ddb1dc6b0e483c4d/request.json new file mode 100644 index 0000000..4f44ea9 --- /dev/null +++ b/test-snapshots/query/ddb1dc6b0e483c4d/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dde48fad2797ed02/expected.json b/test-snapshots/query/dde48fad2797ed02/expected.json new file mode 100644 index 0000000..33eaf38 --- /dev/null +++ b/test-snapshots/query/dde48fad2797ed02/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 4506425, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 278312, + "Name": "#9 Dream", + "TrackId": 3254, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dde48fad2797ed02/request.json b/test-snapshots/query/dde48fad2797ed02/request.json new file mode 100644 index 0000000..c522e37 --- /dev/null +++ b/test-snapshots/query/dde48fad2797ed02/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3254 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ddfdd29dc38517c7/expected.json b/test-snapshots/query/ddfdd29dc38517c7/expected.json new file mode 100644 index 0000000..8a5d588 --- /dev/null +++ b/test-snapshots/query/ddfdd29dc38517c7/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ddfdd29dc38517c7/request.json b/test-snapshots/query/ddfdd29dc38517c7/request.json new file mode 100644 index 0000000..13d8d16 --- /dev/null +++ b/test-snapshots/query/ddfdd29dc38517c7/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/de41338434edddce/expected.json b/test-snapshots/query/de41338434edddce/expected.json new file mode 100644 index 0000000..4c2c144 --- /dev/null +++ b/test-snapshots/query/de41338434edddce/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_7100": 275 + }, + { + "ArtistId_7100": 274 + }, + { + "ArtistId_7100": 273 + }, + { + "ArtistId_7100": 272 + }, + { + "ArtistId_7100": 271 + }, + { + "ArtistId_7100": 270 + }, + { + "ArtistId_7100": 269 + }, + { + "ArtistId_7100": 268 + }, + { + "ArtistId_7100": 267 + }, + { + "ArtistId_7100": 266 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/de41338434edddce/request.json b/test-snapshots/query/de41338434edddce/request.json new file mode 100644 index 0000000..c3edb96 --- /dev/null +++ b/test-snapshots/query/de41338434edddce/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_7100": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/de52543058375668/expected.json b/test-snapshots/query/de52543058375668/expected.json new file mode 100644 index 0000000..7b40c93 --- /dev/null +++ b/test-snapshots/query/de52543058375668/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "GenreId_median_5198": 3, + "TrackId_min_7719": 1, + "UnitPrice_count_2902": 3503 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/de52543058375668/request.json b/test-snapshots/query/de52543058375668/request.json new file mode 100644 index 0000000..2ce1844 --- /dev/null +++ b/test-snapshots/query/de52543058375668/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.Track", + "query": { + "aggregates": { + "TrackId_min_7719": { + "type": "single_column", + "column": "TrackId", + "function": "min" + }, + "UnitPrice_count_2902": { + "type": "single_column", + "column": "UnitPrice", + "function": "count" + }, + "GenreId_median_5198": { + "type": "single_column", + "column": "GenreId", + "function": "median" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/de9a5bcc88bebc4/expected.json b/test-snapshots/query/de9a5bcc88bebc4/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/de9a5bcc88bebc4/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/de9a5bcc88bebc4/request.json b/test-snapshots/query/de9a5bcc88bebc4/request.json new file mode 100644 index 0000000..38a7978 --- /dev/null +++ b/test-snapshots/query/de9a5bcc88bebc4/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dedf45e844fa88f/expected.json b/test-snapshots/query/dedf45e844fa88f/expected.json new file mode 100644 index 0000000..333755a --- /dev/null +++ b/test-snapshots/query/dedf45e844fa88f/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 12, + "Name": "Easy Listening" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dedf45e844fa88f/request.json b/test-snapshots/query/dedf45e844fa88f/request.json new file mode 100644 index 0000000..da1bbdf --- /dev/null +++ b/test-snapshots/query/dedf45e844fa88f/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Easy Listening" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dee38104141c9a41/expected.json b/test-snapshots/query/dee38104141c9a41/expected.json new file mode 100644 index 0000000..2a5ce9b --- /dev/null +++ b/test-snapshots/query/dee38104141c9a41/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 4448025, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 274644, + "Name": "Give Peace a Chance", + "TrackId": 3256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dee38104141c9a41/request.json b/test-snapshots/query/dee38104141c9a41/request.json new file mode 100644 index 0000000..23690d8 --- /dev/null +++ b/test-snapshots/query/dee38104141c9a41/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/df2f8c0dd9c53322/expected.json b/test-snapshots/query/df2f8c0dd9c53322/expected.json new file mode 100644 index 0000000..0f9cd54 --- /dev/null +++ b/test-snapshots/query/df2f8c0dd9c53322/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/df2f8c0dd9c53322/request.json b/test-snapshots/query/df2f8c0dd9c53322/request.json new file mode 100644 index 0000000..a553d81 --- /dev/null +++ b/test-snapshots/query/df2f8c0dd9c53322/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "manoj.pareek@rediff.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/df3af8958598fee9/expected.json b/test-snapshots/query/df3af8958598fee9/expected.json new file mode 100644 index 0000000..3146566 --- /dev/null +++ b/test-snapshots/query/df3af8958598fee9/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/df3af8958598fee9/request.json b/test-snapshots/query/df3af8958598fee9/request.json new file mode 100644 index 0000000..1f00f40 --- /dev/null +++ b/test-snapshots/query/df3af8958598fee9/request.json @@ -0,0 +1,138 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8596840 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/df4733fcddb9bed8/expected.json b/test-snapshots/query/df4733fcddb9bed8/expected.json new file mode 100644 index 0000000..c09678e --- /dev/null +++ b/test-snapshots/query/df4733fcddb9bed8/expected.json @@ -0,0 +1,72 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 5881293, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 175333, + "Name": "Amor De Muito", + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7541688, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 227317, + "Name": "Samba Do Lado", + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "AlbumId": 24, + "Bytes": 7960868, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 240091, + "Name": "Sobremesa", + "TrackId": 256, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/df4733fcddb9bed8/request.json b/test-snapshots/query/df4733fcddb9bed8/request.json new file mode 100644 index 0000000..b130795 --- /dev/null +++ b/test-snapshots/query/df4733fcddb9bed8/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/df7899d95ee329f8/expected.json b/test-snapshots/query/df7899d95ee329f8/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/df7899d95ee329f8/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/df7899d95ee329f8/request.json b/test-snapshots/query/df7899d95ee329f8/request.json new file mode 100644 index 0000000..9c28234 --- /dev/null +++ b/test-snapshots/query/df7899d95ee329f8/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/df9eb37cfe4ef659/expected.json b/test-snapshots/query/df9eb37cfe4ef659/expected.json new file mode 100644 index 0000000..c834aa7 --- /dev/null +++ b/test-snapshots/query/df9eb37cfe4ef659/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "CustomerId_7494": 2, + "LastName_3794": "Köhler" + }, + { + "CustomerId_7494": 4, + "LastName_3794": "Hansen" + }, + { + "CustomerId_7494": 5, + "LastName_3794": "Wichterlová" + }, + { + "CustomerId_7494": 6, + "LastName_3794": "Holý" + }, + { + "CustomerId_7494": 7, + "LastName_3794": "Gruber" + }, + { + "CustomerId_7494": 8, + "LastName_3794": "Peeters" + }, + { + "CustomerId_7494": 9, + "LastName_3794": "Nielsen" + }, + { + "CustomerId_7494": 34, + "LastName_3794": "Fernandes" + }, + { + "CustomerId_7494": 35, + "LastName_3794": "Sampaio" + }, + { + "CustomerId_7494": 36, + "LastName_3794": "Schneider" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/df9eb37cfe4ef659/request.json b/test-snapshots/query/df9eb37cfe4ef659/request.json new file mode 100644 index 0000000..7e8c17c --- /dev/null +++ b/test-snapshots/query/df9eb37cfe4ef659/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "CustomerId_7494": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "LastName_3794": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Email", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/dfdf3e7516670332/expected.json b/test-snapshots/query/dfdf3e7516670332/expected.json new file mode 100644 index 0000000..fba8785 --- /dev/null +++ b/test-snapshots/query/dfdf3e7516670332/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 17, + "TrackId": 1278 + }, + { + "PlaylistId": 17, + "TrackId": 1283 + }, + { + "PlaylistId": 17, + "TrackId": 1335 + }, + { + "PlaylistId": 17, + "TrackId": 1345 + }, + { + "PlaylistId": 17, + "TrackId": 1380 + }, + { + "PlaylistId": 17, + "TrackId": 1392 + }, + { + "PlaylistId": 17, + "TrackId": 152 + }, + { + "PlaylistId": 17, + "TrackId": 160 + }, + { + "PlaylistId": 17, + "TrackId": 1801 + }, + { + "PlaylistId": 17, + "TrackId": 1830 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dfdf3e7516670332/request.json b/test-snapshots/query/dfdf3e7516670332/request.json new file mode 100644 index 0000000..522c98e --- /dev/null +++ b/test-snapshots/query/dfdf3e7516670332/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/dfe4c6d0a6c615a9/expected.json b/test-snapshots/query/dfe4c6d0a6c615a9/expected.json new file mode 100644 index 0000000..6ecd6d6 --- /dev/null +++ b/test-snapshots/query/dfe4c6d0a6c615a9/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "ArtistId_2783": 136 + }, + { + "ArtistId_2783": 150 + }, + { + "ArtistId_2783": 202 + }, + { + "ArtistId_2783": 264 + }, + { + "ArtistId_2783": 6 + }, + { + "ArtistId_2783": 150 + }, + { + "ArtistId_2783": 115 + }, + { + "ArtistId_2783": 221 + }, + { + "ArtistId_2783": 118 + }, + { + "ArtistId_2783": 21 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/dfe4c6d0a6c615a9/request.json b/test-snapshots/query/dfe4c6d0a6c615a9/request.json new file mode 100644 index 0000000..5dabd88 --- /dev/null +++ b/test-snapshots/query/dfe4c6d0a6c615a9/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "ArtistId_2783": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e00815ee65c4ebb4/expected.json b/test-snapshots/query/e00815ee65c4ebb4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e00815ee65c4ebb4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e00815ee65c4ebb4/request.json b/test-snapshots/query/e00815ee65c4ebb4/request.json new file mode 100644 index 0000000..be7590a --- /dev/null +++ b/test-snapshots/query/e00815ee65c4ebb4/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2004-03-04" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-3351" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e0125eec4997c94f/expected.json b/test-snapshots/query/e0125eec4997c94f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e0125eec4997c94f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0125eec4997c94f/request.json b/test-snapshots/query/e0125eec4997c94f/request.json new file mode 100644 index 0000000..3af29e0 --- /dev/null +++ b/test-snapshots/query/e0125eec4997c94f/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e01ce99077221ba7/expected.json b/test-snapshots/query/e01ce99077221ba7/expected.json new file mode 100644 index 0000000..8235710 --- /dev/null +++ b/test-snapshots/query/e01ce99077221ba7/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_0802": 1, + "Name_9269": "Rock" + }, + { + "GenreId_0802": 2, + "Name_9269": "Jazz" + }, + { + "GenreId_0802": 3, + "Name_9269": "Metal" + }, + { + "GenreId_0802": 4, + "Name_9269": "Alternative & Punk" + }, + { + "GenreId_0802": 5, + "Name_9269": "Rock And Roll" + }, + { + "GenreId_0802": 6, + "Name_9269": "Blues" + }, + { + "GenreId_0802": 7, + "Name_9269": "Latin" + }, + { + "GenreId_0802": 8, + "Name_9269": "Reggae" + }, + { + "GenreId_0802": 9, + "Name_9269": "Pop" + }, + { + "GenreId_0802": 10, + "Name_9269": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e01ce99077221ba7/request.json b/test-snapshots/query/e01ce99077221ba7/request.json new file mode 100644 index 0000000..f49d254 --- /dev/null +++ b/test-snapshots/query/e01ce99077221ba7/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_0802": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_9269": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e0389952073d4163/expected.json b/test-snapshots/query/e0389952073d4163/expected.json new file mode 100644 index 0000000..ba1bdbe --- /dev/null +++ b/test-snapshots/query/e0389952073d4163/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 108, + "ArtistId": 90, + "Title": "Rock In Rio [CD1]" + }, + { + "AlbumId": 121, + "ArtistId": 95, + "Title": "Surfing with the Alien (Remastered)" + }, + { + "AlbumId": 122, + "ArtistId": 46, + "Title": "Jorge Ben Jor 25 Anos" + }, + { + "AlbumId": 123, + "ArtistId": 96, + "Title": "Jota Quest-1995" + }, + { + "AlbumId": 125, + "ArtistId": 98, + "Title": "Living After Midnight" + }, + { + "AlbumId": 14, + "ArtistId": 11, + "Title": "Alcohol Fueled Brewtality Live! [Disc 1]" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0389952073d4163/request.json b/test-snapshots/query/e0389952073d4163/request.json new file mode 100644 index 0000000..f4bee7a --- /dev/null +++ b/test-snapshots/query/e0389952073d4163/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e0537bdc0f2eaf41/expected.json b/test-snapshots/query/e0537bdc0f2eaf41/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e0537bdc0f2eaf41/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0537bdc0f2eaf41/request.json b/test-snapshots/query/e0537bdc0f2eaf41/request.json new file mode 100644 index 0000000..0088e1a --- /dev/null +++ b/test-snapshots/query/e0537bdc0f2eaf41/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "R&B/Soul" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e059caa3b9ae075b/expected.json b/test-snapshots/query/e059caa3b9ae075b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e059caa3b9ae075b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e059caa3b9ae075b/request.json b/test-snapshots/query/e059caa3b9ae075b/request.json new file mode 100644 index 0000000..fc76da6 --- /dev/null +++ b/test-snapshots/query/e059caa3b9ae075b/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e06741e8d84e4da0/expected.json b/test-snapshots/query/e06741e8d84e4da0/expected.json new file mode 100644 index 0000000..5ce3424 --- /dev/null +++ b/test-snapshots/query/e06741e8d84e4da0/expected.json @@ -0,0 +1,54 @@ +[ + { + "rows": [ + { + "BirthDate_9230": "1962-02-18", + "FirstName_9261": "Andrew", + "State_4697": "AB", + "Title_4535": "General Manager" + }, + { + "BirthDate_9230": "1973-07-01", + "FirstName_9261": "Michael", + "State_4697": "AB", + "Title_4535": "IT Manager" + }, + { + "BirthDate_9230": "1968-01-09", + "FirstName_9261": "Laura", + "State_4697": "AB", + "Title_4535": "IT Staff" + }, + { + "BirthDate_9230": "1970-05-29", + "FirstName_9261": "Robert", + "State_4697": "AB", + "Title_4535": "IT Staff" + }, + { + "BirthDate_9230": "1958-12-08", + "FirstName_9261": "Nancy", + "State_4697": "AB", + "Title_4535": "Sales Manager" + }, + { + "BirthDate_9230": "1965-03-03", + "FirstName_9261": "Steve", + "State_4697": "AB", + "Title_4535": "Sales Support Agent" + }, + { + "BirthDate_9230": "1947-09-19", + "FirstName_9261": "Margaret", + "State_4697": "AB", + "Title_4535": "Sales Support Agent" + }, + { + "BirthDate_9230": "1973-08-29", + "FirstName_9261": "Jane", + "State_4697": "AB", + "Title_4535": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e06741e8d84e4da0/request.json b/test-snapshots/query/e06741e8d84e4da0/request.json new file mode 100644 index 0000000..6a9bd9c --- /dev/null +++ b/test-snapshots/query/e06741e8d84e4da0/request.json @@ -0,0 +1,58 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Title_4535": { + "type": "column", + "column": "Title", + "fields": null + }, + "BirthDate_9230": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "State_4697": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_9261": { + "type": "column", + "column": "FirstName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "State", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "LastName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e07e6c1d5eeccc7a/expected.json b/test-snapshots/query/e07e6c1d5eeccc7a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e07e6c1d5eeccc7a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e07e6c1d5eeccc7a/request.json b/test-snapshots/query/e07e6c1d5eeccc7a/request.json new file mode 100644 index 0000000..32a4859 --- /dev/null +++ b/test-snapshots/query/e07e6c1d5eeccc7a/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 37 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e09e1dc36d1891e2/expected.json b/test-snapshots/query/e09e1dc36d1891e2/expected.json new file mode 100644 index 0000000..6a37818 --- /dev/null +++ b/test-snapshots/query/e09e1dc36d1891e2/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 6 + }, + { + "PlaylistId": 8, + "TrackId": 6 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e09e1dc36d1891e2/request.json b/test-snapshots/query/e09e1dc36d1891e2/request.json new file mode 100644 index 0000000..d0e9c6f --- /dev/null +++ b/test-snapshots/query/e09e1dc36d1891e2/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205662 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e0af977537f7a640/expected.json b/test-snapshots/query/e0af977537f7a640/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e0af977537f7a640/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0af977537f7a640/request.json b/test-snapshots/query/e0af977537f7a640/request.json new file mode 100644 index 0000000..1459359 --- /dev/null +++ b/test-snapshots/query/e0af977537f7a640/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Tucson" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "jacksmith@microsoft.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e0b2b9a78fb5f19e/expected.json b/test-snapshots/query/e0b2b9a78fb5f19e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e0b2b9a78fb5f19e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0b2b9a78fb5f19e/request.json b/test-snapshots/query/e0b2b9a78fb5f19e/request.json new file mode 100644 index 0000000..3aa7209 --- /dev/null +++ b/test-snapshots/query/e0b2b9a78fb5f19e/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Adams" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T1K 5N8" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e0b646044edab0e6/expected.json b/test-snapshots/query/e0b646044edab0e6/expected.json new file mode 100644 index 0000000..5d6a514 --- /dev/null +++ b/test-snapshots/query/e0b646044edab0e6/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "AlbumId": 260, + "Bytes": 8052374, + "Composer": null, + "GenreId": 23, + "MediaTypeId": 4, + "Milliseconds": 234013, + "Name": "War Pigs", + "TrackId": 3336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 283, + "Bytes": 10085867, + "Composer": "Franz Joseph Haydn", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 306687, + "Name": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId": 3414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 318, + "Bytes": 3819535, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 101293, + "Name": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId": 3452, + "UnitPrice": 0.99 + }, + { + "AlbumId": 324, + "Bytes": 10887931, + "Composer": "Ludwig van Beethoven", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 339567, + "Name": "Prometheus Overture, Op. 43", + "TrackId": 3479, + "UnitPrice": 0.99 + }, + { + "AlbumId": 325, + "Bytes": 9785346, + "Composer": "Béla Bartók", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 299350, + "Name": "Sonata for Solo Violin: IV: Presto", + "TrackId": 3480, + "UnitPrice": 0.99 + }, + { + "AlbumId": 340, + "Bytes": 2229617, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 51780, + "Name": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "TrackId": 3496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 342, + "Bytes": 16454937, + "Composer": "Pietro Antonio Locatelli", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 493573, + "Name": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId": 3498, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0b646044edab0e6/request.json b/test-snapshots/query/e0b646044edab0e6/request.json new file mode 100644 index 0000000..c8b896a --- /dev/null +++ b/test-snapshots/query/e0b646044edab0e6/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e0f7880b94a77fd7/expected.json b/test-snapshots/query/e0f7880b94a77fd7/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/e0f7880b94a77fd7/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e0f7880b94a77fd7/request.json b/test-snapshots/query/e0f7880b94a77fd7/request.json new file mode 100644 index 0000000..33fa5aa --- /dev/null +++ b/test-snapshots/query/e0f7880b94a77fd7/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e1128d5382377aa/expected.json b/test-snapshots/query/e1128d5382377aa/expected.json new file mode 100644 index 0000000..5bc2355 --- /dev/null +++ b/test-snapshots/query/e1128d5382377aa/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "TrackId_6212": 1000 + }, + { + "TrackId_6212": 1001 + }, + { + "TrackId_6212": 1002 + }, + { + "TrackId_6212": 1003 + }, + { + "TrackId_6212": 1004 + }, + { + "TrackId_6212": 1005 + }, + { + "TrackId_6212": 1006 + }, + { + "TrackId_6212": 1007 + }, + { + "TrackId_6212": 1008 + }, + { + "TrackId_6212": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e1128d5382377aa/request.json b/test-snapshots/query/e1128d5382377aa/request.json new file mode 100644 index 0000000..bc0e760 --- /dev/null +++ b/test-snapshots/query/e1128d5382377aa/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "TrackId_6212": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e125adf6471aeb20/expected.json b/test-snapshots/query/e125adf6471aeb20/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e125adf6471aeb20/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e125adf6471aeb20/request.json b/test-snapshots/query/e125adf6471aeb20/request.json new file mode 100644 index 0000000..ba81c31 --- /dev/null +++ b/test-snapshots/query/e125adf6471aeb20/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e1474f7ce6b6f280/expected.json b/test-snapshots/query/e1474f7ce6b6f280/expected.json new file mode 100644 index 0000000..34fffbb --- /dev/null +++ b/test-snapshots/query/e1474f7ce6b6f280/expected.json @@ -0,0 +1,118 @@ +[ + { + "rows": [ + { + "Address_4242": "7727B 41 Ave", + "BirthDate_3213": "1965-03-03", + "Country_1516": "Canada", + "Email_8811": "steve@chinookcorp.com", + "FirstName_8240": "Steve", + "HireDate_5087": "2003-10-17", + "LastName_3660": "Johnson", + "Phone_8656": "1 (780) 836-9987", + "PostalCode_0783": "T3B 1Y7", + "ReportsTo_0530": 2, + "State_0649": "AB", + "Title_9497": "Sales Support Agent" + }, + { + "Address_4242": "11120 Jasper Ave NW", + "BirthDate_3213": "1962-02-18", + "Country_1516": "Canada", + "Email_8811": "andrew@chinookcorp.com", + "FirstName_8240": "Andrew", + "HireDate_5087": "2002-08-14", + "LastName_3660": "Adams", + "Phone_8656": "+1 (780) 428-9482", + "PostalCode_0783": "T5K 2N1", + "ReportsTo_0530": null, + "State_0649": "AB", + "Title_9497": "General Manager" + }, + { + "Address_4242": "923 7 ST NW", + "BirthDate_3213": "1968-01-09", + "Country_1516": "Canada", + "Email_8811": "laura@chinookcorp.com", + "FirstName_8240": "Laura", + "HireDate_5087": "2004-03-04", + "LastName_3660": "Callahan", + "Phone_8656": "+1 (403) 467-3351", + "PostalCode_0783": "T1H 1Y8", + "ReportsTo_0530": 6, + "State_0649": "AB", + "Title_9497": "IT Staff" + }, + { + "Address_4242": "590 Columbia Boulevard West", + "BirthDate_3213": "1970-05-29", + "Country_1516": "Canada", + "Email_8811": "robert@chinookcorp.com", + "FirstName_8240": "Robert", + "HireDate_5087": "2004-01-02", + "LastName_3660": "King", + "Phone_8656": "+1 (403) 456-9986", + "PostalCode_0783": "T1K 5N8", + "ReportsTo_0530": 6, + "State_0649": "AB", + "Title_9497": "IT Staff" + }, + { + "Address_4242": "683 10 Street SW", + "BirthDate_3213": "1947-09-19", + "Country_1516": "Canada", + "Email_8811": "margaret@chinookcorp.com", + "FirstName_8240": "Margaret", + "HireDate_5087": "2003-05-03", + "LastName_3660": "Park", + "Phone_8656": "+1 (403) 263-4423", + "PostalCode_0783": "T2P 5G3", + "ReportsTo_0530": 2, + "State_0649": "AB", + "Title_9497": "Sales Support Agent" + }, + { + "Address_4242": "1111 6 Ave SW", + "BirthDate_3213": "1973-08-29", + "Country_1516": "Canada", + "Email_8811": "jane@chinookcorp.com", + "FirstName_8240": "Jane", + "HireDate_5087": "2002-04-01", + "LastName_3660": "Peacock", + "Phone_8656": "+1 (403) 262-3443", + "PostalCode_0783": "T2P 5M5", + "ReportsTo_0530": 2, + "State_0649": "AB", + "Title_9497": "Sales Support Agent" + }, + { + "Address_4242": "825 8 Ave SW", + "BirthDate_3213": "1958-12-08", + "Country_1516": "Canada", + "Email_8811": "nancy@chinookcorp.com", + "FirstName_8240": "Nancy", + "HireDate_5087": "2002-05-01", + "LastName_3660": "Edwards", + "Phone_8656": "+1 (403) 262-3443", + "PostalCode_0783": "T2P 2T3", + "ReportsTo_0530": 1, + "State_0649": "AB", + "Title_9497": "Sales Manager" + }, + { + "Address_4242": "5827 Bowness Road NW", + "BirthDate_3213": "1973-07-01", + "Country_1516": "Canada", + "Email_8811": "michael@chinookcorp.com", + "FirstName_8240": "Michael", + "HireDate_5087": "2003-10-17", + "LastName_3660": "Mitchell", + "Phone_8656": "+1 (403) 246-9887", + "PostalCode_0783": "T3B 0C5", + "ReportsTo_0530": 1, + "State_0649": "AB", + "Title_9497": "IT Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e1474f7ce6b6f280/request.json b/test-snapshots/query/e1474f7ce6b6f280/request.json new file mode 100644 index 0000000..9227933 --- /dev/null +++ b/test-snapshots/query/e1474f7ce6b6f280/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_4242": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_3213": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "Title_9497": { + "type": "column", + "column": "Title", + "fields": null + }, + "Country_1516": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_8811": { + "type": "column", + "column": "Email", + "fields": null + }, + "ReportsTo_0530": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_0649": { + "type": "column", + "column": "State", + "fields": null + }, + "FirstName_8240": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_5087": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_3660": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_8656": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_0783": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e184fba91fde2897/expected.json b/test-snapshots/query/e184fba91fde2897/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/e184fba91fde2897/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e184fba91fde2897/request.json b/test-snapshots/query/e184fba91fde2897/request.json new file mode 100644 index 0000000..b7d5072 --- /dev/null +++ b/test-snapshots/query/e184fba91fde2897/request.json @@ -0,0 +1,101 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6852860 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e1966a7b0f3db66b/expected.json b/test-snapshots/query/e1966a7b0f3db66b/expected.json new file mode 100644 index 0000000..7ea8b27 --- /dev/null +++ b/test-snapshots/query/e1966a7b0f3db66b/expected.json @@ -0,0 +1,106 @@ +[ + { + "rows": [ + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2009-10-07", + "InvoiceId_0637": 63 + }, + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2010-01-09", + "InvoiceId_0637": 86 + }, + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2010-04-13", + "InvoiceId_0637": 108 + }, + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2010-12-02", + "InvoiceId_0637": 160 + }, + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2012-05-25", + "InvoiceId_0637": 281 + }, + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2012-07-05", + "InvoiceId_0637": 292 + }, + { + "BillingAddress_6506": "Via Degli Scipioni, 43", + "BillingCity_2381": "Rome", + "BillingCountry_6802": "Italy", + "BillingPostalCode_0764": "00192", + "BillingState_1663": "RM", + "CustomerId_7645": 47, + "InvoiceDate_9905": "2013-03-05", + "InvoiceId_0637": 347 + }, + { + "BillingAddress_6506": "Ullevålsveien 14", + "BillingCity_2381": "Oslo", + "BillingCountry_6802": "Norway", + "BillingPostalCode_0764": "0171", + "BillingState_1663": null, + "CustomerId_7645": 4, + "InvoiceDate_9905": "2009-01-02", + "InvoiceId_0637": 2 + }, + { + "BillingAddress_6506": "Ullevålsveien 14", + "BillingCity_2381": "Oslo", + "BillingCountry_6802": "Norway", + "BillingPostalCode_0764": "0171", + "BillingState_1663": null, + "CustomerId_7645": 4, + "InvoiceDate_9905": "2009-04-06", + "InvoiceId_0637": 24 + }, + { + "BillingAddress_6506": "Ullevålsveien 14", + "BillingCity_2381": "Oslo", + "BillingCountry_6802": "Norway", + "BillingPostalCode_0764": "0171", + "BillingState_1663": null, + "CustomerId_7645": 4, + "InvoiceDate_9905": "2009-11-25", + "InvoiceId_0637": 76 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e1966a7b0f3db66b/request.json b/test-snapshots/query/e1966a7b0f3db66b/request.json new file mode 100644 index 0000000..e81fb68 --- /dev/null +++ b/test-snapshots/query/e1966a7b0f3db66b/request.json @@ -0,0 +1,70 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_6506": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_2381": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_6802": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode_0764": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState_1663": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId_7645": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate_9905": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_0637": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingAddress", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e1aa506d43eff5e3/expected.json b/test-snapshots/query/e1aa506d43eff5e3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e1aa506d43eff5e3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e1aa506d43eff5e3/request.json b/test-snapshots/query/e1aa506d43eff5e3/request.json new file mode 100644 index 0000000..e600b37 --- /dev/null +++ b/test-snapshots/query/e1aa506d43eff5e3/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e1e139dab677adad/expected.json b/test-snapshots/query/e1e139dab677adad/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e1e139dab677adad/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e1e139dab677adad/request.json b/test-snapshots/query/e1e139dab677adad/request.json new file mode 100644 index 0000000..1095ece --- /dev/null +++ b/test-snapshots/query/e1e139dab677adad/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Jack" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e1e37f9e8007e91b/expected.json b/test-snapshots/query/e1e37f9e8007e91b/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/e1e37f9e8007e91b/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e1e37f9e8007e91b/request.json b/test-snapshots/query/e1e37f9e8007e91b/request.json new file mode 100644 index 0000000..0ad37c0 --- /dev/null +++ b/test-snapshots/query/e1e37f9e8007e91b/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e21e19ff5f7ecac7/expected.json b/test-snapshots/query/e21e19ff5f7ecac7/expected.json new file mode 100644 index 0000000..58ea453 --- /dev/null +++ b/test-snapshots/query/e21e19ff5f7ecac7/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "GenreId_4952": 19, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 5286953, + "Name_5491": "Occupation / Precipice", + "TrackId_5564": 2820 + }, + { + "GenreId_4952": 21, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 5088838, + "Name_5491": "Through a Looking Glass", + "TrackId_5564": 3224 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2960293, + "Name_5491": "Greetings from Earth, Pt. 1", + "TrackId_5564": 3244 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2956998, + "Name_5491": "The Man With Nine Lives", + "TrackId_5564": 3242 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2956081, + "Name_5491": "Battlestar Galactica, Pt. 2", + "TrackId_5564": 3227 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2952702, + "Name_5491": "Battlestar Galactica, Pt. 1", + "TrackId_5564": 3226 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2935894, + "Name_5491": "Murder On the Rising Star", + "TrackId_5564": 3243 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2927802, + "Name_5491": "Battlestar Galactica, Pt. 3", + "TrackId_5564": 3228 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2927677, + "Name_5491": "Take the Celestra", + "TrackId_5564": 3248 + }, + { + "GenreId_4952": 20, + "MediaTypeId_2922": 3, + "Milliseconds_5860": 2926593, + "Name_5491": "Fire In Space", + "TrackId_5564": 3239 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e21e19ff5f7ecac7/request.json b/test-snapshots/query/e21e19ff5f7ecac7/request.json new file mode 100644 index 0000000..dd5b429 --- /dev/null +++ b/test-snapshots/query/e21e19ff5f7ecac7/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Milliseconds_5860": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_5491": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_5564": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "GenreId_4952": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_2922": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e225aa7c7724deb4/expected.json b/test-snapshots/query/e225aa7c7724deb4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e225aa7c7724deb4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e225aa7c7724deb4/request.json b/test-snapshots/query/e225aa7c7724deb4/request.json new file mode 100644 index 0000000..12bd7b2 --- /dev/null +++ b/test-snapshots/query/e225aa7c7724deb4/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263288 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e22ddebece3c4894/expected.json b/test-snapshots/query/e22ddebece3c4894/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e22ddebece3c4894/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e22ddebece3c4894/request.json b/test-snapshots/query/e22ddebece3c4894/request.json new file mode 100644 index 0000000..48975a8 --- /dev/null +++ b/test-snapshots/query/e22ddebece3c4894/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 248 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e230d88642863b1b/expected.json b/test-snapshots/query/e230d88642863b1b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e230d88642863b1b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e230d88642863b1b/request.json b/test-snapshots/query/e230d88642863b1b/request.json new file mode 100644 index 0000000..cc03e18 --- /dev/null +++ b/test-snapshots/query/e230d88642863b1b/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (514) 721-4711" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Smith" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e259ffb1f60eebc9/expected.json b/test-snapshots/query/e259ffb1f60eebc9/expected.json new file mode 100644 index 0000000..d235ad9 --- /dev/null +++ b/test-snapshots/query/e259ffb1f60eebc9/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e259ffb1f60eebc9/request.json b/test-snapshots/query/e259ffb1f60eebc9/request.json new file mode 100644 index 0000000..b40ec7f --- /dev/null +++ b/test-snapshots/query/e259ffb1f60eebc9/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e26d5665a8187f6e/expected.json b/test-snapshots/query/e26d5665a8187f6e/expected.json new file mode 100644 index 0000000..d43c4e9 --- /dev/null +++ b/test-snapshots/query/e26d5665a8187f6e/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 107, + "ArtistId": 90, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e26d5665a8187f6e/request.json b/test-snapshots/query/e26d5665a8187f6e/request.json new file mode 100644 index 0000000..4779684 --- /dev/null +++ b/test-snapshots/query/e26d5665a8187f6e/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e290ecdfc785bf6f/expected.json b/test-snapshots/query/e290ecdfc785bf6f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e290ecdfc785bf6f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e290ecdfc785bf6f/request.json b/test-snapshots/query/e290ecdfc785bf6f/request.json new file mode 100644 index 0000000..3d36850 --- /dev/null +++ b/test-snapshots/query/e290ecdfc785bf6f/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e2a07bb500110efc/expected.json b/test-snapshots/query/e2a07bb500110efc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e2a07bb500110efc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e2a07bb500110efc/request.json b/test-snapshots/query/e2a07bb500110efc/request.json new file mode 100644 index 0000000..c4f9852 --- /dev/null +++ b/test-snapshots/query/e2a07bb500110efc/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heather" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 020 7976 5722" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e2b35cc4b244b24a/expected.json b/test-snapshots/query/e2b35cc4b244b24a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e2b35cc4b244b24a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e2b35cc4b244b24a/request.json b/test-snapshots/query/e2b35cc4b244b24a/request.json new file mode 100644 index 0000000..40bddd4 --- /dev/null +++ b/test-snapshots/query/e2b35cc4b244b24a/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Science Fiction" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e2d11608e3601458/expected.json b/test-snapshots/query/e2d11608e3601458/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e2d11608e3601458/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e2d11608e3601458/request.json b/test-snapshots/query/e2d11608e3601458/request.json new file mode 100644 index 0000000..223c68d --- /dev/null +++ b/test-snapshots/query/e2d11608e3601458/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e2e58afcd61353dc/expected.json b/test-snapshots/query/e2e58afcd61353dc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e2e58afcd61353dc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e2e58afcd61353dc/request.json b/test-snapshots/query/e2e58afcd61353dc/request.json new file mode 100644 index 0000000..6f999a2 --- /dev/null +++ b/test-snapshots/query/e2e58afcd61353dc/request.json @@ -0,0 +1,111 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e2f02b2f4ee9b3e9/expected.json b/test-snapshots/query/e2f02b2f4ee9b3e9/expected.json new file mode 100644 index 0000000..9ffc4dc --- /dev/null +++ b/test-snapshots/query/e2f02b2f4ee9b3e9/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e2f02b2f4ee9b3e9/request.json b/test-snapshots/query/e2f02b2f4ee9b3e9/request.json new file mode 100644 index 0000000..3176f98 --- /dev/null +++ b/test-snapshots/query/e2f02b2f4ee9b3e9/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e2f70e343918055d/expected.json b/test-snapshots/query/e2f70e343918055d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e2f70e343918055d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e2f70e343918055d/request.json b/test-snapshots/query/e2f70e343918055d/request.json new file mode 100644 index 0000000..3be605d --- /dev/null +++ b/test-snapshots/query/e2f70e343918055d/request.json @@ -0,0 +1,109 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 255 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e304f7cddb3f85e7/expected.json b/test-snapshots/query/e304f7cddb3f85e7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e304f7cddb3f85e7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e304f7cddb3f85e7/request.json b/test-snapshots/query/e304f7cddb3f85e7/request.json new file mode 100644 index 0000000..8ad5bcf --- /dev/null +++ b/test-snapshots/query/e304f7cddb3f85e7/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 270863 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e31f84145c4897f6/expected.json b/test-snapshots/query/e31f84145c4897f6/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e31f84145c4897f6/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e31f84145c4897f6/request.json b/test-snapshots/query/e31f84145c4897f6/request.json new file mode 100644 index 0000000..3ab0c12 --- /dev/null +++ b/test-snapshots/query/e31f84145c4897f6/request.json @@ -0,0 +1,78 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e33b225513e98f54/expected.json b/test-snapshots/query/e33b225513e98f54/expected.json new file mode 100644 index 0000000..a821e2e --- /dev/null +++ b/test-snapshots/query/e33b225513e98f54/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5339931, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 222380, + "Name": "Cochise", + "TrackId": 85, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 5988186, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 249391, + "Name": "What You Are", + "TrackId": 88, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6321091, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263262, + "Name": "Set It Off", + "TrackId": 90, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6672176, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 277890, + "Name": "Show Me How to Live", + "TrackId": 86, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 6709793, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 279457, + "Name": "Gasoline", + "TrackId": 87, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7059624, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 294034, + "Name": "Like a Stone", + "TrackId": 89, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7193162, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 299598, + "Name": "Getaway Car", + "TrackId": 97, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 7289084, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 303595, + "Name": "Light My Way", + "TrackId": 96, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e33b225513e98f54/request.json b/test-snapshots/query/e33b225513e98f54/request.json new file mode 100644 index 0000000..499996b --- /dev/null +++ b/test-snapshots/query/e33b225513e98f54/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e3476a05de7b4a92/expected.json b/test-snapshots/query/e3476a05de7b4a92/expected.json new file mode 100644 index 0000000..4e121d6 --- /dev/null +++ b/test-snapshots/query/e3476a05de7b4a92/expected.json @@ -0,0 +1,110 @@ +[ + { + "rows": [ + { + "Address_7586": "923 7 ST NW", + "BirthDate_8174": "1968-01-09", + "Country_4279": "Canada", + "Email_0212": "laura@chinookcorp.com", + "Fax_1751": "+1 (403) 467-8772", + "FirstName_7049": "Laura", + "HireDate_4048": "2004-03-04", + "LastName_3754": "Callahan", + "PostalCode_5111": "T1H 1Y8", + "ReportsTo_8485": 6, + "Title_7805": "IT Staff" + }, + { + "Address_7586": "825 8 Ave SW", + "BirthDate_8174": "1958-12-08", + "Country_4279": "Canada", + "Email_0212": "nancy@chinookcorp.com", + "Fax_1751": "+1 (403) 262-3322", + "FirstName_7049": "Nancy", + "HireDate_4048": "2002-05-01", + "LastName_3754": "Edwards", + "PostalCode_5111": "T2P 2T3", + "ReportsTo_8485": 1, + "Title_7805": "Sales Manager" + }, + { + "Address_7586": "7727B 41 Ave", + "BirthDate_8174": "1965-03-03", + "Country_4279": "Canada", + "Email_0212": "steve@chinookcorp.com", + "Fax_1751": "1 (780) 836-9543", + "FirstName_7049": "Steve", + "HireDate_4048": "2003-10-17", + "LastName_3754": "Johnson", + "PostalCode_5111": "T3B 1Y7", + "ReportsTo_8485": 2, + "Title_7805": "Sales Support Agent" + }, + { + "Address_7586": "683 10 Street SW", + "BirthDate_8174": "1947-09-19", + "Country_4279": "Canada", + "Email_0212": "margaret@chinookcorp.com", + "Fax_1751": "+1 (403) 263-4289", + "FirstName_7049": "Margaret", + "HireDate_4048": "2003-05-03", + "LastName_3754": "Park", + "PostalCode_5111": "T2P 5G3", + "ReportsTo_8485": 2, + "Title_7805": "Sales Support Agent" + }, + { + "Address_7586": "590 Columbia Boulevard West", + "BirthDate_8174": "1970-05-29", + "Country_4279": "Canada", + "Email_0212": "robert@chinookcorp.com", + "Fax_1751": "+1 (403) 456-8485", + "FirstName_7049": "Robert", + "HireDate_4048": "2004-01-02", + "LastName_3754": "King", + "PostalCode_5111": "T1K 5N8", + "ReportsTo_8485": 6, + "Title_7805": "IT Staff" + }, + { + "Address_7586": "5827 Bowness Road NW", + "BirthDate_8174": "1973-07-01", + "Country_4279": "Canada", + "Email_0212": "michael@chinookcorp.com", + "Fax_1751": "+1 (403) 246-9899", + "FirstName_7049": "Michael", + "HireDate_4048": "2003-10-17", + "LastName_3754": "Mitchell", + "PostalCode_5111": "T3B 0C5", + "ReportsTo_8485": 1, + "Title_7805": "IT Manager" + }, + { + "Address_7586": "11120 Jasper Ave NW", + "BirthDate_8174": "1962-02-18", + "Country_4279": "Canada", + "Email_0212": "andrew@chinookcorp.com", + "Fax_1751": "+1 (780) 428-3457", + "FirstName_7049": "Andrew", + "HireDate_4048": "2002-08-14", + "LastName_3754": "Adams", + "PostalCode_5111": "T5K 2N1", + "ReportsTo_8485": null, + "Title_7805": "General Manager" + }, + { + "Address_7586": "1111 6 Ave SW", + "BirthDate_8174": "1973-08-29", + "Country_4279": "Canada", + "Email_0212": "jane@chinookcorp.com", + "Fax_1751": "+1 (403) 262-6712", + "FirstName_7049": "Jane", + "HireDate_4048": "2002-04-01", + "LastName_3754": "Peacock", + "PostalCode_5111": "T2P 5M5", + "ReportsTo_8485": 2, + "Title_7805": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e3476a05de7b4a92/request.json b/test-snapshots/query/e3476a05de7b4a92/request.json new file mode 100644 index 0000000..3b65f64 --- /dev/null +++ b/test-snapshots/query/e3476a05de7b4a92/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_7586": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_8174": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "ReportsTo_8485": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Country_4279": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_0212": { + "type": "column", + "column": "Email", + "fields": null + }, + "Title_7805": { + "type": "column", + "column": "Title", + "fields": null + }, + "Fax_1751": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7049": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_4048": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_3754": { + "type": "column", + "column": "LastName", + "fields": null + }, + "PostalCode_5111": { + "type": "column", + "column": "PostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "HireDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e352ec5f1b971e85/expected.json b/test-snapshots/query/e352ec5f1b971e85/expected.json new file mode 100644 index 0000000..66237fb --- /dev/null +++ b/test-snapshots/query/e352ec5f1b971e85/expected.json @@ -0,0 +1,366 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "1111 6 Ave SW", + "BirthDate_2087": "1973-08-29", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "jane@chinookcorp.com", + "EmployeeId_3587": 3, + "Fax_4318": "+1 (403) 262-6712", + "FirstName_8621": "Jane", + "HireDate_4989": "2002-04-01", + "LastName_1204": "Peacock", + "Phone_8071": "+1 (403) 262-3443", + "PostalCode_3329": "T2P 5M5", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "7727B 41 Ave", + "BirthDate_2087": "1965-03-03", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "steve@chinookcorp.com", + "EmployeeId_3587": 5, + "Fax_4318": "1 (780) 836-9543", + "FirstName_8621": "Steve", + "HireDate_4989": "2003-10-17", + "LastName_1204": "Johnson", + "Phone_8071": "1 (780) 836-9987", + "PostalCode_3329": "T3B 1Y7", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "683 10 Street SW", + "BirthDate_2087": "1947-09-19", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "margaret@chinookcorp.com", + "EmployeeId_3587": 4, + "Fax_4318": "+1 (403) 263-4289", + "FirstName_8621": "Margaret", + "HireDate_4989": "2003-05-03", + "LastName_1204": "Park", + "Phone_8071": "+1 (403) 263-4423", + "PostalCode_3329": "T2P 5G3", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "7727B 41 Ave", + "BirthDate_2087": "1965-03-03", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "steve@chinookcorp.com", + "EmployeeId_3587": 5, + "Fax_4318": "1 (780) 836-9543", + "FirstName_8621": "Steve", + "HireDate_4989": "2003-10-17", + "LastName_1204": "Johnson", + "Phone_8071": "1 (780) 836-9987", + "PostalCode_3329": "T3B 1Y7", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "7727B 41 Ave", + "BirthDate_2087": "1965-03-03", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "steve@chinookcorp.com", + "EmployeeId_3587": 5, + "Fax_4318": "1 (780) 836-9543", + "FirstName_8621": "Steve", + "HireDate_4989": "2003-10-17", + "LastName_1204": "Johnson", + "Phone_8071": "1 (780) 836-9987", + "PostalCode_3329": "T3B 1Y7", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "1111 6 Ave SW", + "BirthDate_2087": "1973-08-29", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "jane@chinookcorp.com", + "EmployeeId_3587": 3, + "Fax_4318": "+1 (403) 262-6712", + "FirstName_8621": "Jane", + "HireDate_4989": "2002-04-01", + "LastName_1204": "Peacock", + "Phone_8071": "+1 (403) 262-3443", + "PostalCode_3329": "T2P 5M5", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "1111 6 Ave SW", + "BirthDate_2087": "1973-08-29", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "jane@chinookcorp.com", + "EmployeeId_3587": 3, + "Fax_4318": "+1 (403) 262-6712", + "FirstName_8621": "Jane", + "HireDate_4989": "2002-04-01", + "LastName_1204": "Peacock", + "Phone_8071": "+1 (403) 262-3443", + "PostalCode_3329": "T2P 5M5", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "683 10 Street SW", + "BirthDate_2087": "1947-09-19", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "margaret@chinookcorp.com", + "EmployeeId_3587": 4, + "Fax_4318": "+1 (403) 263-4289", + "FirstName_8621": "Margaret", + "HireDate_4989": "2003-05-03", + "LastName_1204": "Park", + "Phone_8071": "+1 (403) 263-4423", + "PostalCode_3329": "T2P 5G3", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "1111 6 Ave SW", + "BirthDate_2087": "1973-08-29", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "jane@chinookcorp.com", + "EmployeeId_3587": 3, + "Fax_4318": "+1 (403) 262-6712", + "FirstName_8621": "Jane", + "HireDate_4989": "2002-04-01", + "LastName_1204": "Peacock", + "Phone_8071": "+1 (403) 262-3443", + "PostalCode_3329": "T2P 5M5", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address_8984": "683 10 Street SW", + "BirthDate_2087": "1947-09-19", + "City_6608": "Calgary", + "Country_7109": "Canada", + "Email_7976": "margaret@chinookcorp.com", + "EmployeeId_3587": 4, + "Fax_4318": "+1 (403) 263-4289", + "FirstName_8621": "Margaret", + "HireDate_4989": "2003-05-03", + "LastName_1204": "Park", + "Phone_8071": "+1 (403) 263-4423", + "PostalCode_3329": "T2P 5G3", + "ReportsTo_0945": 2, + "State_0743": "AB", + "Title_3347": "Sales Support Agent" + } + ] + }, + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e352ec5f1b971e85/request.json b/test-snapshots/query/e352ec5f1b971e85/request.json new file mode 100644 index 0000000..3a297fc --- /dev/null +++ b/test-snapshots/query/e352ec5f1b971e85/request.json @@ -0,0 +1,169 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address_8984": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_2087": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_6608": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_7109": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_7976": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_3587": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_4318": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_8621": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_4989": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_1204": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_8071": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_3329": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo_0945": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State_0743": { + "type": "column", + "column": "State", + "fields": null + }, + "Title_3347": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e37617d02c8b2a40/expected.json b/test-snapshots/query/e37617d02c8b2a40/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e37617d02c8b2a40/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e37617d02c8b2a40/request.json b/test-snapshots/query/e37617d02c8b2a40/request.json new file mode 100644 index 0000000..47ed371 --- /dev/null +++ b/test-snapshots/query/e37617d02c8b2a40/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "C.O.D." + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e3841bfc18d152a5/expected.json b/test-snapshots/query/e3841bfc18d152a5/expected.json new file mode 100644 index 0000000..ba7e201 --- /dev/null +++ b/test-snapshots/query/e3841bfc18d152a5/expected.json @@ -0,0 +1,142 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 6 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 2 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 7 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Name": "90’s Music", + "PlaylistId": 5 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Name": "Brazilian Music", + "PlaylistId": 11 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Name": "Classical 101 - Deep Cuts", + "PlaylistId": 13 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Name": "Classical 101 - Next Steps", + "PlaylistId": 14 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Name": "Classical 101 - The Basics", + "PlaylistId": 15 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + }, + "Name": "Classical", + "PlaylistId": 12 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e3841bfc18d152a5/request.json b/test-snapshots/query/e3841bfc18d152a5/request.json new file mode 100644 index 0000000..60b2157 --- /dev/null +++ b/test-snapshots/query/e3841bfc18d152a5/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e38b22e6d9f960cc/expected.json b/test-snapshots/query/e38b22e6d9f960cc/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e38b22e6d9f960cc/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e38b22e6d9f960cc/request.json b/test-snapshots/query/e38b22e6d9f960cc/request.json new file mode 100644 index 0000000..b435746 --- /dev/null +++ b/test-snapshots/query/e38b22e6d9f960cc/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 5M5" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e40a37469db806ab/expected.json b/test-snapshots/query/e40a37469db806ab/expected.json new file mode 100644 index 0000000..31570da --- /dev/null +++ b/test-snapshots/query/e40a37469db806ab/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 7494639, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 229198, + "Name": "Virginia Moon", + "TrackId": 1006, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e40a37469db806ab/request.json b/test-snapshots/query/e40a37469db806ab/request.json new file mode 100644 index 0000000..d27618c --- /dev/null +++ b/test-snapshots/query/e40a37469db806ab/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e423661a3eb669b9/expected.json b/test-snapshots/query/e423661a3eb669b9/expected.json new file mode 100644 index 0000000..dd5182c --- /dev/null +++ b/test-snapshots/query/e423661a3eb669b9/expected.json @@ -0,0 +1,146 @@ +[ + { + "rows": [ + { + "Address_1227": "307 Macacha Güemes", + "City_0370": "Buenos Aires", + "Company_4479": null, + "Country_8562": "Argentina", + "Email_5293": "diego.gutierrez@yahoo.ar", + "Fax_7742": null, + "FirstName_1824": "Diego", + "LastName_0075": "Gutiérrez", + "Phone_3623": "+54 (0)11 4311 4333", + "PostalCode_2715": "1106", + "State_5353": null, + "SupportRepId_6220": 4 + }, + { + "Address_1227": "421 Bourke Street", + "City_0370": "Sidney", + "Company_4479": null, + "Country_8562": "Australia", + "Email_5293": "mark.taylor@yahoo.au", + "Fax_7742": null, + "FirstName_1824": "Mark", + "LastName_0075": "Taylor", + "Phone_3623": "+61 (02) 9332 3633", + "PostalCode_2715": "2010", + "State_5353": "NSW", + "SupportRepId_6220": 4 + }, + { + "Address_1227": "Rotenturmstraße 4, 1010 Innere Stadt", + "City_0370": "Vienne", + "Company_4479": null, + "Country_8562": "Austria", + "Email_5293": "astrid.gruber@apple.at", + "Fax_7742": null, + "FirstName_1824": "Astrid", + "LastName_0075": "Gruber", + "Phone_3623": "+43 01 5134505", + "PostalCode_2715": "1010", + "State_5353": null, + "SupportRepId_6220": 5 + }, + { + "Address_1227": "Grétrystraat 63", + "City_0370": "Brussels", + "Company_4479": null, + "Country_8562": "Belgium", + "Email_5293": "daan_peeters@apple.be", + "Fax_7742": null, + "FirstName_1824": "Daan", + "LastName_0075": "Peeters", + "Phone_3623": "+32 02 219 03 03", + "PostalCode_2715": "1000", + "State_5353": null, + "SupportRepId_6220": 4 + }, + { + "Address_1227": "Qe 7 Bloco G", + "City_0370": "Brasília", + "Company_4479": null, + "Country_8562": "Brazil", + "Email_5293": "fernadaramos4@uol.com.br", + "Fax_7742": "+55 (61) 3363-7855", + "FirstName_1824": "Fernanda", + "LastName_0075": "Ramos", + "Phone_3623": "+55 (61) 3363-5547", + "PostalCode_2715": "71020-677", + "State_5353": "DF", + "SupportRepId_6220": 4 + }, + { + "Address_1227": "Av. Paulista, 2022", + "City_0370": "São Paulo", + "Company_4479": "Banco do Brasil S.A.", + "Country_8562": "Brazil", + "Email_5293": "alero@uol.com.br", + "Fax_7742": "+55 (11) 3055-8131", + "FirstName_1824": "Alexandre", + "LastName_0075": "Rocha", + "Phone_3623": "+55 (11) 3055-3278", + "PostalCode_2715": "01310-200", + "State_5353": "SP", + "SupportRepId_6220": 5 + }, + { + "Address_1227": "Av. Brigadeiro Faria Lima, 2170", + "City_0370": "São José dos Campos", + "Company_4479": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "Country_8562": "Brazil", + "Email_5293": "luisg@embraer.com.br", + "Fax_7742": "+55 (12) 3923-5566", + "FirstName_1824": "Luís", + "LastName_0075": "Gonçalves", + "Phone_3623": "+55 (12) 3923-5555", + "PostalCode_2715": "12227-000", + "State_5353": "SP", + "SupportRepId_6220": 3 + }, + { + "Address_1227": "Praça Pio X, 119", + "City_0370": "Rio de Janeiro", + "Company_4479": "Riotur", + "Country_8562": "Brazil", + "Email_5293": "roberto.almeida@riotur.gov.br", + "Fax_7742": "+55 (21) 2271-7070", + "FirstName_1824": "Roberto", + "LastName_0075": "Almeida", + "Phone_3623": "+55 (21) 2271-7000", + "PostalCode_2715": "20040-020", + "State_5353": "RJ", + "SupportRepId_6220": 3 + }, + { + "Address_1227": "Rua Dr. Falcão Filho, 155", + "City_0370": "São Paulo", + "Company_4479": "Woodstock Discos", + "Country_8562": "Brazil", + "Email_5293": "eduardo@woodstock.com.br", + "Fax_7742": "+55 (11) 3033-4564", + "FirstName_1824": "Eduardo", + "LastName_0075": "Martins", + "Phone_3623": "+55 (11) 3033-5446", + "PostalCode_2715": "01007-010", + "State_5353": "SP", + "SupportRepId_6220": 4 + }, + { + "Address_1227": "1498 rue Bélanger", + "City_0370": "Montréal", + "Company_4479": null, + "Country_8562": "Canada", + "Email_5293": "ftremblay@gmail.com", + "Fax_7742": null, + "FirstName_1824": "François", + "LastName_0075": "Tremblay", + "Phone_3623": "+1 (514) 721-4711", + "PostalCode_2715": "H2G 1A7", + "State_5353": "QC", + "SupportRepId_6220": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e423661a3eb669b9/request.json b/test-snapshots/query/e423661a3eb669b9/request.json new file mode 100644 index 0000000..8f1e7ab --- /dev/null +++ b/test-snapshots/query/e423661a3eb669b9/request.json @@ -0,0 +1,90 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_1227": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_0370": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_4479": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_8562": { + "type": "column", + "column": "Country", + "fields": null + }, + "SupportRepId_6220": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Email_5293": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_7742": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_1824": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_0075": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone_3623": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_2715": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State_5353": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e47417339d84f0c7/expected.json b/test-snapshots/query/e47417339d84f0c7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e47417339d84f0c7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e47417339d84f0c7/request.json b/test-snapshots/query/e47417339d84f0c7/request.json new file mode 100644 index 0000000..d2f9d79 --- /dev/null +++ b/test-snapshots/query/e47417339d84f0c7/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Bossa Nova" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e48a2f8c103ce231/expected.json b/test-snapshots/query/e48a2f8c103ce231/expected.json new file mode 100644 index 0000000..92f6167 --- /dev/null +++ b/test-snapshots/query/e48a2f8c103ce231/expected.json @@ -0,0 +1,34 @@ +[ + { + "rows": [ + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e48a2f8c103ce231/request.json b/test-snapshots/query/e48a2f8c103ce231/request.json new file mode 100644 index 0000000..0289acb --- /dev/null +++ b/test-snapshots/query/e48a2f8c103ce231/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "CA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-10-22" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e497c8a0140f7fd2/expected.json b/test-snapshots/query/e497c8a0140f7fd2/expected.json new file mode 100644 index 0000000..427d288 --- /dev/null +++ b/test-snapshots/query/e497c8a0140f7fd2/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 146, + "ArtistId": 104, + "Title": "Seek And Shall Find: More Of The Best (1963-1981)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e497c8a0140f7fd2/request.json b/test-snapshots/query/e497c8a0140f7fd2/request.json new file mode 100644 index 0000000..9bdf917 --- /dev/null +++ b/test-snapshots/query/e497c8a0140f7fd2/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marvin Gaye" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e4f04b7ff554b452/expected.json b/test-snapshots/query/e4f04b7ff554b452/expected.json new file mode 100644 index 0000000..d639aa6 --- /dev/null +++ b/test-snapshots/query/e4f04b7ff554b452/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1003 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e4f04b7ff554b452/request.json b/test-snapshots/query/e4f04b7ff554b452/request.json new file mode 100644 index 0000000..cfcfe40 --- /dev/null +++ b/test-snapshots/query/e4f04b7ff554b452/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e4f740968caba0d0/expected.json b/test-snapshots/query/e4f740968caba0d0/expected.json new file mode 100644 index 0000000..fc24a9e --- /dev/null +++ b/test-snapshots/query/e4f740968caba0d0/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "City_4540": "Bordeaux", + "CustomerId_1557": 42, + "Email_6655": "wyatt.girard@yahoo.fr", + "Fax_5404": null, + "FirstName_7249": "Wyatt", + "LastName_2005": "Girard", + "Phone_5540": "+33 05 56 96 96 96", + "PostalCode_5906": "33000", + "SupportRepId_1708": 3 + }, + { + "City_4540": "Madison", + "CustomerId_1557": 25, + "Email_6655": "vstevens@yahoo.com", + "Fax_5404": null, + "FirstName_7249": "Victor", + "LastName_2005": "Stevens", + "Phone_5540": "+1 (608) 257-0597", + "PostalCode_5906": "53703", + "SupportRepId_1708": 5 + }, + { + "City_4540": "Helsinki", + "CustomerId_1557": 44, + "Email_6655": "terhi.hamalainen@apple.fi", + "Fax_5404": null, + "FirstName_7249": "Terhi", + "LastName_2005": "Hämäläinen", + "Phone_5540": "+358 09 870 2000", + "PostalCode_5906": "00530", + "SupportRepId_1708": 3 + }, + { + "City_4540": "Edinburgh ", + "CustomerId_1557": 54, + "Email_6655": "steve.murray@yahoo.uk", + "Fax_5404": null, + "FirstName_7249": "Steve", + "LastName_2005": "Murray", + "Phone_5540": "+44 0131 315 3300", + "PostalCode_5906": "EH4 1HH", + "SupportRepId_1708": 5 + }, + { + "City_4540": "Warsaw", + "CustomerId_1557": 49, + "Email_6655": "stanisław.wójcik@wp.pl", + "Fax_5404": null, + "FirstName_7249": "Stanisław", + "LastName_2005": "Wójcik", + "Phone_5540": "+48 22 828 37 39", + "PostalCode_5906": "00-358", + "SupportRepId_1708": 4 + }, + { + "City_4540": "Toronto", + "CustomerId_1557": 29, + "Email_6655": "robbrown@shaw.ca", + "Fax_5404": null, + "FirstName_7249": "Robert", + "LastName_2005": "Brown", + "Phone_5540": "+1 (416) 363-8888", + "PostalCode_5906": "M6J 1V1", + "SupportRepId_1708": 3 + }, + { + "City_4540": "Fort Worth", + "CustomerId_1557": 26, + "Email_6655": "ricunningham@hotmail.com", + "Fax_5404": null, + "FirstName_7249": "Richard", + "LastName_2005": "Cunningham", + "Phone_5540": "+1 (817) 924-7272", + "PostalCode_5906": "76110", + "SupportRepId_1708": 4 + }, + { + "City_4540": "Bangalore", + "CustomerId_1557": 59, + "Email_6655": "puja_srivastava@yahoo.in", + "Fax_5404": null, + "FirstName_7249": "Puja", + "LastName_2005": "Srivastava", + "Phone_5540": "+91 080 22289999", + "PostalCode_5906": "560001", + "SupportRepId_1708": 3 + }, + { + "City_4540": "London", + "CustomerId_1557": 53, + "Email_6655": "phil.hughes@gmail.com", + "Fax_5404": null, + "FirstName_7249": "Phil", + "LastName_2005": "Hughes", + "Phone_5540": "+44 020 7976 5722", + "PostalCode_5906": "SW1V 3EN", + "SupportRepId_1708": 3 + }, + { + "City_4540": "Tucson", + "CustomerId_1557": 27, + "Email_6655": "patrick.gray@aol.com", + "Fax_5404": null, + "FirstName_7249": "Patrick", + "LastName_2005": "Gray", + "Phone_5540": "+1 (520) 622-4200", + "PostalCode_5906": "85719", + "SupportRepId_1708": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e4f740968caba0d0/request.json b/test-snapshots/query/e4f740968caba0d0/request.json new file mode 100644 index 0000000..f5238fc --- /dev/null +++ b/test-snapshots/query/e4f740968caba0d0/request.json @@ -0,0 +1,75 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_1708": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "City_4540": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_5906": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Phone_5540": { + "type": "column", + "column": "Phone", + "fields": null + }, + "CustomerId_1557": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_6655": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_5404": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_7249": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_2005": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "FirstName", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e4febec8d9de8c10/expected.json b/test-snapshots/query/e4febec8d9de8c10/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e4febec8d9de8c10/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e4febec8d9de8c10/request.json b/test-snapshots/query/e4febec8d9de8c10/request.json new file mode 100644 index 0000000..9f693b2 --- /dev/null +++ b/test-snapshots/query/e4febec8d9de8c10/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e517ed33ba61700d/expected.json b/test-snapshots/query/e517ed33ba61700d/expected.json new file mode 100644 index 0000000..a1543ca --- /dev/null +++ b/test-snapshots/query/e517ed33ba61700d/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 5061413, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 152555, + "Name": "Etnia", + "TrackId": 248, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e517ed33ba61700d/request.json b/test-snapshots/query/e517ed33ba61700d/request.json new file mode 100644 index 0000000..e8359a0 --- /dev/null +++ b/test-snapshots/query/e517ed33ba61700d/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e520ff153efd2bd6/expected.json b/test-snapshots/query/e520ff153efd2bd6/expected.json new file mode 100644 index 0000000..69ebe0f --- /dev/null +++ b/test-snapshots/query/e520ff153efd2bd6/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Brazilian Music", + "PlaylistId": 11 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e520ff153efd2bd6/request.json b/test-snapshots/query/e520ff153efd2bd6/request.json new file mode 100644 index 0000000..329a9bd --- /dev/null +++ b/test-snapshots/query/e520ff153efd2bd6/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e53ba5063b72165a/expected.json b/test-snapshots/query/e53ba5063b72165a/expected.json new file mode 100644 index 0000000..b47235a --- /dev/null +++ b/test-snapshots/query/e53ba5063b72165a/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e53ba5063b72165a/request.json b/test-snapshots/query/e53ba5063b72165a/request.json new file mode 100644 index 0000000..0895167 --- /dev/null +++ b/test-snapshots/query/e53ba5063b72165a/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e53fbe040fbba098/expected.json b/test-snapshots/query/e53fbe040fbba098/expected.json new file mode 100644 index 0000000..834c818 --- /dev/null +++ b/test-snapshots/query/e53fbe040fbba098/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "Address_4985": "1033 N Park Ave", + "City_3868": "Tucson", + "Company_2503": null, + "Country_1917": "USA", + "CustomerId_0852": 27, + "Email_1209": "patrick.gray@aol.com", + "LastName_2281": "Gray", + "Phone_1897": "+1 (520) 622-4200", + "State_9462": "AZ" + }, + { + "Address_4985": "11, Place Bellecour", + "City_3868": "Lyon", + "Company_2503": null, + "Country_1917": "France", + "CustomerId_0852": 41, + "Email_1209": "marc.dubois@hotmail.com", + "LastName_2281": "Dubois", + "Phone_1897": "+33 04 78 30 30 30", + "State_9462": null + }, + { + "Address_4985": "110 Raeburn Pl", + "City_3868": "Edinburgh ", + "Company_2503": null, + "Country_1917": "United Kingdom", + "CustomerId_0852": 54, + "Email_1209": "steve.murray@yahoo.uk", + "LastName_2281": "Murray", + "Phone_1897": "+44 0131 315 3300", + "State_9462": null + }, + { + "Address_4985": "113 Lupus St", + "City_3868": "London", + "Company_2503": null, + "Country_1917": "United Kingdom", + "CustomerId_0852": 53, + "Email_1209": "phil.hughes@gmail.com", + "LastName_2281": "Hughes", + "Phone_1897": "+44 020 7976 5722", + "State_9462": null + }, + { + "Address_4985": "12,Community Centre", + "City_3868": "Delhi", + "Company_2503": null, + "Country_1917": "India", + "CustomerId_0852": 58, + "Email_1209": "manoj.pareek@rediff.com", + "LastName_2281": "Pareek", + "Phone_1897": "+91 0124 39883988", + "State_9462": null + }, + { + "Address_4985": "120 S Orange Ave", + "City_3868": "Orlando", + "Company_2503": null, + "Country_1917": "USA", + "CustomerId_0852": 22, + "Email_1209": "hleacock@gmail.com", + "LastName_2281": "Leacock", + "Phone_1897": "+1 (407) 999-7788", + "State_9462": "FL" + }, + { + "Address_4985": "1498 rue Bélanger", + "City_3868": "Montréal", + "Company_2503": null, + "Country_1917": "Canada", + "CustomerId_0852": 3, + "Email_1209": "ftremblay@gmail.com", + "LastName_2281": "Tremblay", + "Phone_1897": "+1 (514) 721-4711", + "State_9462": "QC" + }, + { + "Address_4985": "162 E Superior Street", + "City_3868": "Chicago", + "Company_2503": null, + "Country_1917": "USA", + "CustomerId_0852": 24, + "Email_1209": "fralston@gmail.com", + "LastName_2281": "Ralston", + "Phone_1897": "+1 (312) 332-3232", + "State_9462": "IL" + }, + { + "Address_4985": "194A Chain Lake Drive", + "City_3868": "Halifax", + "Company_2503": null, + "Country_1917": "Canada", + "CustomerId_0852": 31, + "Email_1209": "marthasilk@gmail.com", + "LastName_2281": "Silk", + "Phone_1897": "+1 (902) 450-0450", + "State_9462": "NS" + }, + { + "Address_4985": "202 Hoxton Street", + "City_3868": "London", + "Company_2503": null, + "Country_1917": "United Kingdom", + "CustomerId_0852": 52, + "Email_1209": "emma_jones@hotmail.com", + "LastName_2281": "Jones", + "Phone_1897": "+44 020 7707 0707", + "State_9462": null + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e53fbe040fbba098/request.json b/test-snapshots/query/e53fbe040fbba098/request.json new file mode 100644 index 0000000..27a32f4 --- /dev/null +++ b/test-snapshots/query/e53fbe040fbba098/request.json @@ -0,0 +1,67 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_4985": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_3868": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_2503": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_1917": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_0852": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_1209": { + "type": "column", + "column": "Email", + "fields": null + }, + "Phone_1897": { + "type": "column", + "column": "Phone", + "fields": null + }, + "State_9462": { + "type": "column", + "column": "State", + "fields": null + }, + "LastName_2281": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e54f43935b302c30/expected.json b/test-snapshots/query/e54f43935b302c30/expected.json new file mode 100644 index 0000000..2ce70ba --- /dev/null +++ b/test-snapshots/query/e54f43935b302c30/expected.json @@ -0,0 +1,214 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 108, + "InvoiceLineId_7027": 579, + "Quantity_9841": 1, + "TrackId_5695": 1 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 108, + "InvoiceLineId_7027": 581, + "Quantity_9841": 1, + "TrackId_5695": 9 + }, + { + "InvoiceId_2275": 319, + "InvoiceLineId_7027": 1729, + "Quantity_9841": 1, + "TrackId_5695": 9 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 108, + "InvoiceLineId_7027": 582, + "Quantity_9841": 1, + "TrackId_5695": 13 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 2, + "InvoiceLineId_7027": 3, + "Quantity_9841": 1, + "TrackId_5695": 6 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 2, + "InvoiceLineId_7027": 4, + "Quantity_9841": 1, + "TrackId_5695": 8 + }, + { + "InvoiceId_2275": 214, + "InvoiceLineId_7027": 1155, + "Quantity_9841": 1, + "TrackId_5695": 8 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 2, + "InvoiceLineId_7027": 6, + "Quantity_9841": 1, + "TrackId_5695": 12 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 2, + "InvoiceLineId_7027": 5, + "Quantity_9841": 1, + "TrackId_5695": 10 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId_2275": 214, + "InvoiceLineId_7027": 1156, + "Quantity_9841": 1, + "TrackId_5695": 14 + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e54f43935b302c30/request.json b/test-snapshots/query/e54f43935b302c30/request.json new file mode 100644 index 0000000..18ff270 --- /dev/null +++ b/test-snapshots/query/e54f43935b302c30/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId_2275": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_7027": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_9841": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId_5695": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e594e795a0accf50/expected.json b/test-snapshots/query/e594e795a0accf50/expected.json new file mode 100644 index 0000000..e02a05e --- /dev/null +++ b/test-snapshots/query/e594e795a0accf50/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_5840": 155, + "Name_0112": "Zeca Pagodinho" + }, + { + "ArtistId_5840": 168, + "Name_0112": "Youssou N'Dour" + }, + { + "ArtistId_5840": 212, + "Name_0112": "Yo-Yo Ma" + }, + { + "ArtistId_5840": 255, + "Name_0112": "Yehudi Menuhin" + }, + { + "ArtistId_5840": 181, + "Name_0112": "Xis" + }, + { + "ArtistId_5840": 211, + "Name_0112": "Wilhelm Kempff" + }, + { + "ArtistId_5840": 154, + "Name_0112": "Whitesnake" + }, + { + "ArtistId_5840": 75, + "Name_0112": "Vinicius, Toquinho & Quarteto Em Cy" + }, + { + "ArtistId_5840": 73, + "Name_0112": "Vinícius E Qurteto Em Cy" + }, + { + "ArtistId_5840": 74, + "Name_0112": "Vinícius E Odette Lara" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e594e795a0accf50/request.json b/test-snapshots/query/e594e795a0accf50/request.json new file mode 100644 index 0000000..2708fca --- /dev/null +++ b/test-snapshots/query/e594e795a0accf50/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_5840": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_0112": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e59fd54d377e16f9/expected.json b/test-snapshots/query/e59fd54d377e16f9/expected.json new file mode 100644 index 0000000..fc9707f --- /dev/null +++ b/test-snapshots/query/e59fd54d377e16f9/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e59fd54d377e16f9/request.json b/test-snapshots/query/e59fd54d377e16f9/request.json new file mode 100644 index 0000000..10adb5d --- /dev/null +++ b/test-snapshots/query/e59fd54d377e16f9/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Google Inc." + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (650) 253-0000" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e5b3753a549a0bb0/expected.json b/test-snapshots/query/e5b3753a549a0bb0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e5b3753a549a0bb0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e5b3753a549a0bb0/request.json b/test-snapshots/query/e5b3753a549a0bb0/request.json new file mode 100644 index 0000000..e105199 --- /dev/null +++ b/test-snapshots/query/e5b3753a549a0bb0/request.json @@ -0,0 +1,92 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e5bb6fcc03e4e390/expected.json b/test-snapshots/query/e5bb6fcc03e4e390/expected.json new file mode 100644 index 0000000..add2fc5 --- /dev/null +++ b/test-snapshots/query/e5bb6fcc03e4e390/expected.json @@ -0,0 +1,102 @@ +[ + { + "rows": [ + { + "Address_5781": "11120 Jasper Ave NW", + "BirthDate_4094": "1962-02-18", + "City_3840": "Edmonton", + "Email_4268": "andrew@chinookcorp.com", + "EmployeeId_1165": 1, + "FirstName_2548": "Andrew", + "Phone_9210": "+1 (780) 428-9482", + "PostalCode_3554": "T5K 2N1", + "ReportsTo_7033": null, + "Title_7681": "General Manager" + }, + { + "Address_5781": "825 8 Ave SW", + "BirthDate_4094": "1958-12-08", + "City_3840": "Calgary", + "Email_4268": "nancy@chinookcorp.com", + "EmployeeId_1165": 2, + "FirstName_2548": "Nancy", + "Phone_9210": "+1 (403) 262-3443", + "PostalCode_3554": "T2P 2T3", + "ReportsTo_7033": 1, + "Title_7681": "Sales Manager" + }, + { + "Address_5781": "1111 6 Ave SW", + "BirthDate_4094": "1973-08-29", + "City_3840": "Calgary", + "Email_4268": "jane@chinookcorp.com", + "EmployeeId_1165": 3, + "FirstName_2548": "Jane", + "Phone_9210": "+1 (403) 262-3443", + "PostalCode_3554": "T2P 5M5", + "ReportsTo_7033": 2, + "Title_7681": "Sales Support Agent" + }, + { + "Address_5781": "683 10 Street SW", + "BirthDate_4094": "1947-09-19", + "City_3840": "Calgary", + "Email_4268": "margaret@chinookcorp.com", + "EmployeeId_1165": 4, + "FirstName_2548": "Margaret", + "Phone_9210": "+1 (403) 263-4423", + "PostalCode_3554": "T2P 5G3", + "ReportsTo_7033": 2, + "Title_7681": "Sales Support Agent" + }, + { + "Address_5781": "7727B 41 Ave", + "BirthDate_4094": "1965-03-03", + "City_3840": "Calgary", + "Email_4268": "steve@chinookcorp.com", + "EmployeeId_1165": 5, + "FirstName_2548": "Steve", + "Phone_9210": "1 (780) 836-9987", + "PostalCode_3554": "T3B 1Y7", + "ReportsTo_7033": 2, + "Title_7681": "Sales Support Agent" + }, + { + "Address_5781": "5827 Bowness Road NW", + "BirthDate_4094": "1973-07-01", + "City_3840": "Calgary", + "Email_4268": "michael@chinookcorp.com", + "EmployeeId_1165": 6, + "FirstName_2548": "Michael", + "Phone_9210": "+1 (403) 246-9887", + "PostalCode_3554": "T3B 0C5", + "ReportsTo_7033": 1, + "Title_7681": "IT Manager" + }, + { + "Address_5781": "590 Columbia Boulevard West", + "BirthDate_4094": "1970-05-29", + "City_3840": "Lethbridge", + "Email_4268": "robert@chinookcorp.com", + "EmployeeId_1165": 7, + "FirstName_2548": "Robert", + "Phone_9210": "+1 (403) 456-9986", + "PostalCode_3554": "T1K 5N8", + "ReportsTo_7033": 6, + "Title_7681": "IT Staff" + }, + { + "Address_5781": "923 7 ST NW", + "BirthDate_4094": "1968-01-09", + "City_3840": "Lethbridge", + "Email_4268": "laura@chinookcorp.com", + "EmployeeId_1165": 8, + "FirstName_2548": "Laura", + "Phone_9210": "+1 (403) 467-3351", + "PostalCode_3554": "T1H 1Y8", + "ReportsTo_7033": 6, + "Title_7681": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e5bb6fcc03e4e390/request.json b/test-snapshots/query/e5bb6fcc03e4e390/request.json new file mode 100644 index 0000000..cd4f9fe --- /dev/null +++ b/test-snapshots/query/e5bb6fcc03e4e390/request.json @@ -0,0 +1,80 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_5781": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_4094": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_3840": { + "type": "column", + "column": "City", + "fields": null + }, + "PostalCode_3554": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Email_4268": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_1165": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Title_7681": { + "type": "column", + "column": "Title", + "fields": null + }, + "FirstName_2548": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "ReportsTo_7033": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Phone_9210": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "EmployeeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e5c0e3bce0537c6e/expected.json b/test-snapshots/query/e5c0e3bce0537c6e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e5c0e3bce0537c6e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e5c0e3bce0537c6e/request.json b/test-snapshots/query/e5c0e3bce0537c6e/request.json new file mode 100644 index 0000000..3ca24f7 --- /dev/null +++ b/test-snapshots/query/e5c0e3bce0537c6e/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e5e10ae2e3a9b12d/expected.json b/test-snapshots/query/e5e10ae2e3a9b12d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e5e10ae2e3a9b12d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e5e10ae2e3a9b12d/request.json b/test-snapshots/query/e5e10ae2e3a9b12d/request.json new file mode 100644 index 0000000..709e717 --- /dev/null +++ b/test-snapshots/query/e5e10ae2e3a9b12d/request.json @@ -0,0 +1,86 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-03-04" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 81 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e5e152e64e6128d1/expected.json b/test-snapshots/query/e5e152e64e6128d1/expected.json new file mode 100644 index 0000000..5d3fad9 --- /dev/null +++ b/test-snapshots/query/e5e152e64e6128d1/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e5e152e64e6128d1/request.json b/test-snapshots/query/e5e152e64e6128d1/request.json new file mode 100644 index 0000000..5ce2523 --- /dev/null +++ b/test-snapshots/query/e5e152e64e6128d1/request.json @@ -0,0 +1,130 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1973-07-01" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Canada" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e5faf6f8d8f6811b/expected.json b/test-snapshots/query/e5faf6f8d8f6811b/expected.json new file mode 100644 index 0000000..7d8d624 --- /dev/null +++ b/test-snapshots/query/e5faf6f8d8f6811b/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "BillingPostalCode_8404": "110017", + "BillingState_9392": null, + "CustomerId_1535": 58, + "InvoiceId_9774": 412 + }, + { + "BillingPostalCode_8404": "00530", + "BillingState_9392": null, + "CustomerId_1535": 44, + "InvoiceId_9774": 411 + }, + { + "BillingPostalCode_8404": null, + "BillingState_9392": null, + "CustomerId_1535": 35, + "InvoiceId_9774": 410 + }, + { + "BillingPostalCode_8404": "M6J 1V1", + "BillingState_9392": "ON", + "CustomerId_1535": 29, + "InvoiceId_9774": 409 + }, + { + "BillingPostalCode_8404": "53703", + "BillingState_9392": "WI", + "CustomerId_1535": 25, + "InvoiceId_9774": 408 + }, + { + "BillingPostalCode_8404": "2113", + "BillingState_9392": "MA", + "CustomerId_1535": 23, + "InvoiceId_9774": 407 + }, + { + "BillingPostalCode_8404": "89503", + "BillingState_9392": "NV", + "CustomerId_1535": 21, + "InvoiceId_9774": 406 + }, + { + "BillingPostalCode_8404": "94040-111", + "BillingState_9392": "CA", + "CustomerId_1535": 20, + "InvoiceId_9774": 405 + }, + { + "BillingPostalCode_8404": "14300", + "BillingState_9392": null, + "CustomerId_1535": 6, + "InvoiceId_9774": 404 + }, + { + "BillingPostalCode_8404": "1106", + "BillingState_9392": null, + "CustomerId_1535": 56, + "InvoiceId_9774": 403 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e5faf6f8d8f6811b/request.json b/test-snapshots/query/e5faf6f8d8f6811b/request.json new file mode 100644 index 0000000..5d03e08 --- /dev/null +++ b/test-snapshots/query/e5faf6f8d8f6811b/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingState_9392": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "InvoiceId_9774": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "CustomerId_1535": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "BillingPostalCode_8404": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e60dad368f2da1db/expected.json b/test-snapshots/query/e60dad368f2da1db/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e60dad368f2da1db/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e60dad368f2da1db/request.json b/test-snapshots/query/e60dad368f2da1db/request.json new file mode 100644 index 0000000..cccfbb2 --- /dev/null +++ b/test-snapshots/query/e60dad368f2da1db/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Google Inc." + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e65ba27dacc15742/expected.json b/test-snapshots/query/e65ba27dacc15742/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/e65ba27dacc15742/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e65ba27dacc15742/request.json b/test-snapshots/query/e65ba27dacc15742/request.json new file mode 100644 index 0000000..e7ff654 --- /dev/null +++ b/test-snapshots/query/e65ba27dacc15742/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 54 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e664fddaffffff1f/expected.json b/test-snapshots/query/e664fddaffffff1f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e664fddaffffff1f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e664fddaffffff1f/request.json b/test-snapshots/query/e664fddaffffff1f/request.json new file mode 100644 index 0000000..060786e --- /dev/null +++ b/test-snapshots/query/e664fddaffffff1f/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (780) 428-3457" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e684afb0769a1562/expected.json b/test-snapshots/query/e684afb0769a1562/expected.json new file mode 100644 index 0000000..35113e8 --- /dev/null +++ b/test-snapshots/query/e684afb0769a1562/expected.json @@ -0,0 +1,886 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10003747, + "Composer_6824": "Caetano Veloso - Djavan", + "GenreId_4437": 7, + "Milliseconds_1874": 299337, + "Name_2607": "Linha Do Equador", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10012231, + "Composer_6824": "Acyi Marques/Arlindo Bruz/Braço, Beto Sem/Zeca Pagodinho", + "GenreId_4437": 7, + "Milliseconds_1874": 299102, + "Name_2607": "Camarão que Dorme e Onda Leva", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10019269, + "Composer_6824": "Gilberto Gil", + "GenreId_4437": 7, + "Milliseconds_1874": 302733, + "Name_2607": "Tempo Rei", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10030604, + "Composer_6824": null, + "GenreId_4437": 7, + "Milliseconds_1874": 301113, + "Name_2607": "Zambação", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10037362, + "Composer_6824": null, + "GenreId_4437": 7, + "Milliseconds_1874": 304692, + "Name_2607": "Cigano", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10053718, + "Composer_6824": null, + "GenreId_4437": 7, + "Milliseconds_1874": 300878, + "Name_2607": "Vou Pra Ai", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10107269, + "Composer_6824": null, + "GenreId_4437": 7, + "Milliseconds_1874": 307591, + "Name_2607": "Casa", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10130685, + "Composer_6824": "Dado Villa-Lobos/Marcelo Bonfá", + "GenreId_4437": 7, + "Milliseconds_1874": 308401, + "Name_2607": "Pais E Filhos", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10211473, + "Composer_6824": null, + "GenreId_4437": 7, + "Milliseconds_1874": 310073, + "Name_2607": "Engenho De Dentro", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10251097, + "Composer_6824": null, + "GenreId_4437": 7, + "Milliseconds_1874": 307095, + "Name_2607": "Banditismo Por Uma Questa", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 7, + "Name": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10003794, + "Composer_6824": "O. Osbourne, R. Daisley, R. Rhoads", + "GenreId_4437": 3, + "Milliseconds_1874": 308897, + "Name_2607": "Believer", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10055959, + "Composer_6824": "Ulrich", + "GenreId_4437": 3, + "Milliseconds_1874": 308610, + "Name_2607": "The God That Failed", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10110980, + "Composer_6824": "Apocalyptica", + "GenreId_4437": 3, + "Milliseconds_1874": 308035, + "Name_2607": "Creeping Death", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10141785, + "Composer_6824": "James Hetfield, Lars Ulrich, Dave Mustaine", + "GenreId_4437": 3, + "Milliseconds_1874": 311327, + "Name_2607": "Metal Militia", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10159725, + "Composer_6824": "Metallica", + "GenreId_4437": 3, + "Milliseconds_1874": 311719, + "Name_2607": "For Whom The Bell Tolls", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10199789, + "Composer_6824": "Hetfield, Ulrich, Hammett", + "GenreId_4437": 3, + "Milliseconds_1874": 313103, + "Name_2607": "Slither", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10229577, + "Composer_6824": "J.Hetfield/L.Ulrich", + "GenreId_4437": 3, + "Milliseconds_1874": 312424, + "Name_2607": "Battery", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10232537, + "Composer_6824": "Bob Rock/James Hetfield/Kirk Hammett/Lars Ulrich", + "GenreId_4437": 3, + "Milliseconds_1874": 314017, + "Name_2607": "Purify", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10302828, + "Composer_6824": "James Hetfield, Lars Ulrich and Kirk Hammett", + "GenreId_4437": 3, + "Milliseconds_1874": 313991, + "Name_2607": "Dyers Eve", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10326997, + "Composer_6824": "Vandenberg", + "GenreId_4437": 3, + "Milliseconds_1874": 317074, + "Name_2607": "Judgement Day", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 3, + "Name": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10005675, + "Composer_6824": "The Tea Party", + "GenreId_4437": 4, + "Milliseconds_1874": 306337, + "Name_2607": "Fire In The Head", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10026371, + "Composer_6824": "Foo Fighters", + "GenreId_4437": 4, + "Milliseconds_1874": 306442, + "Name_2607": "Halo", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10029406, + "Composer_6824": "Cornell, Commerford, Morello, Wilk", + "GenreId_4437": 4, + "Milliseconds_1874": 309786, + "Name_2607": "The Curse", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10094743, + "Composer_6824": "Foo Fighters", + "GenreId_4437": 4, + "Milliseconds_1874": 311353, + "Name_2607": "Tired Of You", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10180103, + "Composer_6824": null, + "GenreId_4437": 4, + "Milliseconds_1874": 310831, + "Name_2607": "Smaller And Smaller", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10295199, + "Composer_6824": "The Tea Party", + "GenreId_4437": 4, + "Milliseconds_1874": 315559, + "Name_2607": "Psychopomp", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10333123, + "Composer_6824": "Faith No More", + "GenreId_4437": 4, + "Milliseconds_1874": 316055, + "Name_2607": "Falling To Pieces", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10351152, + "Composer_6824": "The Tea Party", + "GenreId_4437": 4, + "Milliseconds_1874": 317257, + "Name_2607": "Transmission", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10351778, + "Composer_6824": "The Tea Party", + "GenreId_4437": 4, + "Milliseconds_1874": 317231, + "Name_2607": "Psychopomp", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10489139, + "Composer_6824": null, + "GenreId_4437": 4, + "Milliseconds_1874": 317936, + "Name_2607": "Body Count", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 4, + "Name": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10009697, + "Composer_6824": "Paul Di'Anno/Steve Harris", + "GenreId_4437": 1, + "Milliseconds_1874": 309995, + "Name_2607": "Killers", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10014683, + "Composer_6824": "Edward Van Halen, Alex Van Halen, Michael Anthony,/Edward Van Halen, Alex Van Halen, Michael Anthony, Sammy Hagar", + "GenreId_4437": 1, + "Milliseconds_1874": 308950, + "Name_2607": "Humans Being", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10019861, + "Composer_6824": "G M Sumner", + "GenreId_4437": 1, + "Milliseconds_1874": 302080, + "Name_2607": "Walking on the Moon", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10022428, + "Composer_6824": "D.Coverdal/G.Hughes/Glenn Hughes/I.Paice/Ian Paice/J.Lord/John Lord", + "GenreId_4437": 1, + "Milliseconds_1874": 306860, + "Name_2607": "Hold On", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10034711, + "Composer_6824": "Mick Hucknall and Fritz McIntyre", + "GenreId_4437": 1, + "Milliseconds_1874": 303934, + "Name_2607": "Thrill Me", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10035180, + "Composer_6824": "Richie Blackmore, Ian Gillian, Roger Glover, Jon Lord", + "GenreId_4437": 1, + "Milliseconds_1874": 307905, + "Name_2607": "Bad Attitude", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10056995, + "Composer_6824": "Steven Tyler, Joe Perry, Taylor Rhodes", + "GenreId_4437": 1, + "Milliseconds_1874": 309263, + "Name_2607": "Cryin'", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10077337, + "Composer_6824": "Bill Berry-Peter Buck-Mike Mills-Michael Stipe", + "GenreId_4437": 1, + "Milliseconds_1874": 308532, + "Name_2607": "The Wake-Up Bomb", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10078197, + "Composer_6824": "Jimmy Page, Robert Plant, John Bonham, John Paul Jones", + "GenreId_4437": 1, + "Milliseconds_1874": 307226, + "Name_2607": "Darlene", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10110351, + "Composer_6824": "Nando Reis/Samuel Rosa", + "GenreId_4437": 1, + "Milliseconds_1874": 306390, + "Name_2607": "Ali", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 1, + "Name": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10020122, + "Composer_6824": null, + "GenreId_4437": 10, + "Milliseconds_1874": 296254, + "Name_2607": "Sao Lucas 2001", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 1039615, + "Composer_6824": "Gilberto Gil", + "GenreId_4437": 10, + "Milliseconds_1874": 32287, + "Name_2607": "Casinha Feliz", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10867860, + "Composer_6824": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId_4437": 10, + "Milliseconds_1874": 328228, + "Name_2607": "Your Blue Room", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10939131, + "Composer_6824": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId_4437": 10, + "Milliseconds_1874": 330266, + "Name_2607": "United Colours", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11064884, + "Composer_6824": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId_4437": 10, + "Milliseconds_1874": 340767, + "Name_2607": "Miss Sarajevo", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 12727928, + "Composer_6824": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId_4437": 10, + "Milliseconds_1874": 383764, + "Name_2607": "Always Forever Now", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 3305164, + "Composer_6824": "Philip Glass", + "GenreId_4437": 10, + "Milliseconds_1874": 206005, + "Name_2607": "Koyaanisqatsi", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 3884133, + "Composer_6824": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId_4437": 10, + "Milliseconds_1874": 120816, + "Name_2607": "A Different Kind Of Blue", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 4888292, + "Composer_6824": "Gilberto Gil", + "GenreId_4437": 10, + "Milliseconds_1874": 148636, + "Name_2607": "O Amor Daqui De Casa", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 5851053, + "Composer_6824": "Brian Eno, Bono, Adam Clayton, The Edge & Larry Mullen Jnr.", + "GenreId_4437": 10, + "Milliseconds_1874": 180166, + "Name_2607": "Elvis Ate America", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10056970, + "Composer_6824": "Marisa Monte/Nando Reis", + "GenreId_4437": 8, + "Milliseconds_1874": 298396, + "Name_2607": "Onde Você Mora?", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10078050, + "Composer_6824": "Gilberto Gil", + "GenreId_4437": 8, + "Milliseconds_1874": 304352, + "Name_2607": "Extra", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10319296, + "Composer_6824": null, + "GenreId_4437": 8, + "Milliseconds_1874": 309733, + "Name_2607": "Crystal Ball", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10728099, + "Composer_6824": null, + "GenreId_4437": 8, + "Milliseconds_1874": 319582, + "Name_2607": "Superstition", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11193602, + "Composer_6824": null, + "GenreId_4437": 8, + "Milliseconds_1874": 334524, + "Name_2607": "I Would Do For You", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11346114, + "Composer_6824": null, + "GenreId_4437": 8, + "Milliseconds_1874": 341498, + "Name_2607": "Bring Me Your Cup", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11812170, + "Composer_6824": null, + "GenreId_4437": 8, + "Milliseconds_1874": 353671, + "Name_2607": "Mystic Man", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 12086524, + "Composer_6824": null, + "GenreId_4437": 8, + "Milliseconds_1874": 366733, + "Name_2607": "Equal Rights Downpresser Man", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 5748424, + "Composer_6824": "Bino Farias/Da Gamma/Lazão/Rás Bernard", + "GenreId_4437": 8, + "Milliseconds_1874": 173008, + "Name_2607": "Pensamento", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 5950952, + "Composer_6824": "Bino/Da Gama/Toni Garrido", + "GenreId_4437": 8, + "Milliseconds_1874": 178155, + "Name_2607": "Doutor", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 8, + "Name": "Reggae" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10085867, + "Composer_6824": "Franz Joseph Haydn", + "GenreId_4437": 24, + "Milliseconds_1874": 306687, + "Name_2607": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10887931, + "Composer_6824": "Ludwig van Beethoven", + "GenreId_4437": 24, + "Milliseconds_1874": 339567, + "Name_2607": "Prometheus Overture, Op. 43", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 1189062, + "Composer_6824": "Claudio Monteverdi", + "GenreId_4437": 24, + "Milliseconds_1874": 66639, + "Name_2607": "L'orfeo, Act 3, Sinfonia (Orchestra)", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 1208080, + "Composer_6824": "Thomas Tallis", + "GenreId_4437": 24, + "Milliseconds_1874": 69194, + "Name_2607": "Lamentations of Jeremiah, First Set Incipit Lamentatio", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 16454937, + "Composer_6824": "Pietro Antonio Locatelli", + "GenreId_4437": 24, + "Milliseconds_1874": 493573, + "Name_2607": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 1973559, + "Composer_6824": "Marc-Antoine Charpentier", + "GenreId_4437": 24, + "Milliseconds_1874": 110266, + "Name_2607": "Concert pour 4 Parties de V**les, H. 545: I. Prelude", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 2081895, + "Composer_6824": "Johann Sebastian Bach", + "GenreId_4437": 24, + "Milliseconds_1874": 120463, + "Name_2607": "Aria Mit 30 Veränderungen, BWV 988 \"Goldberg Variations\": Aria", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 2189002, + "Composer_6824": "Georges Bizet", + "GenreId_4437": 24, + "Milliseconds_1874": 132932, + "Name_2607": "Carmen: Overture", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 2193734, + "Composer_6824": "George Frideric Handel", + "GenreId_4437": 24, + "Milliseconds_1874": 120000, + "Name_2607": "Music for the Royal Fireworks, HWV351 (1749): La Réjouissance", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 2229617, + "Composer_6824": null, + "GenreId_4437": 24, + "Milliseconds_1874": 51780, + "Name_2607": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 24, + "Name": "Classical" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10115556, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 308401, + "Name_2607": "Cosmic Fiend", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10276872, + "Composer_6824": "Steve Harris", + "GenreId_4437": 6, + "Milliseconds_1874": 428016, + "Name_2607": "05 - Phantom of the Opera", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10331216, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 314409, + "Name_2607": "Lickin'", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10894406, + "Composer_6824": "Eric Clapton", + "GenreId_4437": 6, + "Milliseconds_1874": 328724, + "Name_2607": "Lonely Stranger", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11049098, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 337084, + "Name_2607": "Remedy", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11085915, + "Composer_6824": "Doyle Bramhall/Stevie Ray Vaughan", + "GenreId_4437": 6, + "Milliseconds_1874": 336927, + "Name_2607": "Wall Of Denial", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11740886, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 359314, + "Name_2607": "Black Moon Creeping", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11837342, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 361978, + "Name_2607": "She Talks To Angels", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 12047978, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 368300, + "Name_2607": "Cursed Diamonds", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 12222116, + "Composer_6824": "Chris Robinson/Rich Robinson", + "GenreId_4437": 6, + "Milliseconds_1874": 372636, + "Name_2607": "Miracle To Me", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 6, + "Name": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10181692, + "Composer_6824": null, + "GenreId_4437": 15, + "Milliseconds_1874": 254484, + "Name_2607": "Catimbo", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10334529, + "Composer_6824": "Toby Smith", + "GenreId_4437": 15, + "Milliseconds_1874": 309995, + "Name_2607": "The Kids", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10791921, + "Composer_6824": null, + "GenreId_4437": 15, + "Milliseconds_1874": 269740, + "Name_2607": "Eu So Queria Sumir", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10843832, + "Composer_6824": "Toby Smith/Wallis Buchanan", + "GenreId_4437": 15, + "Milliseconds_1874": 322455, + "Name_2607": "Journey To Arnhemland", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10988338, + "Composer_6824": null, + "GenreId_4437": 15, + "Milliseconds_1874": 274651, + "Name_2607": "Mun-Ra", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11043559, + "Composer_6824": "Stuard Zender/Toby Smith", + "GenreId_4437": 15, + "Milliseconds_1874": 329534, + "Name_2607": "Mr. Moon", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11431382, + "Composer_6824": null, + "GenreId_4437": 15, + "Milliseconds_1874": 285727, + "Name_2607": "Batalha Naval", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 11796244, + "Composer_6824": "Toby Smith", + "GenreId_4437": 15, + "Milliseconds_1874": 354560, + "Name_2607": "Light Years", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 12024875, + "Composer_6824": null, + "GenreId_4437": 15, + "Milliseconds_1874": 300564, + "Name_2607": "Instinto Colectivo", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 12168015, + "Composer_6824": null, + "GenreId_4437": 15, + "Milliseconds_1874": 304143, + "Name_2607": "Tres Reis", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "Bytes_5740": 10218398, + "Composer_6824": "Gil Evans", + "GenreId_4437": 2, + "Milliseconds_1874": 318328, + "Name_2607": "Blues For Pablo", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10317185, + "Composer_6824": null, + "GenreId_4437": 2, + "Milliseconds_1874": 310778, + "Name_2607": "Believe", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10429398, + "Composer_6824": null, + "GenreId_4437": 2, + "Milliseconds_1874": 316865, + "Name_2607": "As We Sleep", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10518284, + "Composer_6824": null, + "GenreId_4437": 2, + "Milliseconds_1874": 315219, + "Name_2607": "De La Luz", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10529483, + "Composer_6824": "Miles Davis", + "GenreId_4437": 2, + "Milliseconds_1874": 316682, + "Name_2607": "Black Satin", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10553155, + "Composer_6824": "Rick Strauss", + "GenreId_4437": 2, + "Milliseconds_1874": 320078, + "Name_2607": "End Of Romanticism", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10602166, + "Composer_6824": "Jim Beard", + "GenreId_4437": 2, + "Milliseconds_1874": 319373, + "Name_2607": "Groovus Interruptus", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10630578, + "Composer_6824": "Billy Cobham", + "GenreId_4437": 2, + "Milliseconds_1874": 318066, + "Name_2607": "The pleasant pheasant", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10653494, + "Composer_6824": "Jim Beard", + "GenreId_4437": 2, + "Milliseconds_1874": 321358, + "Name_2607": "Roll Call", + "UnitPrice_3644": 0.99 + }, + { + "Bytes_5740": 10720741, + "Composer_6824": "Patrick Claher/Richard Bull", + "GenreId_4437": 2, + "Milliseconds_1874": 321123, + "Name_2607": "Magnetic Ocean", + "UnitPrice_3644": 0.99 + } + ] + }, + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e684afb0769a1562/request.json b/test-snapshots/query/e684afb0769a1562/request.json new file mode 100644 index 0000000..43f1e82 --- /dev/null +++ b/test-snapshots/query/e684afb0769a1562/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "Name_2607": { + "type": "column", + "column": "Name", + "fields": null + }, + "Bytes_5740": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_6824": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_4437": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "UnitPrice_3644": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Milliseconds_1874": { + "type": "column", + "column": "Milliseconds", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e6d14e7b1e2d6502/expected.json b/test-snapshots/query/e6d14e7b1e2d6502/expected.json new file mode 100644 index 0000000..d762ecc --- /dev/null +++ b/test-snapshots/query/e6d14e7b1e2d6502/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Name_6974": "MPEG audio file" + }, + { + "Name_6974": "Protected AAC audio file" + }, + { + "Name_6974": "Protected MPEG-4 video file" + }, + { + "Name_6974": "Purchased AAC audio file" + }, + { + "Name_6974": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e6d14e7b1e2d6502/request.json b/test-snapshots/query/e6d14e7b1e2d6502/request.json new file mode 100644 index 0000000..7edfab4 --- /dev/null +++ b/test-snapshots/query/e6d14e7b1e2d6502/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "Name_6974": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e6e55ac4b1abfb45/expected.json b/test-snapshots/query/e6e55ac4b1abfb45/expected.json new file mode 100644 index 0000000..d7ddce6 --- /dev/null +++ b/test-snapshots/query/e6e55ac4b1abfb45/expected.json @@ -0,0 +1,166 @@ +[ + { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "11120 Jasper Ave NW", + "BirthDate": "1962-02-18", + "City": "Edmonton", + "Country": "Canada", + "Email": "andrew@chinookcorp.com", + "EmployeeId": 1, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (780) 428-3457", + "FirstName": "Andrew", + "HireDate": "2002-08-14", + "LastName": "Adams", + "Phone": "+1 (780) 428-9482", + "PostalCode": "T5K 2N1", + "ReportsTo": null, + "State": "AB", + "Title": "General Manager" + }, + { + "Address": "5827 Bowness Road NW", + "BirthDate": "1973-07-01", + "City": "Calgary", + "Country": "Canada", + "Email": "michael@chinookcorp.com", + "EmployeeId": 6, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 246-9899", + "FirstName": "Michael", + "HireDate": "2003-10-17", + "LastName": "Mitchell", + "Phone": "+1 (403) 246-9887", + "PostalCode": "T3B 0C5", + "ReportsTo": 1, + "State": "AB", + "Title": "IT Manager" + }, + { + "Address": "590 Columbia Boulevard West", + "BirthDate": "1970-05-29", + "City": "Lethbridge", + "Country": "Canada", + "Email": "robert@chinookcorp.com", + "EmployeeId": 7, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 456-8485", + "FirstName": "Robert", + "HireDate": "2004-01-02", + "LastName": "King", + "Phone": "+1 (403) 456-9986", + "PostalCode": "T1K 5N8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + }, + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + }, + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + }, + { + "Address": "923 7 ST NW", + "BirthDate": "1968-01-09", + "City": "Lethbridge", + "Country": "Canada", + "Email": "laura@chinookcorp.com", + "EmployeeId": 8, + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax": "+1 (403) 467-8772", + "FirstName": "Laura", + "HireDate": "2004-03-04", + "LastName": "Callahan", + "Phone": "+1 (403) 467-3351", + "PostalCode": "T1H 1Y8", + "ReportsTo": 6, + "State": "AB", + "Title": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e6e55ac4b1abfb45/request.json b/test-snapshots/query/e6e55ac4b1abfb45/request.json new file mode 100644 index 0000000..cddfec6 --- /dev/null +++ b/test-snapshots/query/e6e55ac4b1abfb45/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e6f238c466905020/expected.json b/test-snapshots/query/e6f238c466905020/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e6f238c466905020/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e6f238c466905020/request.json b/test-snapshots/query/e6f238c466905020/request.json new file mode 100644 index 0000000..2dfb903 --- /dev/null +++ b/test-snapshots/query/e6f238c466905020/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e70034816595e398/expected.json b/test-snapshots/query/e70034816595e398/expected.json new file mode 100644 index 0000000..1e4c2c0 --- /dev/null +++ b/test-snapshots/query/e70034816595e398/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_8386": "Philip Glass Ensemble" + }, + { + "Name_8386": "Nash Ensemble" + }, + { + "Name_8386": "C. Monteverdi, Nigel Rogers - Chiaroscuro; London Baroque; London Cornett & Sackbu" + }, + { + "Name_8386": "Emerson String Quartet" + }, + { + "Name_8386": "Mela Tenenbaum, Pro Musica Prague & Richard Kapp" + }, + { + "Name_8386": "Gerald Moore" + }, + { + "Name_8386": "Michele Campanella" + }, + { + "Name_8386": "Itzhak Perlman" + }, + { + "Name_8386": "Göteborgs Symfoniker & Neeme Järvi" + }, + { + "Name_8386": "Martin Roscoe" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e70034816595e398/request.json b/test-snapshots/query/e70034816595e398/request.json new file mode 100644 index 0000000..a8b7a4f --- /dev/null +++ b/test-snapshots/query/e70034816595e398/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "Name_8386": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e704fc1133937341/expected.json b/test-snapshots/query/e704fc1133937341/expected.json new file mode 100644 index 0000000..6113304 --- /dev/null +++ b/test-snapshots/query/e704fc1133937341/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e704fc1133937341/request.json b/test-snapshots/query/e704fc1133937341/request.json new file mode 100644 index 0000000..60e3821 --- /dev/null +++ b/test-snapshots/query/e704fc1133937341/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e715207d9260ddb4/expected.json b/test-snapshots/query/e715207d9260ddb4/expected.json new file mode 100644 index 0000000..37986be --- /dev/null +++ b/test-snapshots/query/e715207d9260ddb4/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 10428382, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 316264, + "Name": "Over And Out", + "TrackId": 1004, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e715207d9260ddb4/request.json b/test-snapshots/query/e715207d9260ddb4/request.json new file mode 100644 index 0000000..38ac371 --- /dev/null +++ b/test-snapshots/query/e715207d9260ddb4/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1004 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e7927a67583ada38/expected.json b/test-snapshots/query/e7927a67583ada38/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e7927a67583ada38/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e7927a67583ada38/request.json b/test-snapshots/query/e7927a67583ada38/request.json new file mode 100644 index 0000000..b41f363 --- /dev/null +++ b/test-snapshots/query/e7927a67583ada38/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "32801" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 0131 315 3300" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e7a6e748f5ad9e6e/expected.json b/test-snapshots/query/e7a6e748f5ad9e6e/expected.json new file mode 100644 index 0000000..4b73d8b --- /dev/null +++ b/test-snapshots/query/e7a6e748f5ad9e6e/expected.json @@ -0,0 +1,216 @@ +[ + { + "rows": [ + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 11170334, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 343719, + "TrackId_3161": 1, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 6599424, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 203102, + "TrackId_3161": 9, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 6599424, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 203102, + "TrackId_3161": 9, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 6706347, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 205688, + "TrackId_3161": 13, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 6713451, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 205662, + "TrackId_3161": 6, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 6852860, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 210834, + "TrackId_3161": 8, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 6852860, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 210834, + "TrackId_3161": 8, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 8596840, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 263288, + "TrackId_3161": 12, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 8611245, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 263497, + "TrackId_3161": 10, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "FK_InvoiceLineTrackId": { + "rows": [ + { + "AlbumId_9616": 1, + "Bytes_6166": 8817038, + "Composer_3686": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_7519": 1, + "MediaTypeId_4895": 1, + "Milliseconds_7100": 270863, + "TrackId_3161": 14, + "UnitPrice_3353": 0.99 + } + ] + }, + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e7a6e748f5ad9e6e/request.json b/test-snapshots/query/e7a6e748f5ad9e6e/request.json new file mode 100644 index 0000000..8d07607 --- /dev/null +++ b/test-snapshots/query/e7a6e748f5ad9e6e/request.json @@ -0,0 +1,94 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_9616": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_6166": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_3686": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_7519": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_4895": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_7100": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "UnitPrice_3353": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "TrackId_3161": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e7c8353d69410888/expected.json b/test-snapshots/query/e7c8353d69410888/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e7c8353d69410888/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e7c8353d69410888/request.json b/test-snapshots/query/e7c8353d69410888/request.json new file mode 100644 index 0000000..403f6d2 --- /dev/null +++ b/test-snapshots/query/e7c8353d69410888/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "590 Columbia Boulevard West" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e7f86f03432ab7ea/expected.json b/test-snapshots/query/e7f86f03432ab7ea/expected.json new file mode 100644 index 0000000..9b76c50 --- /dev/null +++ b/test-snapshots/query/e7f86f03432ab7ea/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 8, + "TrackId": 1006 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e7f86f03432ab7ea/request.json b/test-snapshots/query/e7f86f03432ab7ea/request.json new file mode 100644 index 0000000..4d03c8f --- /dev/null +++ b/test-snapshots/query/e7f86f03432ab7ea/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e8413204f12411ff/expected.json b/test-snapshots/query/e8413204f12411ff/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e8413204f12411ff/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e8413204f12411ff/request.json b/test-snapshots/query/e8413204f12411ff/request.json new file mode 100644 index 0000000..3a2681f --- /dev/null +++ b/test-snapshots/query/e8413204f12411ff/request.json @@ -0,0 +1,102 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Leacock" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e861dd97193ecba/expected.json b/test-snapshots/query/e861dd97193ecba/expected.json new file mode 100644 index 0000000..054abf1 --- /dev/null +++ b/test-snapshots/query/e861dd97193ecba/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_4838": "90’s Music", + "PlaylistId_0882": 5 + }, + { + "Name_4838": "Audiobooks", + "PlaylistId_0882": 4 + }, + { + "Name_4838": "Audiobooks", + "PlaylistId_0882": 6 + }, + { + "Name_4838": "Brazilian Music", + "PlaylistId_0882": 11 + }, + { + "Name_4838": "Classical", + "PlaylistId_0882": 12 + }, + { + "Name_4838": "Classical 101 - Deep Cuts", + "PlaylistId_0882": 13 + }, + { + "Name_4838": "Classical 101 - Next Steps", + "PlaylistId_0882": 14 + }, + { + "Name_4838": "Classical 101 - The Basics", + "PlaylistId_0882": 15 + }, + { + "Name_4838": "Grunge", + "PlaylistId_0882": 16 + }, + { + "Name_4838": "Heavy Metal Classic", + "PlaylistId_0882": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e861dd97193ecba/request.json b/test-snapshots/query/e861dd97193ecba/request.json new file mode 100644 index 0000000..38d7892 --- /dev/null +++ b/test-snapshots/query/e861dd97193ecba/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_4838": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_0882": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e8ab0b32028e8204/expected.json b/test-snapshots/query/e8ab0b32028e8204/expected.json new file mode 100644 index 0000000..68f1491 --- /dev/null +++ b/test-snapshots/query/e8ab0b32028e8204/expected.json @@ -0,0 +1,7 @@ +[ + { + "aggregates": { + "Name_min_9489": "A Cor Do Som" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/e8ab0b32028e8204/request.json b/test-snapshots/query/e8ab0b32028e8204/request.json new file mode 100644 index 0000000..53cd5d7 --- /dev/null +++ b/test-snapshots/query/e8ab0b32028e8204/request.json @@ -0,0 +1,15 @@ +{ + "collection": "chinook.Artist", + "query": { + "aggregates": { + "Name_min_9489": { + "type": "single_column", + "column": "Name", + "function": "min" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e92076994ea877da/expected.json b/test-snapshots/query/e92076994ea877da/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e92076994ea877da/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e92076994ea877da/request.json b/test-snapshots/query/e92076994ea877da/request.json new file mode 100644 index 0000000..270267b --- /dev/null +++ b/test-snapshots/query/e92076994ea877da/request.json @@ -0,0 +1,174 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T1H 1Y8" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BirthDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1973-07-01" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e920e7b5ebf6b645/expected.json b/test-snapshots/query/e920e7b5ebf6b645/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e920e7b5ebf6b645/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e920e7b5ebf6b645/request.json b/test-snapshots/query/e920e7b5ebf6b645/request.json new file mode 100644 index 0000000..f7627b9 --- /dev/null +++ b/test-snapshots/query/e920e7b5ebf6b645/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e92c153466e2b2df/expected.json b/test-snapshots/query/e92c153466e2b2df/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e92c153466e2b2df/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e92c153466e2b2df/request.json b/test-snapshots/query/e92c153466e2b2df/request.json new file mode 100644 index 0000000..42dda88 --- /dev/null +++ b/test-snapshots/query/e92c153466e2b2df/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T2P 5G3" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e949b674b213c188/expected.json b/test-snapshots/query/e949b674b213c188/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e949b674b213c188/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e949b674b213c188/request.json b/test-snapshots/query/e949b674b213c188/request.json new file mode 100644 index 0000000..384b47e --- /dev/null +++ b/test-snapshots/query/e949b674b213c188/request.json @@ -0,0 +1,157 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Peacock" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "laura@chinookcorp.com" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e966eb3b83a90a4c/expected.json b/test-snapshots/query/e966eb3b83a90a4c/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e966eb3b83a90a4c/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e966eb3b83a90a4c/request.json b/test-snapshots/query/e966eb3b83a90a4c/request.json new file mode 100644 index 0000000..5c54369 --- /dev/null +++ b/test-snapshots/query/e966eb3b83a90a4c/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "90’s Music" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e9681f6d699352f1/expected.json b/test-snapshots/query/e9681f6d699352f1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e9681f6d699352f1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e9681f6d699352f1/request.json b/test-snapshots/query/e9681f6d699352f1/request.json new file mode 100644 index 0000000..8f291db --- /dev/null +++ b/test-snapshots/query/e9681f6d699352f1/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1011" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e9a6b6bbe3b7a892/expected.json b/test-snapshots/query/e9a6b6bbe3b7a892/expected.json new file mode 100644 index 0000000..1b426d8 --- /dev/null +++ b/test-snapshots/query/e9a6b6bbe3b7a892/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 105, + "Name": "Men At Work" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e9a6b6bbe3b7a892/request.json b/test-snapshots/query/e9a6b6bbe3b7a892/request.json new file mode 100644 index 0000000..8136194 --- /dev/null +++ b/test-snapshots/query/e9a6b6bbe3b7a892/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/e9e19e7a834e203e/expected.json b/test-snapshots/query/e9e19e7a834e203e/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/e9e19e7a834e203e/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e9e19e7a834e203e/request.json b/test-snapshots/query/e9e19e7a834e203e/request.json new file mode 100644 index 0000000..fa4cb71 --- /dev/null +++ b/test-snapshots/query/e9e19e7a834e203e/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 263497 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e9f5a6ec18f1e64d/expected.json b/test-snapshots/query/e9f5a6ec18f1e64d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/e9f5a6ec18f1e64d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e9f5a6ec18f1e64d/request.json b/test-snapshots/query/e9f5a6ec18f1e64d/request.json new file mode 100644 index 0000000..c859477 --- /dev/null +++ b/test-snapshots/query/e9f5a6ec18f1e64d/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "marc.dubois@hotmail.com" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "United Kingdom" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "EH4 1HH" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/e9fe202f0ddf98e8/expected.json b/test-snapshots/query/e9fe202f0ddf98e8/expected.json new file mode 100644 index 0000000..65a3604 --- /dev/null +++ b/test-snapshots/query/e9fe202f0ddf98e8/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 103, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 1)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/e9fe202f0ddf98e8/request.json b/test-snapshots/query/e9fe202f0ddf98e8/request.json new file mode 100644 index 0000000..0c2a910 --- /dev/null +++ b/test-snapshots/query/e9fe202f0ddf98e8/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 1)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ea60995aad409307/expected.json b/test-snapshots/query/ea60995aad409307/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/ea60995aad409307/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ea60995aad409307/request.json b/test-snapshots/query/ea60995aad409307/request.json new file mode 100644 index 0000000..4b1ffae --- /dev/null +++ b/test-snapshots/query/ea60995aad409307/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eab9d4600a02c849/expected.json b/test-snapshots/query/eab9d4600a02c849/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eab9d4600a02c849/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eab9d4600a02c849/request.json b/test-snapshots/query/eab9d4600a02c849/request.json new file mode 100644 index 0000000..268d96e --- /dev/null +++ b/test-snapshots/query/eab9d4600a02c849/request.json @@ -0,0 +1,120 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eac10d3589d3e3eb/expected.json b/test-snapshots/query/eac10d3589d3e3eb/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eac10d3589d3e3eb/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eac10d3589d3e3eb/request.json b/test-snapshots/query/eac10d3589d3e3eb/request.json new file mode 100644 index 0000000..c5fbfea --- /dev/null +++ b/test-snapshots/query/eac10d3589d3e3eb/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eac3e1fc90655bd6/expected.json b/test-snapshots/query/eac3e1fc90655bd6/expected.json new file mode 100644 index 0000000..1304a9e --- /dev/null +++ b/test-snapshots/query/eac3e1fc90655bd6/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + }, + { + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eac3e1fc90655bd6/request.json b/test-snapshots/query/eac3e1fc90655bd6/request.json new file mode 100644 index 0000000..f72c0e8 --- /dev/null +++ b/test-snapshots/query/eac3e1fc90655bd6/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eadfd1c38be09684/expected.json b/test-snapshots/query/eadfd1c38be09684/expected.json new file mode 100644 index 0000000..e809809 --- /dev/null +++ b/test-snapshots/query/eadfd1c38be09684/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 4415557, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 132231, + "Name": "Sangue De Bairro", + "TrackId": 260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eadfd1c38be09684/request.json b/test-snapshots/query/eadfd1c38be09684/request.json new file mode 100644 index 0000000..e293364 --- /dev/null +++ b/test-snapshots/query/eadfd1c38be09684/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 260 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/eb08155e3f745af2/expected.json b/test-snapshots/query/eb08155e3f745af2/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eb08155e3f745af2/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eb08155e3f745af2/request.json b/test-snapshots/query/eb08155e3f745af2/request.json new file mode 100644 index 0000000..c2a603b --- /dev/null +++ b/test-snapshots/query/eb08155e3f745af2/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Calgary" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-05-03" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "590 Columbia Boulevard West" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eb0ad37adad87ddc/expected.json b/test-snapshots/query/eb0ad37adad87ddc/expected.json new file mode 100644 index 0000000..08d42c6 --- /dev/null +++ b/test-snapshots/query/eb0ad37adad87ddc/expected.json @@ -0,0 +1,322 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_9584": "Audiobooks", + "PlaylistId_1148": 4 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_9584": "Audiobooks", + "PlaylistId_1148": 6 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_9584": "Movies", + "PlaylistId_1148": 2 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name_9584": "Movies", + "PlaylistId_1148": 7 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1000 + }, + { + "PlaylistId": 1, + "TrackId": 1001 + }, + { + "PlaylistId": 1, + "TrackId": 1002 + }, + { + "PlaylistId": 1, + "TrackId": 1003 + }, + { + "PlaylistId": 1, + "TrackId": 1004 + }, + { + "PlaylistId": 1, + "TrackId": 1005 + }, + { + "PlaylistId": 1, + "TrackId": 1006 + }, + { + "PlaylistId": 1, + "TrackId": 1007 + }, + { + "PlaylistId": 1, + "TrackId": 1008 + }, + { + "PlaylistId": 1, + "TrackId": 1009 + } + ] + }, + "Name_9584": "Music", + "PlaylistId_1148": 1 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 10, + "TrackId": 2819 + }, + { + "PlaylistId": 10, + "TrackId": 2820 + }, + { + "PlaylistId": 10, + "TrackId": 2821 + }, + { + "PlaylistId": 10, + "TrackId": 2822 + }, + { + "PlaylistId": 10, + "TrackId": 2823 + }, + { + "PlaylistId": 10, + "TrackId": 2824 + }, + { + "PlaylistId": 10, + "TrackId": 2825 + }, + { + "PlaylistId": 10, + "TrackId": 2826 + }, + { + "PlaylistId": 10, + "TrackId": 2827 + }, + { + "PlaylistId": 10, + "TrackId": 2828 + } + ] + }, + "Name_9584": "TV Shows", + "PlaylistId_1148": 10 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 11, + "TrackId": 1088 + }, + { + "PlaylistId": 11, + "TrackId": 1093 + }, + { + "PlaylistId": 11, + "TrackId": 1099 + }, + { + "PlaylistId": 11, + "TrackId": 1105 + }, + { + "PlaylistId": 11, + "TrackId": 1514 + }, + { + "PlaylistId": 11, + "TrackId": 1518 + }, + { + "PlaylistId": 11, + "TrackId": 1519 + }, + { + "PlaylistId": 11, + "TrackId": 1916 + }, + { + "PlaylistId": 11, + "TrackId": 1921 + }, + { + "PlaylistId": 11, + "TrackId": 1928 + } + ] + }, + "Name_9584": "Brazilian Music", + "PlaylistId_1148": 11 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 12, + "TrackId": 3403 + }, + { + "PlaylistId": 12, + "TrackId": 3404 + }, + { + "PlaylistId": 12, + "TrackId": 3405 + }, + { + "PlaylistId": 12, + "TrackId": 3406 + }, + { + "PlaylistId": 12, + "TrackId": 3407 + }, + { + "PlaylistId": 12, + "TrackId": 3408 + }, + { + "PlaylistId": 12, + "TrackId": 3409 + }, + { + "PlaylistId": 12, + "TrackId": 3410 + }, + { + "PlaylistId": 12, + "TrackId": 3411 + }, + { + "PlaylistId": 12, + "TrackId": 3412 + } + ] + }, + "Name_9584": "Classical", + "PlaylistId_1148": 12 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 13, + "TrackId": 3479 + }, + { + "PlaylistId": 13, + "TrackId": 3480 + }, + { + "PlaylistId": 13, + "TrackId": 3481 + }, + { + "PlaylistId": 13, + "TrackId": 3482 + }, + { + "PlaylistId": 13, + "TrackId": 3483 + }, + { + "PlaylistId": 13, + "TrackId": 3484 + }, + { + "PlaylistId": 13, + "TrackId": 3485 + }, + { + "PlaylistId": 13, + "TrackId": 3486 + }, + { + "PlaylistId": 13, + "TrackId": 3487 + }, + { + "PlaylistId": 13, + "TrackId": 3488 + } + ] + }, + "Name_9584": "Classical 101 - Deep Cuts", + "PlaylistId_1148": 13 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId": 14, + "TrackId": 3430 + }, + { + "PlaylistId": 14, + "TrackId": 3431 + }, + { + "PlaylistId": 14, + "TrackId": 3432 + }, + { + "PlaylistId": 14, + "TrackId": 3433 + }, + { + "PlaylistId": 14, + "TrackId": 3434 + }, + { + "PlaylistId": 14, + "TrackId": 3435 + }, + { + "PlaylistId": 14, + "TrackId": 3436 + }, + { + "PlaylistId": 14, + "TrackId": 3437 + }, + { + "PlaylistId": 14, + "TrackId": 3438 + }, + { + "PlaylistId": 14, + "TrackId": 3439 + } + ] + }, + "Name_9584": "Classical 101 - Next Steps", + "PlaylistId_1148": 14 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eb0ad37adad87ddc/request.json b/test-snapshots/query/eb0ad37adad87ddc/request.json new file mode 100644 index 0000000..9edf015 --- /dev/null +++ b/test-snapshots/query/eb0ad37adad87ddc/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_9584": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_1148": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "object", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/eb2af22c53fd5c36/expected.json b/test-snapshots/query/eb2af22c53fd5c36/expected.json new file mode 100644 index 0000000..fb6a210 --- /dev/null +++ b/test-snapshots/query/eb2af22c53fd5c36/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_3280": 1, + "Name_0650": "Rock" + }, + { + "GenreId_3280": 2, + "Name_0650": "Jazz" + }, + { + "GenreId_3280": 3, + "Name_0650": "Metal" + }, + { + "GenreId_3280": 4, + "Name_0650": "Alternative & Punk" + }, + { + "GenreId_3280": 5, + "Name_0650": "Rock And Roll" + }, + { + "GenreId_3280": 6, + "Name_0650": "Blues" + }, + { + "GenreId_3280": 7, + "Name_0650": "Latin" + }, + { + "GenreId_3280": 8, + "Name_0650": "Reggae" + }, + { + "GenreId_3280": 9, + "Name_0650": "Pop" + }, + { + "GenreId_3280": 10, + "Name_0650": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eb2af22c53fd5c36/request.json b/test-snapshots/query/eb2af22c53fd5c36/request.json new file mode 100644 index 0000000..f87db5e --- /dev/null +++ b/test-snapshots/query/eb2af22c53fd5c36/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_3280": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_0650": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eb5918ca72f36313/expected.json b/test-snapshots/query/eb5918ca72f36313/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eb5918ca72f36313/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eb5918ca72f36313/request.json b/test-snapshots/query/eb5918ca72f36313/request.json new file mode 100644 index 0000000..24aee65 --- /dev/null +++ b/test-snapshots/query/eb5918ca72f36313/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Evil Walks" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 270863 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eb6d9e0bc8032e1f/expected.json b/test-snapshots/query/eb6d9e0bc8032e1f/expected.json new file mode 100644 index 0000000..269b923 --- /dev/null +++ b/test-snapshots/query/eb6d9e0bc8032e1f/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_6743": "90’s Music", + "PlaylistId_2871": 5 + }, + { + "Name_6743": "Audiobooks", + "PlaylistId_2871": 4 + }, + { + "Name_6743": "Audiobooks", + "PlaylistId_2871": 6 + }, + { + "Name_6743": "Brazilian Music", + "PlaylistId_2871": 11 + }, + { + "Name_6743": "Classical", + "PlaylistId_2871": 12 + }, + { + "Name_6743": "Classical 101 - Deep Cuts", + "PlaylistId_2871": 13 + }, + { + "Name_6743": "Classical 101 - Next Steps", + "PlaylistId_2871": 14 + }, + { + "Name_6743": "Classical 101 - The Basics", + "PlaylistId_2871": 15 + }, + { + "Name_6743": "Grunge", + "PlaylistId_2871": 16 + }, + { + "Name_6743": "Heavy Metal Classic", + "PlaylistId_2871": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eb6d9e0bc8032e1f/request.json b/test-snapshots/query/eb6d9e0bc8032e1f/request.json new file mode 100644 index 0000000..18a67b5 --- /dev/null +++ b/test-snapshots/query/eb6d9e0bc8032e1f/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_6743": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_2871": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eb95f3c6616af342/expected.json b/test-snapshots/query/eb95f3c6616af342/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eb95f3c6616af342/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eb95f3c6616af342/request.json b/test-snapshots/query/eb95f3c6616af342/request.json new file mode 100644 index 0000000..e687588 --- /dev/null +++ b/test-snapshots/query/eb95f3c6616af342/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ebac3e51fb19e865/expected.json b/test-snapshots/query/ebac3e51fb19e865/expected.json new file mode 100644 index 0000000..7287ca2 --- /dev/null +++ b/test-snapshots/query/ebac3e51fb19e865/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_5599": 108, + "Quantity_6305": 1, + "TrackId_3425": 1 + }, + { + "InvoiceId_5599": 214, + "Quantity_6305": 1, + "TrackId_3425": 2 + }, + { + "InvoiceId_5599": 1, + "Quantity_6305": 1, + "TrackId_3425": 2 + }, + { + "InvoiceId_5599": 319, + "Quantity_6305": 1, + "TrackId_3425": 3 + }, + { + "InvoiceId_5599": 1, + "Quantity_6305": 1, + "TrackId_3425": 4 + }, + { + "InvoiceId_5599": 108, + "Quantity_6305": 1, + "TrackId_3425": 5 + }, + { + "InvoiceId_5599": 2, + "Quantity_6305": 1, + "TrackId_3425": 6 + }, + { + "InvoiceId_5599": 214, + "Quantity_6305": 1, + "TrackId_3425": 8 + }, + { + "InvoiceId_5599": 2, + "Quantity_6305": 1, + "TrackId_3425": 8 + }, + { + "InvoiceId_5599": 319, + "Quantity_6305": 1, + "TrackId_3425": 9 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ebac3e51fb19e865/request.json b/test-snapshots/query/ebac3e51fb19e865/request.json new file mode 100644 index 0000000..1ab57cc --- /dev/null +++ b/test-snapshots/query/ebac3e51fb19e865/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_5599": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "TrackId_3425": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Quantity_6305": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ebc9d2ac3870d695/expected.json b/test-snapshots/query/ebc9d2ac3870d695/expected.json new file mode 100644 index 0000000..2760078 --- /dev/null +++ b/test-snapshots/query/ebc9d2ac3870d695/expected.json @@ -0,0 +1,322 @@ +[ + { + "rows": [ + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 4 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Audiobooks", + "PlaylistId": 6 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 2 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [] + }, + "Name": "Movies", + "PlaylistId": 7 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_2416": 1, + "TrackId_4038": 1000 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1001 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1002 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1003 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1004 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1005 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1006 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1007 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1008 + }, + { + "PlaylistId_2416": 1, + "TrackId_4038": 1009 + } + ] + }, + "Name": "Music", + "PlaylistId": 1 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_2416": 10, + "TrackId_4038": 2819 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2820 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2821 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2822 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2823 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2824 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2825 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2826 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2827 + }, + { + "PlaylistId_2416": 10, + "TrackId_4038": 2828 + } + ] + }, + "Name": "TV Shows", + "PlaylistId": 10 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_2416": 11, + "TrackId_4038": 1088 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1093 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1099 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1105 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1514 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1518 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1519 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1916 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1921 + }, + { + "PlaylistId_2416": 11, + "TrackId_4038": 1928 + } + ] + }, + "Name": "Brazilian Music", + "PlaylistId": 11 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_2416": 12, + "TrackId_4038": 3403 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3404 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3405 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3406 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3407 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3408 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3409 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3410 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3411 + }, + { + "PlaylistId_2416": 12, + "TrackId_4038": 3412 + } + ] + }, + "Name": "Classical", + "PlaylistId": 12 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_2416": 13, + "TrackId_4038": 3479 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3480 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3481 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3482 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3483 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3484 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3485 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3486 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3487 + }, + { + "PlaylistId_2416": 13, + "TrackId_4038": 3488 + } + ] + }, + "Name": "Classical 101 - Deep Cuts", + "PlaylistId": 13 + }, + { + "FK_PlaylistTrackPlaylistId": { + "rows": [ + { + "PlaylistId_2416": 14, + "TrackId_4038": 3430 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3431 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3432 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3433 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3434 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3435 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3436 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3437 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3438 + }, + { + "PlaylistId_2416": 14, + "TrackId_4038": 3439 + } + ] + }, + "Name": "Classical 101 - Next Steps", + "PlaylistId": 14 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ebc9d2ac3870d695/request.json b/test-snapshots/query/ebc9d2ac3870d695/request.json new file mode 100644 index 0000000..fa8b585 --- /dev/null +++ b/test-snapshots/query/ebc9d2ac3870d695/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "FK_PlaylistTrackPlaylistId": { + "type": "relationship", + "query": { + "fields": { + "PlaylistId_2416": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId_4038": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ec16c0441c5433a9/expected.json b/test-snapshots/query/ec16c0441c5433a9/expected.json new file mode 100644 index 0000000..f3bfa28 --- /dev/null +++ b/test-snapshots/query/ec16c0441c5433a9/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-01-08", + "InvoiceId": 85, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-02-18", + "InvoiceId": 96, + "Total": 21.86 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-10-19", + "InvoiceId": 151, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec16c0441c5433a9/request.json b/test-snapshots/query/ec16c0441c5433a9/request.json new file mode 100644 index 0000000..ac77369 --- /dev/null +++ b/test-snapshots/query/ec16c0441c5433a9/request.json @@ -0,0 +1,131 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "QC" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+44 020 7976 5722" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ec173abe2e839ebe/expected.json b/test-snapshots/query/ec173abe2e839ebe/expected.json new file mode 100644 index 0000000..9e65a08 --- /dev/null +++ b/test-snapshots/query/ec173abe2e839ebe/expected.json @@ -0,0 +1,10 @@ +[ + { + "aggregates": { + "PlaylistId_count": 8715, + "PlaylistId_distinct_count": 14, + "TrackId_count": 8715, + "TrackId_distinct_count": 3503 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec173abe2e839ebe/request.json b/test-snapshots/query/ec173abe2e839ebe/request.json new file mode 100644 index 0000000..ea1401b --- /dev/null +++ b/test-snapshots/query/ec173abe2e839ebe/request.json @@ -0,0 +1,30 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "aggregates": { + "PlaylistId_count": { + "type": "column_count", + "column": "PlaylistId", + "distinct": false + }, + "PlaylistId_distinct_count": { + "type": "column_count", + "column": "PlaylistId", + "distinct": true + }, + "TrackId_count": { + "type": "column_count", + "column": "TrackId", + "distinct": false + }, + "TrackId_distinct_count": { + "type": "column_count", + "column": "TrackId", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ec187858c415bb59/expected.json b/test-snapshots/query/ec187858c415bb59/expected.json new file mode 100644 index 0000000..33704bb --- /dev/null +++ b/test-snapshots/query/ec187858c415bb59/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_3902": 200, + "Bytes_7044": 38747, + "Composer_6576": "Samuel Rosa", + "GenreId_3336": 1, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 1071, + "Name_6312": "É Uma Partida De Futebol", + "TrackId_8807": 2461, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 18, + "Bytes_7044": 161266, + "Composer_6576": null, + "GenreId_3336": 4, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 4884, + "Name_6312": "Now Sports", + "TrackId_8807": 168, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 18, + "Bytes_7044": 211997, + "Composer_6576": null, + "GenreId_3336": 4, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 6373, + "Name_6312": "A Statistic", + "TrackId_8807": 170, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 18, + "Bytes_7044": 224313, + "Composer_6576": null, + "GenreId_3336": 4, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 6635, + "Name_6312": "Oprah", + "TrackId_8807": 178, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 258, + "Bytes_7044": 319888, + "Composer_6576": "L. Muggerud", + "GenreId_3336": 17, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 7941, + "Name_6312": "Commercial 1", + "TrackId_8807": 3304, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 18, + "Bytes_7044": 387360, + "Composer_6576": null, + "GenreId_3336": 4, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 11650, + "Name_6312": "The Real Problem", + "TrackId_8807": 172, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 258, + "Bytes_7044": 850698, + "Composer_6576": "L. Muggerud", + "GenreId_3336": 17, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 21211, + "Name_6312": "Commercial 2", + "TrackId_8807": 3310, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 184, + "Bytes_7044": 967098, + "Composer_6576": null, + "GenreId_3336": 17, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 29048, + "Name_6312": "Bossa", + "TrackId_8807": 2241, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 85, + "Bytes_7044": 1039615, + "Composer_6576": "Gilberto Gil", + "GenreId_3336": 10, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 32287, + "Name_6312": "Casinha Feliz", + "TrackId_8807": 1086, + "UnitPrice_7315": 0.99 + }, + { + "AlbumId_3902": 78, + "Bytes_7044": 1095012, + "Composer_6576": null, + "GenreId_3336": 7, + "MediaTypeId_2642": 1, + "Milliseconds_7807": 33619, + "Name_6312": "Deixa Entrar", + "TrackId_8807": 975, + "UnitPrice_7315": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec187858c415bb59/request.json b/test-snapshots/query/ec187858c415bb59/request.json new file mode 100644 index 0000000..ed6296e --- /dev/null +++ b/test-snapshots/query/ec187858c415bb59/request.json @@ -0,0 +1,75 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_3902": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7044": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_6576": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_3336": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_2642": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_7807": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_6312": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_8807": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_7315": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ec1f62ee0cdd650c/expected.json b/test-snapshots/query/ec1f62ee0cdd650c/expected.json new file mode 100644 index 0000000..e9401f5 --- /dev/null +++ b/test-snapshots/query/ec1f62ee0cdd650c/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "Address_7296": "1 Infinite Loop", + "City_3975": "Cupertino", + "Country_6523": "USA", + "CustomerId_4428": 19, + "Fax_5636": "+1 (408) 996-1011", + "FirstName_1428": "Tim", + "LastName_4957": "Goyer", + "Phone_1479": "+1 (408) 996-1010", + "State_0683": "CA" + }, + { + "Address_7296": "1 Microsoft Way", + "City_3975": "Redmond", + "Country_6523": "USA", + "CustomerId_4428": 17, + "Fax_5636": "+1 (425) 882-8081", + "FirstName_1428": "Jack", + "LastName_4957": "Smith", + "Phone_1479": "+1 (425) 882-8080", + "State_0683": "WA" + }, + { + "Address_7296": "1033 N Park Ave", + "City_3975": "Tucson", + "Country_6523": "USA", + "CustomerId_4428": 27, + "Fax_5636": null, + "FirstName_1428": "Patrick", + "LastName_4957": "Gray", + "Phone_1479": "+1 (520) 622-4200", + "State_0683": "AZ" + }, + { + "Address_7296": "11, Place Bellecour", + "City_3975": "Lyon", + "Country_6523": "France", + "CustomerId_4428": 41, + "Fax_5636": null, + "FirstName_1428": "Marc", + "LastName_4957": "Dubois", + "Phone_1479": "+33 04 78 30 30 30", + "State_0683": null + }, + { + "Address_7296": "110 Raeburn Pl", + "City_3975": "Edinburgh ", + "Country_6523": "United Kingdom", + "CustomerId_4428": 54, + "Fax_5636": null, + "FirstName_1428": "Steve", + "LastName_4957": "Murray", + "Phone_1479": "+44 0131 315 3300", + "State_0683": null + }, + { + "Address_7296": "113 Lupus St", + "City_3975": "London", + "Country_6523": "United Kingdom", + "CustomerId_4428": 53, + "Fax_5636": null, + "FirstName_1428": "Phil", + "LastName_4957": "Hughes", + "Phone_1479": "+44 020 7976 5722", + "State_0683": null + }, + { + "Address_7296": "12,Community Centre", + "City_3975": "Delhi", + "Country_6523": "India", + "CustomerId_4428": 58, + "Fax_5636": null, + "FirstName_1428": "Manoj", + "LastName_4957": "Pareek", + "Phone_1479": "+91 0124 39883988", + "State_0683": null + }, + { + "Address_7296": "120 S Orange Ave", + "City_3975": "Orlando", + "Country_6523": "USA", + "CustomerId_4428": 22, + "Fax_5636": null, + "FirstName_1428": "Heather", + "LastName_4957": "Leacock", + "Phone_1479": "+1 (407) 999-7788", + "State_0683": "FL" + }, + { + "Address_7296": "1498 rue Bélanger", + "City_3975": "Montréal", + "Country_6523": "Canada", + "CustomerId_4428": 3, + "Fax_5636": null, + "FirstName_1428": "François", + "LastName_4957": "Tremblay", + "Phone_1479": "+1 (514) 721-4711", + "State_0683": "QC" + }, + { + "Address_7296": "1600 Amphitheatre Parkway", + "City_3975": "Mountain View", + "Country_6523": "USA", + "CustomerId_4428": 16, + "Fax_5636": "+1 (650) 253-0000", + "FirstName_1428": "Frank", + "LastName_4957": "Harris", + "Phone_1479": "+1 (650) 253-0000", + "State_0683": "CA" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec1f62ee0cdd650c/request.json b/test-snapshots/query/ec1f62ee0cdd650c/request.json new file mode 100644 index 0000000..32d8010 --- /dev/null +++ b/test-snapshots/query/ec1f62ee0cdd650c/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_7296": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_3975": { + "type": "column", + "column": "City", + "fields": null + }, + "Phone_1479": { + "type": "column", + "column": "Phone", + "fields": null + }, + "Country_6523": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId_4428": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "State_0683": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_5636": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_1428": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName_4957": { + "type": "column", + "column": "LastName", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ec2afb864a8104dc/expected.json b/test-snapshots/query/ec2afb864a8104dc/expected.json new file mode 100644 index 0000000..9820ae4 --- /dev/null +++ b/test-snapshots/query/ec2afb864a8104dc/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "AlbumId_6405": 1, + "Bytes_7237": 11170334, + "Milliseconds_3045": 343719, + "Name_4035": "For Those About To Rock (We Salute You)", + "TrackId_7458": 1 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 8817038, + "Milliseconds_3045": 270863, + "Name_4035": "Spellbound", + "TrackId_7458": 14 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 8611245, + "Milliseconds_3045": 263497, + "Name_4035": "Evil Walks", + "TrackId_7458": 10 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 8596840, + "Milliseconds_3045": 263288, + "Name_4035": "Breaking The Rules", + "TrackId_7458": 12 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 7636561, + "Milliseconds_3045": 233926, + "Name_4035": "Let's Get It Up", + "TrackId_7458": 7 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 6852860, + "Milliseconds_3045": 210834, + "Name_4035": "Inject The Venom", + "TrackId_7458": 8 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 6713451, + "Milliseconds_3045": 205662, + "Name_4035": "Put The Finger On You", + "TrackId_7458": 6 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 6706347, + "Milliseconds_3045": 205688, + "Name_4035": "Night Of The Long Knives", + "TrackId_7458": 13 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 6599424, + "Milliseconds_3045": 203102, + "Name_4035": "Snowballed", + "TrackId_7458": 9 + }, + { + "AlbumId_6405": 1, + "Bytes_7237": 6566314, + "Milliseconds_3045": 199836, + "Name_4035": "C.O.D.", + "TrackId_7458": 11 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec2afb864a8104dc/request.json b/test-snapshots/query/ec2afb864a8104dc/request.json new file mode 100644 index 0000000..e258678 --- /dev/null +++ b/test-snapshots/query/ec2afb864a8104dc/request.json @@ -0,0 +1,63 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_6405": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7237": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "TrackId_7458": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Milliseconds_3045": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_4035": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ec41f02ad407ccc6/expected.json b/test-snapshots/query/ec41f02ad407ccc6/expected.json new file mode 100644 index 0000000..19cd2e5 --- /dev/null +++ b/test-snapshots/query/ec41f02ad407ccc6/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 103, + "InvoiceLineId": 554, + "Quantity": 1, + "TrackId": 3347, + "UnitPrice": 1.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 555, + "Quantity": 1, + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 556, + "Quantity": 1, + "TrackId": 3365, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 557, + "Quantity": 1, + "TrackId": 3374, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 558, + "Quantity": 1, + "TrackId": 3383, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 559, + "Quantity": 1, + "TrackId": 3392, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 560, + "Quantity": 1, + "TrackId": 3401, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 561, + "Quantity": 1, + "TrackId": 3410, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 562, + "Quantity": 1, + "TrackId": 3419, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 103, + "InvoiceLineId": 563, + "Quantity": 1, + "TrackId": 3428, + "UnitPrice": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec41f02ad407ccc6/request.json b/test-snapshots/query/ec41f02ad407ccc6/request.json new file mode 100644 index 0000000..841a92a --- /dev/null +++ b/test-snapshots/query/ec41f02ad407ccc6/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ec42d2e1ae8c881/expected.json b/test-snapshots/query/ec42d2e1ae8c881/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ec42d2e1ae8c881/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec42d2e1ae8c881/request.json b/test-snapshots/query/ec42d2e1ae8c881/request.json new file mode 100644 index 0000000..da4d978 --- /dev/null +++ b/test-snapshots/query/ec42d2e1ae8c881/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 46 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ec64854852682f31/expected.json b/test-snapshots/query/ec64854852682f31/expected.json new file mode 100644 index 0000000..04a1df9 --- /dev/null +++ b/test-snapshots/query/ec64854852682f31/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec64854852682f31/request.json b/test-snapshots/query/ec64854852682f31/request.json new file mode 100644 index 0000000..2a27ada --- /dev/null +++ b/test-snapshots/query/ec64854852682f31/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ec77c9781cf4df2a/expected.json b/test-snapshots/query/ec77c9781cf4df2a/expected.json new file mode 100644 index 0000000..f21e5c5 --- /dev/null +++ b/test-snapshots/query/ec77c9781cf4df2a/expected.json @@ -0,0 +1,186 @@ +[ + { + "rows": [ + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 199836, + "Name_0914": "C.O.D.", + "TrackId_9241": 11, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 203102, + "Name_0914": "Snowballed", + "TrackId_9241": 9, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 205662, + "Name_0914": "Put The Finger On You", + "TrackId_9241": 6, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 205688, + "Name_0914": "Night Of The Long Knives", + "TrackId_9241": 13, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 210834, + "Name_0914": "Inject The Venom", + "TrackId_9241": 8, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 233926, + "Name_0914": "Let's Get It Up", + "TrackId_9241": 7, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 263288, + "Name_0914": "Breaking The Rules", + "TrackId_9241": 12, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 263497, + "Name_0914": "Evil Walks", + "TrackId_9241": 10, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 270863, + "Name_0914": "Spellbound", + "TrackId_9241": 14, + "UnitPrice_2665": 0.99 + }, + { + "AlbumId_4860": 1, + "Composer_0968": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackGenreId": { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + }, + "GenreId_1266": 1, + "MediaTypeId_7222": 1, + "Milliseconds_2620": 343719, + "Name_0914": "For Those About To Rock (We Salute You)", + "TrackId_9241": 1, + "UnitPrice_2665": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ec77c9781cf4df2a/request.json b/test-snapshots/query/ec77c9781cf4df2a/request.json new file mode 100644 index 0000000..add78c8 --- /dev/null +++ b/test-snapshots/query/ec77c9781cf4df2a/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_4860": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "UnitPrice_2665": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Composer_0968": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_1266": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_7222": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_2620": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_0914": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_9241": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ecbebc28e6e66b38/expected.json b/test-snapshots/query/ecbebc28e6e66b38/expected.json new file mode 100644 index 0000000..ea8d780 --- /dev/null +++ b/test-snapshots/query/ecbebc28e6e66b38/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Bytes_9266": 10003747, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Linha Do Equador", + "TrackId_5667": 218, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10003794, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Believer", + "TrackId_5667": 2101, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10005675, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Fire In The Head", + "TrackId_5667": 2712, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10009697, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Killers", + "TrackId_5667": 2140, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10012231, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Camarão que Dorme e Onda Leva", + "TrackId_5667": 3159, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10014683, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Humans Being", + "TrackId_5667": 3078, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10019269, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Tempo Rei", + "TrackId_5667": 1115, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10019861, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Walking on the Moon", + "TrackId_5667": 2653, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10020122, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Sao Lucas 2001", + "TrackId_5667": 373, + "UnitPrice_2278": 0.99 + }, + { + "Bytes_9266": 10022428, + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + }, + "MediaTypeId_6286": 1, + "Name_7428": "Hold On", + "TrackId_5667": 810, + "UnitPrice_2278": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ecbebc28e6e66b38/request.json b/test-snapshots/query/ecbebc28e6e66b38/request.json new file mode 100644 index 0000000..3b5d7ee --- /dev/null +++ b/test-snapshots/query/ecbebc28e6e66b38/request.json @@ -0,0 +1,64 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "TrackId_5667": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "Bytes_9266": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "UnitPrice_2278": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Name_7428": { + "type": "column", + "column": "Name", + "fields": null + }, + "MediaTypeId_6286": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ece2924e782e185f/expected.json b/test-snapshots/query/ece2924e782e185f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ece2924e782e185f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ece2924e782e185f/request.json b/test-snapshots/query/ece2924e782e185f/request.json new file mode 100644 index 0000000..58d25c9 --- /dev/null +++ b/test-snapshots/query/ece2924e782e185f/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Next Steps" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ece8b8d1119c91d0/expected.json b/test-snapshots/query/ece8b8d1119c91d0/expected.json new file mode 100644 index 0000000..d403899 --- /dev/null +++ b/test-snapshots/query/ece8b8d1119c91d0/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "City_2284": "São Paulo", + "Company_4103": "Woodstock Discos", + "CustomerId_1176": 10, + "Fax_3542": "+55 (11) 3033-4564", + "LastName_2639": "Martins", + "Phone_0731": "+55 (11) 3033-5446" + }, + { + "City_2284": "Edmonton", + "Company_4103": "Telus", + "CustomerId_1176": 14, + "Fax_3542": "+1 (780) 434-5565", + "LastName_2639": "Philips", + "Phone_0731": "+1 (780) 434-4554" + }, + { + "City_2284": "Vancouver", + "Company_4103": "Rogers Canada", + "CustomerId_1176": 15, + "Fax_3542": "+1 (604) 688-8756", + "LastName_2639": "Peterson", + "Phone_0731": "+1 (604) 688-2255" + }, + { + "City_2284": "Rio de Janeiro", + "Company_4103": "Riotur", + "CustomerId_1176": 12, + "Fax_3542": "+55 (21) 2271-7070", + "LastName_2639": "Almeida", + "Phone_0731": "+55 (21) 2271-7000" + }, + { + "City_2284": "Redmond", + "Company_4103": "Microsoft Corporation", + "CustomerId_1176": 17, + "Fax_3542": "+1 (425) 882-8081", + "LastName_2639": "Smith", + "Phone_0731": "+1 (425) 882-8080" + }, + { + "City_2284": "Prague", + "Company_4103": "JetBrains s.r.o.", + "CustomerId_1176": 5, + "Fax_3542": "+420 2 4172 5555", + "LastName_2639": "Wichterlová", + "Phone_0731": "+420 2 4172 5555" + }, + { + "City_2284": "Mountain View", + "Company_4103": "Google Inc.", + "CustomerId_1176": 16, + "Fax_3542": "+1 (650) 253-0000", + "LastName_2639": "Harris", + "Phone_0731": "+1 (650) 253-0000" + }, + { + "City_2284": "São José dos Campos", + "Company_4103": "Embraer - Empresa Brasileira de Aeronáutica S.A.", + "CustomerId_1176": 1, + "Fax_3542": "+55 (12) 3923-5566", + "LastName_2639": "Gonçalves", + "Phone_0731": "+55 (12) 3923-5555" + }, + { + "City_2284": "São Paulo", + "Company_4103": "Banco do Brasil S.A.", + "CustomerId_1176": 11, + "Fax_3542": "+55 (11) 3055-8131", + "LastName_2639": "Rocha", + "Phone_0731": "+55 (11) 3055-3278" + }, + { + "City_2284": "Cupertino", + "Company_4103": "Apple Inc.", + "CustomerId_1176": 19, + "Fax_3542": "+1 (408) 996-1011", + "LastName_2639": "Goyer", + "Phone_0731": "+1 (408) 996-1010" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ece8b8d1119c91d0/request.json b/test-snapshots/query/ece8b8d1119c91d0/request.json new file mode 100644 index 0000000..a069c2d --- /dev/null +++ b/test-snapshots/query/ece8b8d1119c91d0/request.json @@ -0,0 +1,52 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Fax_3542": { + "type": "column", + "column": "Fax", + "fields": null + }, + "City_2284": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_4103": { + "type": "column", + "column": "Company", + "fields": null + }, + "LastName_2639": { + "type": "column", + "column": "LastName", + "fields": null + }, + "CustomerId_1176": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Phone_0731": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Company", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ed1f789b9b4480eb/expected.json b/test-snapshots/query/ed1f789b9b4480eb/expected.json new file mode 100644 index 0000000..5e510fe --- /dev/null +++ b/test-snapshots/query/ed1f789b9b4480eb/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_4540": "90’s Music", + "PlaylistId_4797": 5 + }, + { + "Name_4540": "Audiobooks", + "PlaylistId_4797": 4 + }, + { + "Name_4540": "Audiobooks", + "PlaylistId_4797": 6 + }, + { + "Name_4540": "Brazilian Music", + "PlaylistId_4797": 11 + }, + { + "Name_4540": "Classical", + "PlaylistId_4797": 12 + }, + { + "Name_4540": "Classical 101 - Deep Cuts", + "PlaylistId_4797": 13 + }, + { + "Name_4540": "Classical 101 - Next Steps", + "PlaylistId_4797": 14 + }, + { + "Name_4540": "Classical 101 - The Basics", + "PlaylistId_4797": 15 + }, + { + "Name_4540": "Grunge", + "PlaylistId_4797": 16 + }, + { + "Name_4540": "Heavy Metal Classic", + "PlaylistId_4797": 17 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed1f789b9b4480eb/request.json b/test-snapshots/query/ed1f789b9b4480eb/request.json new file mode 100644 index 0000000..dc8e991 --- /dev/null +++ b/test-snapshots/query/ed1f789b9b4480eb/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_4540": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_4797": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ed21afdcb2fa7665/expected.json b/test-snapshots/query/ed21afdcb2fa7665/expected.json new file mode 100644 index 0000000..4c983d8 --- /dev/null +++ b/test-snapshots/query/ed21afdcb2fa7665/expected.json @@ -0,0 +1,14 @@ +[ + { + "aggregates": { + "ArtistId_avg_4811": 138, + "ArtistId_count_7923": 275, + "ArtistId_max_7491": 275, + "ArtistId_median_9983": 138, + "ArtistId_min_3035": 1, + "ArtistId_sum_0372": 37950, + "Name_count_4148": 275, + "Name_min_2743": "A Cor Do Som" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed21afdcb2fa7665/request.json b/test-snapshots/query/ed21afdcb2fa7665/request.json new file mode 100644 index 0000000..f341d0f --- /dev/null +++ b/test-snapshots/query/ed21afdcb2fa7665/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "aggregates": { + "ArtistId_avg_4811": { + "type": "single_column", + "column": "ArtistId", + "function": "avg" + }, + "ArtistId_count_7923": { + "type": "single_column", + "column": "ArtistId", + "function": "count" + }, + "ArtistId_max_7491": { + "type": "single_column", + "column": "ArtistId", + "function": "max" + }, + "ArtistId_median_9983": { + "type": "single_column", + "column": "ArtistId", + "function": "median" + }, + "ArtistId_min_3035": { + "type": "single_column", + "column": "ArtistId", + "function": "min" + }, + "ArtistId_sum_0372": { + "type": "single_column", + "column": "ArtistId", + "function": "sum" + }, + "Name_min_2743": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "Name_count_4148": { + "type": "single_column", + "column": "Name", + "function": "count" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ed3ab6d6ec2654e5/expected.json b/test-snapshots/query/ed3ab6d6ec2654e5/expected.json new file mode 100644 index 0000000..3992717 --- /dev/null +++ b/test-snapshots/query/ed3ab6d6ec2654e5/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed3ab6d6ec2654e5/request.json b/test-snapshots/query/ed3ab6d6ec2654e5/request.json new file mode 100644 index 0000000..b27786d --- /dev/null +++ b/test-snapshots/query/ed3ab6d6ec2654e5/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Put The Finger On You" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ed48d0ee5f178fc1/expected.json b/test-snapshots/query/ed48d0ee5f178fc1/expected.json new file mode 100644 index 0000000..316fa75 --- /dev/null +++ b/test-snapshots/query/ed48d0ee5f178fc1/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2011-06-24", + "InvoiceId": 207, + "Total": 8.91 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-01-28", + "InvoiceId": 336, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-08-04", + "InvoiceId": 381, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed48d0ee5f178fc1/request.json b/test-snapshots/query/ed48d0ee5f178fc1/request.json new file mode 100644 index 0000000..0103f80 --- /dev/null +++ b/test-snapshots/query/ed48d0ee5f178fc1/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "United Kingdom" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ed4acb9ddf471ee3/expected.json b/test-snapshots/query/ed4acb9ddf471ee3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ed4acb9ddf471ee3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed4acb9ddf471ee3/request.json b/test-snapshots/query/ed4acb9ddf471ee3/request.json new file mode 100644 index 0000000..ab1a8b9 --- /dev/null +++ b/test-snapshots/query/ed4acb9ddf471ee3/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Science Fiction" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ed4b7f12618624ad/expected.json b/test-snapshots/query/ed4b7f12618624ad/expected.json new file mode 100644 index 0000000..4530807 --- /dev/null +++ b/test-snapshots/query/ed4b7f12618624ad/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1006 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed4b7f12618624ad/request.json b/test-snapshots/query/ed4b7f12618624ad/request.json new file mode 100644 index 0000000..a3eeef3 --- /dev/null +++ b/test-snapshots/query/ed4b7f12618624ad/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1006 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ed8f4fa7d231a1d9/expected.json b/test-snapshots/query/ed8f4fa7d231a1d9/expected.json new file mode 100644 index 0000000..fbcbcef --- /dev/null +++ b/test-snapshots/query/ed8f4fa7d231a1d9/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed8f4fa7d231a1d9/request.json b/test-snapshots/query/ed8f4fa7d231a1d9/request.json new file mode 100644 index 0000000..1129534 --- /dev/null +++ b/test-snapshots/query/ed8f4fa7d231a1d9/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Company", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Microsoft Corporation" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "jacksmith@microsoft.com" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ed9259053134cb95/expected.json b/test-snapshots/query/ed9259053134cb95/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ed9259053134cb95/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ed9259053134cb95/request.json b/test-snapshots/query/ed9259053134cb95/request.json new file mode 100644 index 0000000..5b380df --- /dev/null +++ b/test-snapshots/query/ed9259053134cb95/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5.94 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingState", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/edad269500aeec25/expected.json b/test-snapshots/query/edad269500aeec25/expected.json new file mode 100644 index 0000000..631f68e --- /dev/null +++ b/test-snapshots/query/edad269500aeec25/expected.json @@ -0,0 +1,1086 @@ +[ + { + "rows": [ + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 1, + "Bytes_4448": 11170334, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 343719, + "Name_5523": "For Those About To Rock (We Salute You)", + "TrackId_5527": 1 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 6566314, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 199836, + "Name_5523": "C.O.D.", + "TrackId_5527": 11 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 6599424, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 203102, + "Name_5523": "Snowballed", + "TrackId_5527": 9 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 6706347, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 205688, + "Name_5523": "Night Of The Long Knives", + "TrackId_5527": 13 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 6713451, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 205662, + "Name_5523": "Put The Finger On You", + "TrackId_5527": 6 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 6852860, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 210834, + "Name_5523": "Inject The Venom", + "TrackId_5527": 8 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 7636561, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 233926, + "Name_5523": "Let's Get It Up", + "TrackId_5527": 7 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 8596840, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 263288, + "Name_5523": "Breaking The Rules", + "TrackId_5527": 12 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 8611245, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 263497, + "Name_5523": "Evil Walks", + "TrackId_5527": 10 + }, + { + "AlbumId_1332": 1, + "Bytes_4448": 8817038, + "Composer_1723": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId_4701": 1, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 270863, + "Name_5523": "Spellbound", + "TrackId_5527": 14 + } + ] + }, + "GenreId": 1, + "Name": "Rock" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 100, + "Bytes_4448": 10276872, + "Composer_1723": "Steve Harris", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 428016, + "Name_5523": "05 - Phantom of the Opera", + "TrackId_5527": 1272 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 4712576, + "Composer_1723": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 196284, + "Name_5523": "02 - Sanctuary", + "TrackId_5527": 1269 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 4739122, + "Composer_1723": "Harris/Paul Di´Anno", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 197276, + "Name_5523": "04 - Running Free", + "TrackId_5527": 1271 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 5189891, + "Composer_1723": "Steve Harris", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 216058, + "Name_5523": "09 - Iron Maiden", + "TrackId_5527": 1276 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 5668992, + "Composer_1723": "Steve Harris", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 236173, + "Name_5523": "01 - Prowler", + "TrackId_5527": 1268 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 6066304, + "Composer_1723": "Murray Dave", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 252708, + "Name_5523": "08 - Charlotte the Harlot", + "TrackId_5527": 1275 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 6226048, + "Composer_1723": "Steve Harris", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 259343, + "Name_5523": "06 - Transylvania", + "TrackId_5527": 1273 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 7889024, + "Composer_1723": "Harris/Paul Di´Anno", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 328620, + "Name_5523": "03 - Remember Tomorrow", + "TrackId_5527": 1270 + }, + { + "AlbumId_1332": 100, + "Bytes_4448": 7981184, + "Composer_1723": "Steve Harris", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 332460, + "Name_5523": "07 - Strange World", + "TrackId_5527": 1274 + }, + { + "AlbumId_1332": 20, + "Bytes_4448": 14184984, + "Composer_1723": "Buddy Guy", + "GenreId_4701": 6, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 433397, + "Name_5523": "Stone Crazy", + "TrackId_5527": 196 + } + ] + }, + "GenreId": 6, + "Name": "Blues" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 101, + "Bytes_4448": 2543744, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 105926, + "Name_5523": "The Ides Of March", + "TrackId_5527": 1277 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 4188288, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 174471, + "Name_5523": "Wrathchild", + "TrackId_5527": 1278 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 4493440, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 187141, + "Name_5523": "Genghis Khan", + "TrackId_5527": 1281 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 4804736, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 200150, + "Name_5523": "Purgatory", + "TrackId_5527": 1285 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 4874368, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 203049, + "Name_5523": "Another Life", + "TrackId_5527": 1280 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 5584861, + "Composer_1723": "Di´Anno/Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 232515, + "Name_5523": "Innocent Exile", + "TrackId_5527": 1282 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 6205786, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 258377, + "Name_5523": "Murders In The Rue Morgue", + "TrackId_5527": 1279 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 6934660, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 288757, + "Name_5523": "Drifter", + "TrackId_5527": 1286 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 7227440, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 300956, + "Name_5523": "Killers", + "TrackId_5527": 1283 + }, + { + "AlbumId_1332": 101, + "Bytes_4448": 8937600, + "Composer_1723": "Steve Harris", + "GenreId_4701": 13, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 372349, + "Name_5523": "Prodigal Son", + "TrackId_5527": 1284 + } + ] + }, + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 102, + "Bytes_4448": 10836304, + "Composer_1723": "Harris", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 451422, + "Name_5523": "Hallowed Be Thy Name", + "TrackId_5527": 1296 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 10921567, + "Composer_1723": null, + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 454974, + "Name_5523": "Powerslave", + "TrackId_5527": 1294 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 18949518, + "Composer_1723": null, + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 789472, + "Name_5523": "Rime Of The Ancient Mariner", + "TrackId_5527": 1293 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 4912986, + "Composer_1723": "Harris/Di Anno", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 204617, + "Name_5523": "Running Free", + "TrackId_5527": 1299 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 5521744, + "Composer_1723": "Smith/Dickinson", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 229982, + "Name_5523": "Flight Of Icarus", + "TrackId_5527": 1292 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 5561241, + "Composer_1723": "Harris", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 231627, + "Name_5523": "Run To The Hills", + "TrackId_5527": 1298 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 6289117, + "Composer_1723": "Harris", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 261955, + "Name_5523": "Iron Maiden", + "TrackId_5527": 1297 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 6455255, + "Composer_1723": "Harris", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 268878, + "Name_5523": "The Trooper", + "TrackId_5527": 1290 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 6605094, + "Composer_1723": "Harris", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 275121, + "Name_5523": "The Number Of The Beast", + "TrackId_5527": 1295 + }, + { + "AlbumId_1332": 102, + "Bytes_4448": 8799380, + "Composer_1723": "Smith/Dickinson", + "GenreId_4701": 3, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 366550, + "Name_5523": "2 Minutes To Midnight", + "TrackId_5527": 1289 + } + ] + }, + "GenreId": 3, + "Name": "Metal" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 11, + "Bytes_4448": 10029406, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 309786, + "Name_5523": "The Curse", + "TrackId_5527": 110 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 7542942, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 233195, + "Name_5523": "Man Or Animal", + "TrackId_5527": 106 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 7609178, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 233691, + "Name_5523": "Drown Me Slowly", + "TrackId_5527": 103 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 7710800, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 237714, + "Name_5523": "The Worm", + "TrackId_5527": 105 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 8273592, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 255529, + "Name_5523": "Your Time Has Come", + "TrackId_5527": 99 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 8357387, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 255869, + "Name_5523": "Doesn't Remind Me", + "TrackId_5527": 102 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 8944205, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 273763, + "Name_5523": "Yesterday To Tomorrow", + "TrackId_5527": 107 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 9003592, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 278125, + "Name_5523": "Dandelion", + "TrackId_5527": 108 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 9006158, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 276688, + "Name_5523": "Heaven's Dead", + "TrackId_5527": 104 + }, + { + "AlbumId_1332": 11, + "Bytes_4448": 9106160, + "Composer_1723": "Cornell, Commerford, Morello, Wilk", + "GenreId_4701": 4, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 279484, + "Name_5523": "Be Yourself", + "TrackId_5527": 101 + } + ] + }, + "GenreId": 4, + "Name": "Alternative & Punk" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 115, + "Bytes_4448": 10498031, + "Composer_1723": "Bobby Byrd/James Brown/Ron Lenhoff", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 316551, + "Name_5523": "Get Up (I Feel Like Being A) Sex Machine", + "TrackId_5527": 1423 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 11183457, + "Composer_1723": "Full Force/James Brown", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 334236, + "Name_5523": "I'm Real", + "TrackId_5527": 1431 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 4174420, + "Composer_1723": "James Brown", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 127399, + "Name_5523": "Papa's Got A Brand New Bag Pt.1", + "TrackId_5527": 1418 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 4711323, + "Composer_1723": "Ted Wright", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 143725, + "Name_5523": "Out Of Sight", + "TrackId_5527": 1417 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 5394585, + "Composer_1723": "James Brown/Johnny Terry", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 165067, + "Name_5523": "Please Please Please", + "TrackId_5527": 1414 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 5468472, + "Composer_1723": "James Brown", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 167392, + "Name_5523": "I Got You (I Feel Good)", + "TrackId_5527": 1419 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 5478117, + "Composer_1723": "Alfred Ellis/James Brown", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 167392, + "Name_5523": "Say It Loud, I'm Black And I'm Proud Pt.1", + "TrackId_5527": 1422 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 5513208, + "Composer_1723": "Lowman Pauling", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 166739, + "Name_5523": "Think", + "TrackId_5527": 1415 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 5541611, + "Composer_1723": "Betty Newsome/James Brown", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 168228, + "Name_5523": "It's A Man's Man's Man's World", + "TrackId_5527": 1420 + }, + { + "AlbumId_1332": 115, + "Bytes_4448": 5643213, + "Composer_1723": "Alfred Ellis/James Brown", + "GenreId_4701": 14, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 172408, + "Name_5523": "Cold Sweat", + "TrackId_5527": 1421 + } + ] + }, + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 118, + "Bytes_4448": 10334529, + "Composer_1723": "Toby Smith", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 309995, + "Name_5523": "The Kids", + "TrackId_5527": 1460 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 10843832, + "Composer_1723": "Toby Smith/Wallis Buchanan", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 322455, + "Name_5523": "Journey To Arnhemland", + "TrackId_5527": 1463 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 11043559, + "Composer_1723": "Stuard Zender/Toby Smith", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 329534, + "Name_5523": "Mr. Moon", + "TrackId_5527": 1461 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 11796244, + "Composer_1723": "Toby Smith", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 354560, + "Name_5523": "Light Years", + "TrackId_5527": 1458 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 12676962, + "Composer_1723": "Toby Smith", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 382197, + "Name_5523": "Manifest Destiny", + "TrackId_5527": 1459 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 12777210, + "Composer_1723": "J. Kay/Jay Kay", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 384130, + "Name_5523": "Morning Glory", + "TrackId_5527": 1464 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 12906520, + "Composer_1723": "J. Kay/Jay Kay", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 385697, + "Name_5523": "Space Cowboy", + "TrackId_5527": 1465 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 14019705, + "Composer_1723": "Stuart Zender", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 422321, + "Name_5523": "Scam", + "TrackId_5527": 1462 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 17582818, + "Composer_1723": "Toby Smith", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 529684, + "Name_5523": "Just Another Story", + "TrackId_5527": 1455 + }, + { + "AlbumId_1332": 118, + "Bytes_4448": 8644290, + "Composer_1723": "Toby Smith", + "GenreId_4701": 15, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 257097, + "Name_5523": "Stillness In Time", + "TrackId_5527": 1456 + } + ] + }, + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 12, + "Bytes_4448": 1299960, + "Composer_1723": "Ned Fairchild", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 107807, + "Name_5523": "20 Flight Rock", + "TrackId_5527": 122 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 1704918, + "Composer_1723": "Little Richard", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 106266, + "Name_5523": "Good Golly Miss Molly", + "TrackId_5527": 121 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 1707084, + "Composer_1723": "Enotris Johnson/Little Richard/Robert \"Bumps\" Blackwell", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 106396, + "Name_5523": "Long Tall Sally", + "TrackId_5527": 112 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 1862126, + "Composer_1723": "Larry Williams", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 116088, + "Name_5523": "Bad Boy", + "TrackId_5527": 113 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 2206986, + "Composer_1723": "Brian Holland/Freddie Gorman/Georgia Dobbins/Robert Bateman/William Garrett", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 137639, + "Name_5523": "Please Mr. Postman", + "TrackId_5527": 115 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 2247846, + "Composer_1723": "Eddie Cochran/Jerry Capehart", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 140199, + "Name_5523": "C'Mon Everybody", + "TrackId_5527": 116 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 2276788, + "Composer_1723": "Chuck Berry", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 141923, + "Name_5523": "Rock 'N' Roll Music", + "TrackId_5527": 117 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 2301989, + "Composer_1723": "Bo Diddley", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 143595, + "Name_5523": "Roadrunner", + "TrackId_5527": 119 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 2306019, + "Composer_1723": "Chuck Berry", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 143830, + "Name_5523": "Carol", + "TrackId_5527": 120 + }, + { + "AlbumId_1332": 12, + "Bytes_4448": 2365897, + "Composer_1723": "Berry Gordy, Jr./Janie Bradford", + "GenreId_4701": 5, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 147591, + "Name_5523": "Money", + "TrackId_5527": 111 + } + ] + }, + "GenreId": 5, + "Name": "Rock And Roll" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 122, + "Bytes_4448": 10211473, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 310073, + "Name_5523": "Engenho De Dentro", + "TrackId_5527": 1506 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 10599953, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 317100, + "Name_5523": "W/Brasil (Chama O Síndico)", + "TrackId_5527": 1510 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 10724982, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 326321, + "Name_5523": "Selassiê", + "TrackId_5527": 1514 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 10996656, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 338076, + "Name_5523": "Que Maravilha", + "TrackId_5527": 1516 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 11314756, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 343484, + "Name_5523": "Salve Simpatia", + "TrackId_5527": 1509 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 12010478, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 355239, + "Name_5523": "Alcohol", + "TrackId_5527": 1507 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 12304520, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 367281, + "Name_5523": "Os Alquimistas Estão Chegando", + "TrackId_5527": 1512 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 12524725, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 380081, + "Name_5523": "Santa Clara Clareou", + "TrackId_5527": 1517 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 13022833, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 389276, + "Name_5523": "Charles Anjo 45", + "TrackId_5527": 1513 + }, + { + "AlbumId_1332": 122, + "Bytes_4448": 14946972, + "Composer_1723": null, + "GenreId_4701": 7, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 452519, + "Name_5523": "País Tropical", + "TrackId_5527": 1511 + } + ] + }, + "GenreId": 7, + "Name": "Latin" + }, + { + "FK_TrackGenreId": { + "rows": [ + { + "AlbumId_1332": 124, + "Bytes_4448": 3948371, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 118804, + "Name_5523": "Cuando Eu For Pro Ceu", + "TrackId_5527": 1541 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 6031174, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 180924, + "Name_5523": "Cafezinho", + "TrackId_5527": 1544 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 6056200, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 182308, + "Name_5523": "No Futuro", + "TrackId_5527": 1535 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 6400532, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 190484, + "Name_5523": "Choramingando", + "TrackId_5527": 1533 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 6774566, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 203415, + "Name_5523": "Do Nosso Amor", + "TrackId_5527": 1542 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 7104588, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 208457, + "Name_5523": "Borogodo", + "TrackId_5527": 1543 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 7248336, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 220891, + "Name_5523": "Enquanto O Dia Não Vem", + "TrackId_5527": 1545 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 7257390, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 213263, + "Name_5523": "Papelão", + "TrackId_5527": 1540 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 7764601, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 230582, + "Name_5523": "Por Merecer", + "TrackId_5527": 1534 + }, + { + "AlbumId_1332": 124, + "Bytes_4448": 8077282, + "Composer_1723": "João Suplicy", + "GenreId_4701": 16, + "MediaTypeId_2415": 1, + "Milliseconds_3374": 241084, + "Name_5523": "Voce Inteira", + "TrackId_5527": 1536 + } + ] + }, + "GenreId": 16, + "Name": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/edad269500aeec25/request.json b/test-snapshots/query/edad269500aeec25/request.json new file mode 100644 index 0000000..d85664c --- /dev/null +++ b/test-snapshots/query/edad269500aeec25/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackGenreId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_1332": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_4448": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_1723": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_4701": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_2415": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_3374": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_5523": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_5527": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/edcce8d2767136a8/expected.json b/test-snapshots/query/edcce8d2767136a8/expected.json new file mode 100644 index 0000000..27e6010 --- /dev/null +++ b/test-snapshots/query/edcce8d2767136a8/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4948095, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206053, + "Name": "Exploder", + "TrackId": 93, + "UnitPrice": 0.99 + }, + { + "AlbumId": 10, + "Bytes": 4961887, + "Composer": "Audioslave/Chris Cornell", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 206628, + "Name": "Hypnotize", + "TrackId": 94, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/edcce8d2767136a8/request.json b/test-snapshots/query/edcce8d2767136a8/request.json new file mode 100644 index 0000000..f3afc73 --- /dev/null +++ b/test-snapshots/query/edcce8d2767136a8/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/edd78d64afea1af8/expected.json b/test-snapshots/query/edd78d64afea1af8/expected.json new file mode 100644 index 0000000..316fa75 --- /dev/null +++ b/test-snapshots/query/edd78d64afea1af8/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2011-06-24", + "InvoiceId": 207, + "Total": 8.91 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-01-28", + "InvoiceId": 336, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-08-04", + "InvoiceId": 381, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/edd78d64afea1af8/request.json b/test-snapshots/query/edd78d64afea1af8/request.json new file mode 100644 index 0000000..b1a2ff6 --- /dev/null +++ b/test-snapshots/query/edd78d64afea1af8/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "United Kingdom" + } + } + ] + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/edf4e12407b22585/expected.json b/test-snapshots/query/edf4e12407b22585/expected.json new file mode 100644 index 0000000..45b8c48 --- /dev/null +++ b/test-snapshots/query/edf4e12407b22585/expected.json @@ -0,0 +1,187 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + }, + { + "MediaTypeId_2937": 1 + } + ] + }, + "MediaTypeId": 1, + "Name": "MPEG audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + }, + { + "MediaTypeId_2937": 2 + } + ] + }, + "MediaTypeId": 2, + "Name": "Protected AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + }, + { + "MediaTypeId_2937": 3 + } + ] + }, + "MediaTypeId": 3, + "Name": "Protected MPEG-4 video file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_2937": 4 + }, + { + "MediaTypeId_2937": 4 + }, + { + "MediaTypeId_2937": 4 + }, + { + "MediaTypeId_2937": 4 + }, + { + "MediaTypeId_2937": 4 + }, + { + "MediaTypeId_2937": 4 + }, + { + "MediaTypeId_2937": 4 + } + ] + }, + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + }, + { + "MediaTypeId_2937": 5 + } + ] + }, + "MediaTypeId": 5, + "Name": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/edf4e12407b22585/request.json b/test-snapshots/query/edf4e12407b22585/request.json new file mode 100644 index 0000000..f8214a8 --- /dev/null +++ b/test-snapshots/query/edf4e12407b22585/request.json @@ -0,0 +1,44 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "MediaTypeId_2937": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/edf918cca7dbd133/expected.json b/test-snapshots/query/edf918cca7dbd133/expected.json new file mode 100644 index 0000000..bf1e951 --- /dev/null +++ b/test-snapshots/query/edf918cca7dbd133/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_2771": 25, + "Name_3230": "Opera" + }, + { + "GenreId_2771": 24, + "Name_3230": "Classical" + }, + { + "GenreId_2771": 23, + "Name_3230": "Alternative" + }, + { + "GenreId_2771": 22, + "Name_3230": "Comedy" + }, + { + "GenreId_2771": 21, + "Name_3230": "Drama" + }, + { + "GenreId_2771": 20, + "Name_3230": "Sci Fi & Fantasy" + }, + { + "GenreId_2771": 19, + "Name_3230": "TV Shows" + }, + { + "GenreId_2771": 18, + "Name_3230": "Science Fiction" + }, + { + "GenreId_2771": 17, + "Name_3230": "Hip Hop/Rap" + }, + { + "GenreId_2771": 16, + "Name_3230": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/edf918cca7dbd133/request.json b/test-snapshots/query/edf918cca7dbd133/request.json new file mode 100644 index 0000000..0ec9af8 --- /dev/null +++ b/test-snapshots/query/edf918cca7dbd133/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_2771": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_3230": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ee0bd3ffe562e855/expected.json b/test-snapshots/query/ee0bd3ffe562e855/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ee0bd3ffe562e855/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ee0bd3ffe562e855/request.json b/test-snapshots/query/ee0bd3ffe562e855/request.json new file mode 100644 index 0000000..05e266a --- /dev/null +++ b/test-snapshots/query/ee0bd3ffe562e855/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1033 N Park Ave" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (408) 996-1010" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ee63b127976e93c8/expected.json b/test-snapshots/query/ee63b127976e93c8/expected.json new file mode 100644 index 0000000..515e377 --- /dev/null +++ b/test-snapshots/query/ee63b127976e93c8/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ee63b127976e93c8/request.json b/test-snapshots/query/ee63b127976e93c8/request.json new file mode 100644 index 0000000..75610e2 --- /dev/null +++ b/test-snapshots/query/ee63b127976e93c8/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "François" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "SupportRepId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ee9404ee1481f1f/expected.json b/test-snapshots/query/ee9404ee1481f1f/expected.json new file mode 100644 index 0000000..72ec03d --- /dev/null +++ b/test-snapshots/query/ee9404ee1481f1f/expected.json @@ -0,0 +1,34 @@ +[ + { + "rows": [ + { + "InvoiceId": 100, + "InvoiceLineId": 535, + "Quantity": 1, + "TrackId": 3254, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 536, + "Quantity": 1, + "TrackId": 3256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 537, + "Quantity": 1, + "TrackId": 3258, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 100, + "InvoiceLineId": 538, + "Quantity": 1, + "TrackId": 3260, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ee9404ee1481f1f/request.json b/test-snapshots/query/ee9404ee1481f1f/request.json new file mode 100644 index 0000000..ceafdc9 --- /dev/null +++ b/test-snapshots/query/ee9404ee1481f1f/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eecb75510bb900c7/expected.json b/test-snapshots/query/eecb75510bb900c7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eecb75510bb900c7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eecb75510bb900c7/request.json b/test-snapshots/query/eecb75510bb900c7/request.json new file mode 100644 index 0000000..b77994b --- /dev/null +++ b/test-snapshots/query/eecb75510bb900c7/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "MPEG audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eecf440e045763fe/expected.json b/test-snapshots/query/eecf440e045763fe/expected.json new file mode 100644 index 0000000..485222c --- /dev/null +++ b/test-snapshots/query/eecf440e045763fe/expected.json @@ -0,0 +1,23 @@ +[ + { + "rows": [ + { + "Address": "825 8 Ave SW", + "BirthDate": "1958-12-08", + "City": "Calgary", + "Country": "Canada", + "Email": "nancy@chinookcorp.com", + "EmployeeId": 2, + "Fax": "+1 (403) 262-3322", + "FirstName": "Nancy", + "HireDate": "2002-05-01", + "LastName": "Edwards", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 2T3", + "ReportsTo": 1, + "State": "AB", + "Title": "Sales Manager" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eecf440e045763fe/request.json b/test-snapshots/query/eecf440e045763fe/request.json new file mode 100644 index 0000000..69bb0f7 --- /dev/null +++ b/test-snapshots/query/eecf440e045763fe/request.json @@ -0,0 +1,98 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/eed67318507cc28/expected.json b/test-snapshots/query/eed67318507cc28/expected.json new file mode 100644 index 0000000..9f632b1 --- /dev/null +++ b/test-snapshots/query/eed67318507cc28/expected.json @@ -0,0 +1,78 @@ +[ + { + "rows": [ + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (403) 246-9899", + "HireDate_5616": "2003-10-17", + "Phone_6073": "+1 (403) 246-9887", + "ReportsTo_0407": 1 + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (403) 262-3322", + "HireDate_5616": "2002-05-01", + "Phone_6073": "+1 (403) 262-3443", + "ReportsTo_0407": 1 + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (403) 262-6712", + "HireDate_5616": "2002-04-01", + "Phone_6073": "+1 (403) 262-3443", + "ReportsTo_0407": 2 + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (403) 263-4289", + "HireDate_5616": "2003-05-03", + "Phone_6073": "+1 (403) 263-4423", + "ReportsTo_0407": 2 + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (403) 456-8485", + "HireDate_5616": "2004-01-02", + "Phone_6073": "+1 (403) 456-9986", + "ReportsTo_0407": 6 + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (403) 467-8772", + "HireDate_5616": "2004-03-04", + "Phone_6073": "+1 (403) 467-3351", + "ReportsTo_0407": 6 + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "+1 (780) 428-3457", + "HireDate_5616": "2002-08-14", + "Phone_6073": "+1 (780) 428-9482", + "ReportsTo_0407": null + }, + { + "FK_EmployeeReportsTo1": { + "rows": [] + }, + "Fax_5397": "1 (780) 836-9543", + "HireDate_5616": "2003-10-17", + "Phone_6073": "1 (780) 836-9987", + "ReportsTo_0407": 2 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eed67318507cc28/request.json b/test-snapshots/query/eed67318507cc28/request.json new file mode 100644 index 0000000..286c4d1 --- /dev/null +++ b/test-snapshots/query/eed67318507cc28/request.json @@ -0,0 +1,124 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "HireDate_5616": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "Fax_5397": { + "type": "column", + "column": "Fax", + "fields": null + }, + "ReportsTo_0407": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "Phone_6073": { + "type": "column", + "column": "Phone", + "fields": null + }, + "FK_EmployeeReportsTo1": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ef8379481a90e2bf/expected.json b/test-snapshots/query/ef8379481a90e2bf/expected.json new file mode 100644 index 0000000..dcf152e --- /dev/null +++ b/test-snapshots/query/ef8379481a90e2bf/expected.json @@ -0,0 +1,196 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0362": 1, + "Title_2643": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ef8379481a90e2bf/request.json b/test-snapshots/query/ef8379481a90e2bf/request.json new file mode 100644 index 0000000..c3d5d01 --- /dev/null +++ b/test-snapshots/query/ef8379481a90e2bf/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_0362": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Title_2643": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/efb60e631653fac4/expected.json b/test-snapshots/query/efb60e631653fac4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/efb60e631653fac4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/efb60e631653fac4/request.json b/test-snapshots/query/efb60e631653fac4/request.json new file mode 100644 index 0000000..79454a5 --- /dev/null +++ b/test-snapshots/query/efb60e631653fac4/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Steve" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "hleacock@gmail.com" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (425) 882-8081" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/efee0a63ebfe8eb9/expected.json b/test-snapshots/query/efee0a63ebfe8eb9/expected.json new file mode 100644 index 0000000..9700735 --- /dev/null +++ b/test-snapshots/query/efee0a63ebfe8eb9/expected.json @@ -0,0 +1,177 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_PlaylistTrackTrackId": { + "rows": [ + {}, + {} + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/efee0a63ebfe8eb9/request.json b/test-snapshots/query/efee0a63ebfe8eb9/request.json new file mode 100644 index 0000000..dd0d0f0 --- /dev/null +++ b/test-snapshots/query/efee0a63ebfe8eb9/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_PlaylistTrackTrackId": { + "type": "relationship", + "query": { + "fields": {}, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/eff9f5c8ad1b2756/expected.json b/test-snapshots/query/eff9f5c8ad1b2756/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/eff9f5c8ad1b2756/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/eff9f5c8ad1b2756/request.json b/test-snapshots/query/eff9f5c8ad1b2756/request.json new file mode 100644 index 0000000..056bb44 --- /dev/null +++ b/test-snapshots/query/eff9f5c8ad1b2756/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 105 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/exists_unrelated/expected.json b/test-snapshots/query/exists_unrelated/expected.json new file mode 100644 index 0000000..e9cccaa --- /dev/null +++ b/test-snapshots/query/exists_unrelated/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/exists_unrelated/request.json b/test-snapshots/query/exists_unrelated/request.json new file mode 100644 index 0000000..1b69b3c --- /dev/null +++ b/test-snapshots/query/exists_unrelated/request.json @@ -0,0 +1,125 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "unrelated", + "collection": "chinook.InvoiceLine", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [ + { + "relationship": "__array_relationship", + "arguments": {} + } + ] + }, + "operator": "equal", + "value": { + "type": "column", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f01be270b200474a/expected.json b/test-snapshots/query/f01be270b200474a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f01be270b200474a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f01be270b200474a/request.json b/test-snapshots/query/f01be270b200474a/request.json new file mode 100644 index 0000000..7bb5037 --- /dev/null +++ b/test-snapshots/query/f01be270b200474a/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f033fbcca89ad754/expected.json b/test-snapshots/query/f033fbcca89ad754/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f033fbcca89ad754/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f033fbcca89ad754/request.json b/test-snapshots/query/f033fbcca89ad754/request.json new file mode 100644 index 0000000..12eded5 --- /dev/null +++ b/test-snapshots/query/f033fbcca89ad754/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Heavy Metal" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 18 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f043739691eac63a/expected.json b/test-snapshots/query/f043739691eac63a/expected.json new file mode 100644 index 0000000..b0b4e64 --- /dev/null +++ b/test-snapshots/query/f043739691eac63a/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_9061": 1, + "Name_9470": "AC/DC" + }, + { + "ArtistId_9061": 2, + "Name_9470": "Accept" + }, + { + "ArtistId_9061": 3, + "Name_9470": "Aerosmith" + }, + { + "ArtistId_9061": 4, + "Name_9470": "Alanis Morissette" + }, + { + "ArtistId_9061": 5, + "Name_9470": "Alice In Chains" + }, + { + "ArtistId_9061": 6, + "Name_9470": "Antônio Carlos Jobim" + }, + { + "ArtistId_9061": 7, + "Name_9470": "Apocalyptica" + }, + { + "ArtistId_9061": 8, + "Name_9470": "Audioslave" + }, + { + "ArtistId_9061": 9, + "Name_9470": "BackBeat" + }, + { + "ArtistId_9061": 10, + "Name_9470": "Billy Cobham" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f043739691eac63a/request.json b/test-snapshots/query/f043739691eac63a/request.json new file mode 100644 index 0000000..51a8c84 --- /dev/null +++ b/test-snapshots/query/f043739691eac63a/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_9061": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_9470": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f08bd33f4ee72638/expected.json b/test-snapshots/query/f08bd33f4ee72638/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f08bd33f4ee72638/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f08bd33f4ee72638/request.json b/test-snapshots/query/f08bd33f4ee72638/request.json new file mode 100644 index 0000000..50dc08d --- /dev/null +++ b/test-snapshots/query/f08bd33f4ee72638/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Phil" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f0934bfc5873b476/expected.json b/test-snapshots/query/f0934bfc5873b476/expected.json new file mode 100644 index 0000000..ed903a8 --- /dev/null +++ b/test-snapshots/query/f0934bfc5873b476/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Music", + "PlaylistId": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0934bfc5873b476/request.json b/test-snapshots/query/f0934bfc5873b476/request.json new file mode 100644 index 0000000..be3c62f --- /dev/null +++ b/test-snapshots/query/f0934bfc5873b476/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f0acfe0f6b884e0/expected.json b/test-snapshots/query/f0acfe0f6b884e0/expected.json new file mode 100644 index 0000000..88b5da4 --- /dev/null +++ b/test-snapshots/query/f0acfe0f6b884e0/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 547, + "Quantity": 1, + "TrackId": 3302, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 548, + "Quantity": 1, + "TrackId": 3308, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 549, + "Quantity": 1, + "TrackId": 3314, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 102, + "InvoiceLineId": 550, + "Quantity": 1, + "TrackId": 3320, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0acfe0f6b884e0/request.json b/test-snapshots/query/f0acfe0f6b884e0/request.json new file mode 100644 index 0000000..1328ef0 --- /dev/null +++ b/test-snapshots/query/f0acfe0f6b884e0/request.json @@ -0,0 +1,83 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f0bf765974693351/expected.json b/test-snapshots/query/f0bf765974693351/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f0bf765974693351/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0bf765974693351/request.json b/test-snapshots/query/f0bf765974693351/request.json new file mode 100644 index 0000000..901155e --- /dev/null +++ b/test-snapshots/query/f0bf765974693351/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audioslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 102 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f0bf9e63bcd40d23/expected.json b/test-snapshots/query/f0bf9e63bcd40d23/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/f0bf9e63bcd40d23/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0bf9e63bcd40d23/request.json b/test-snapshots/query/f0bf9e63bcd40d23/request.json new file mode 100644 index 0000000..00a27b2 --- /dev/null +++ b/test-snapshots/query/f0bf9e63bcd40d23/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f0c7d7cce5e4fc56/expected.json b/test-snapshots/query/f0c7d7cce5e4fc56/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f0c7d7cce5e4fc56/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0c7d7cce5e4fc56/request.json b/test-snapshots/query/f0c7d7cce5e4fc56/request.json new file mode 100644 index 0000000..8801918 --- /dev/null +++ b/test-snapshots/query/f0c7d7cce5e4fc56/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 16 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Brazilian Music" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f0d2e103fcc24227/expected.json b/test-snapshots/query/f0d2e103fcc24227/expected.json new file mode 100644 index 0000000..9489cd0 --- /dev/null +++ b/test-snapshots/query/f0d2e103fcc24227/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId_1222": 226, + "Bytes_1268": 490750393, + "Composer_8778": null, + "GenreId_0612": 18, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2622250, + "Name_3755": "Battlestar Galactica: The Story So Far", + "TrackId_5255": 2819, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 1054423946, + "Composer_8778": null, + "GenreId_0612": 19, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 5286953, + "Name_3755": "Occupation / Precipice", + "TrackId_5255": 2820, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 462818231, + "Composer_8778": null, + "GenreId_0612": 18, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2620245, + "Name_3755": "A Day In the Life", + "TrackId_5255": 2833, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 466820021, + "Composer_8778": null, + "GenreId_0612": 19, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2618000, + "Name_3755": "Exodus, Pt. 2", + "TrackId_5255": 2822, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 475079441, + "Composer_8778": null, + "GenreId_0612": 19, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2621708, + "Name_3755": "Exodus, Pt. 1", + "TrackId_5255": 2821, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 483484911, + "Composer_8778": null, + "GenreId_0612": 19, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2626626, + "Name_3755": "Collaborators", + "TrackId_5255": 2823, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 486233524, + "Composer_8778": null, + "GenreId_0612": 20, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2622622, + "Name_3755": "Crossroads, Pt. 1", + "TrackId_5255": 2837, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 489715554, + "Composer_8778": null, + "GenreId_0612": 18, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2563938, + "Name_3755": "A Measure of Salvation", + "TrackId_5255": 2825, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 490375760, + "Composer_8778": null, + "GenreId_0612": 18, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2623875, + "Name_3755": "The Passage", + "TrackId_5255": 2828, + "UnitPrice_1569": 1.99 + }, + { + "AlbumId_1222": 227, + "Bytes_1268": 492700163, + "Composer_8778": null, + "GenreId_0612": 18, + "MediaTypeId_3188": 3, + "Milliseconds_3533": 2624207, + "Name_3755": "Taking a Break from All Your Worries", + "TrackId_5255": 2831, + "UnitPrice_1569": 1.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0d2e103fcc24227/request.json b/test-snapshots/query/f0d2e103fcc24227/request.json new file mode 100644 index 0000000..3b2ae8e --- /dev/null +++ b/test-snapshots/query/f0d2e103fcc24227/request.json @@ -0,0 +1,67 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_1222": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_1268": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_8778": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_0612": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_3188": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_3533": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_3755": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_5255": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_1569": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f0e631497ae0cf50/expected.json b/test-snapshots/query/f0e631497ae0cf50/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f0e631497ae0cf50/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0e631497ae0cf50/request.json b/test-snapshots/query/f0e631497ae0cf50/request.json new file mode 100644 index 0000000..077e62a --- /dev/null +++ b/test-snapshots/query/f0e631497ae0cf50/request.json @@ -0,0 +1,132 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2009-04-14" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f0f03c52af005316/expected.json b/test-snapshots/query/f0f03c52af005316/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/f0f03c52af005316/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0f03c52af005316/request.json b/test-snapshots/query/f0f03c52af005316/request.json new file mode 100644 index 0000000..77a716b --- /dev/null +++ b/test-snapshots/query/f0f03c52af005316/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCountry", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "CustomerId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f0f307e83c39ca91/expected.json b/test-snapshots/query/f0f307e83c39ca91/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f0f307e83c39ca91/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0f307e83c39ca91/request.json b/test-snapshots/query/f0f307e83c39ca91/request.json new file mode 100644 index 0000000..0a7c4fc --- /dev/null +++ b/test-snapshots/query/f0f307e83c39ca91/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1 Infinite Loop" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-09-13" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5.94 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f0fc642607aa0c71/expected.json b/test-snapshots/query/f0fc642607aa0c71/expected.json new file mode 100644 index 0000000..032a6fa --- /dev/null +++ b/test-snapshots/query/f0fc642607aa0c71/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 46, + "Quantity": 1, + "TrackId": 252, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 47, + "Quantity": 1, + "TrackId": 256, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 48, + "Quantity": 1, + "TrackId": 260, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 49, + "Quantity": 1, + "TrackId": 264, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 10, + "InvoiceLineId": 50, + "Quantity": 1, + "TrackId": 268, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 111, + "InvoiceLineId": 606, + "Quantity": 1, + "TrackId": 207, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 125, + "InvoiceLineId": 682, + "Quantity": 1, + "TrackId": 671, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 126, + "InvoiceLineId": 683, + "Quantity": 1, + "TrackId": 672, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 126, + "InvoiceLineId": 684, + "Quantity": 1, + "TrackId": 673, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f0fc642607aa0c71/request.json b/test-snapshots/query/f0fc642607aa0c71/request.json new file mode 100644 index 0000000..36ca4f7 --- /dev/null +++ b/test-snapshots/query/f0fc642607aa0c71/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f11e9a070446b046/expected.json b/test-snapshots/query/f11e9a070446b046/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/f11e9a070446b046/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f11e9a070446b046/request.json b/test-snapshots/query/f11e9a070446b046/request.json new file mode 100644 index 0000000..acba047 --- /dev/null +++ b/test-snapshots/query/f11e9a070446b046/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f14293be3b736e10/expected.json b/test-snapshots/query/f14293be3b736e10/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f14293be3b736e10/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f14293be3b736e10/request.json b/test-snapshots/query/f14293be3b736e10/request.json new file mode 100644 index 0000000..6050569 --- /dev/null +++ b/test-snapshots/query/f14293be3b736e10/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 260 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f17281c68c9bfba7/expected.json b/test-snapshots/query/f17281c68c9bfba7/expected.json new file mode 100644 index 0000000..7d4df60 --- /dev/null +++ b/test-snapshots/query/f17281c68c9bfba7/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_6389": 25, + "Name_0496": "Opera" + }, + { + "GenreId_6389": 24, + "Name_0496": "Classical" + }, + { + "GenreId_6389": 23, + "Name_0496": "Alternative" + }, + { + "GenreId_6389": 22, + "Name_0496": "Comedy" + }, + { + "GenreId_6389": 21, + "Name_0496": "Drama" + }, + { + "GenreId_6389": 20, + "Name_0496": "Sci Fi & Fantasy" + }, + { + "GenreId_6389": 19, + "Name_0496": "TV Shows" + }, + { + "GenreId_6389": 18, + "Name_0496": "Science Fiction" + }, + { + "GenreId_6389": 17, + "Name_0496": "Hip Hop/Rap" + }, + { + "GenreId_6389": 16, + "Name_0496": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f17281c68c9bfba7/request.json b/test-snapshots/query/f17281c68c9bfba7/request.json new file mode 100644 index 0000000..c661562 --- /dev/null +++ b/test-snapshots/query/f17281c68c9bfba7/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_6389": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_0496": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f1a1240d7a569196/expected.json b/test-snapshots/query/f1a1240d7a569196/expected.json new file mode 100644 index 0000000..69eb316 --- /dev/null +++ b/test-snapshots/query/f1a1240d7a569196/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f1a1240d7a569196/request.json b/test-snapshots/query/f1a1240d7a569196/request.json new file mode 100644 index 0000000..3fc3813 --- /dev/null +++ b/test-snapshots/query/f1a1240d7a569196/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f1c149bb5a904dd/expected.json b/test-snapshots/query/f1c149bb5a904dd/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f1c149bb5a904dd/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f1c149bb5a904dd/request.json b/test-snapshots/query/f1c149bb5a904dd/request.json new file mode 100644 index 0000000..bfaef6f --- /dev/null +++ b/test-snapshots/query/f1c149bb5a904dd/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 47 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f23c39dc5e322aaa/expected.json b/test-snapshots/query/f23c39dc5e322aaa/expected.json new file mode 100644 index 0000000..7dcee57 --- /dev/null +++ b/test-snapshots/query/f23c39dc5e322aaa/expected.json @@ -0,0 +1,83 @@ +[ + { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f23c39dc5e322aaa/request.json b/test-snapshots/query/f23c39dc5e322aaa/request.json new file mode 100644 index 0000000..0dc811d --- /dev/null +++ b/test-snapshots/query/f23c39dc5e322aaa/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "1033 N Park Ave" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f24402e0bab750bf/expected.json b/test-snapshots/query/f24402e0bab750bf/expected.json new file mode 100644 index 0000000..1d3ebf9 --- /dev/null +++ b/test-snapshots/query/f24402e0bab750bf/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f24402e0bab750bf/request.json b/test-snapshots/query/f24402e0bab750bf/request.json new file mode 100644 index 0000000..e4ea4ef --- /dev/null +++ b/test-snapshots/query/f24402e0bab750bf/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Redmond" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f267049774400624/expected.json b/test-snapshots/query/f267049774400624/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f267049774400624/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f267049774400624/request.json b/test-snapshots/query/f267049774400624/request.json new file mode 100644 index 0000000..e33c69e --- /dev/null +++ b/test-snapshots/query/f267049774400624/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f29bc076f5db53a8/expected.json b/test-snapshots/query/f29bc076f5db53a8/expected.json new file mode 100644 index 0000000..0328989 --- /dev/null +++ b/test-snapshots/query/f29bc076f5db53a8/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "ArtistId_5659": 155, + "Name_4308": "Zeca Pagodinho" + }, + { + "ArtistId_5659": 168, + "Name_4308": "Youssou N'Dour" + }, + { + "ArtistId_5659": 212, + "Name_4308": "Yo-Yo Ma" + }, + { + "ArtistId_5659": 255, + "Name_4308": "Yehudi Menuhin" + }, + { + "ArtistId_5659": 181, + "Name_4308": "Xis" + }, + { + "ArtistId_5659": 211, + "Name_4308": "Wilhelm Kempff" + }, + { + "ArtistId_5659": 154, + "Name_4308": "Whitesnake" + }, + { + "ArtistId_5659": 75, + "Name_4308": "Vinicius, Toquinho & Quarteto Em Cy" + }, + { + "ArtistId_5659": 73, + "Name_4308": "Vinícius E Qurteto Em Cy" + }, + { + "ArtistId_5659": 74, + "Name_4308": "Vinícius E Odette Lara" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f29bc076f5db53a8/request.json b/test-snapshots/query/f29bc076f5db53a8/request.json new file mode 100644 index 0000000..a0b0a18 --- /dev/null +++ b/test-snapshots/query/f29bc076f5db53a8/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId_5659": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_4308": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f2a8b638c13181e7/expected.json b/test-snapshots/query/f2a8b638c13181e7/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f2a8b638c13181e7/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f2a8b638c13181e7/request.json b/test-snapshots/query/f2a8b638c13181e7/request.json new file mode 100644 index 0000000..8dbdfa8 --- /dev/null +++ b/test-snapshots/query/f2a8b638c13181e7/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6713451 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f2bd2519054df73a/expected.json b/test-snapshots/query/f2bd2519054df73a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f2bd2519054df73a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f2bd2519054df73a/request.json b/test-snapshots/query/f2bd2519054df73a/request.json new file mode 100644 index 0000000..7b6573a --- /dev/null +++ b/test-snapshots/query/f2bd2519054df73a/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marillion" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f2f6c1b1ed01a862/expected.json b/test-snapshots/query/f2f6c1b1ed01a862/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f2f6c1b1ed01a862/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f2f6c1b1ed01a862/request.json b/test-snapshots/query/f2f6c1b1ed01a862/request.json new file mode 100644 index 0000000..a5ff579 --- /dev/null +++ b/test-snapshots/query/f2f6c1b1ed01a862/request.json @@ -0,0 +1,147 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Smith" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "United Kingdom" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Country", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f31f40b5d71ad48b/expected.json b/test-snapshots/query/f31f40b5d71ad48b/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f31f40b5d71ad48b/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f31f40b5d71ad48b/request.json b/test-snapshots/query/f31f40b5d71ad48b/request.json new file mode 100644 index 0000000..8ea25a0 --- /dev/null +++ b/test-snapshots/query/f31f40b5d71ad48b/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Laura" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f3222267c2a8609f/expected.json b/test-snapshots/query/f3222267c2a8609f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f3222267c2a8609f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f3222267c2a8609f/request.json b/test-snapshots/query/f3222267c2a8609f/request.json new file mode 100644 index 0000000..4211efd --- /dev/null +++ b/test-snapshots/query/f3222267c2a8609f/request.json @@ -0,0 +1,161 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "+1 (403) 467-3351" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f33f8f8103659bff/expected.json b/test-snapshots/query/f33f8f8103659bff/expected.json new file mode 100644 index 0000000..efe010d --- /dev/null +++ b/test-snapshots/query/f33f8f8103659bff/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f33f8f8103659bff/request.json b/test-snapshots/query/f33f8f8103659bff/request.json new file mode 100644 index 0000000..de4e3f5 --- /dev/null +++ b/test-snapshots/query/f33f8f8103659bff/request.json @@ -0,0 +1,88 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 22 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f3563c1315d7aa8f/expected.json b/test-snapshots/query/f3563c1315d7aa8f/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/f3563c1315d7aa8f/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f3563c1315d7aa8f/request.json b/test-snapshots/query/f3563c1315d7aa8f/request.json new file mode 100644 index 0000000..58bada2 --- /dev/null +++ b/test-snapshots/query/f3563c1315d7aa8f/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 49 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f397f6339c58fb6/expected.json b/test-snapshots/query/f397f6339c58fb6/expected.json new file mode 100644 index 0000000..8302aa9 --- /dev/null +++ b/test-snapshots/query/f397f6339c58fb6/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 10, + "InvoiceLineId": 45, + "Quantity": 1, + "TrackId": 248, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f397f6339c58fb6/request.json b/test-snapshots/query/f397f6339c58fb6/request.json new file mode 100644 index 0000000..2232c2a --- /dev/null +++ b/test-snapshots/query/f397f6339c58fb6/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 248 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f3d64ad2768eaf59/expected.json b/test-snapshots/query/f3d64ad2768eaf59/expected.json new file mode 100644 index 0000000..907cdad --- /dev/null +++ b/test-snapshots/query/f3d64ad2768eaf59/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "Title": "For Those About To Rock We Salute You" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f3d64ad2768eaf59/request.json b/test-snapshots/query/f3d64ad2768eaf59/request.json new file mode 100644 index 0000000..c67fa3c --- /dev/null +++ b/test-snapshots/query/f3d64ad2768eaf59/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8817038 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f3e6d758e6ce9c96/expected.json b/test-snapshots/query/f3e6d758e6ce9c96/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f3e6d758e6ce9c96/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f3e6d758e6ce9c96/request.json b/test-snapshots/query/f3e6d758e6ce9c96/request.json new file mode 100644 index 0000000..8da59b9 --- /dev/null +++ b/test-snapshots/query/f3e6d758e6ce9c96/request.json @@ -0,0 +1,79 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6566314 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f4102ad6c9242cff/expected.json b/test-snapshots/query/f4102ad6c9242cff/expected.json new file mode 100644 index 0000000..551524c --- /dev/null +++ b/test-snapshots/query/f4102ad6c9242cff/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 80, + "Bytes": 9721373, + "Composer": "Dave Grohl, Taylor Hawkins, Nate Mendel, Chris Shiflett/FOO FIGHTERS", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 293276, + "Name": "Razor", + "TrackId": 1008, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f4102ad6c9242cff/request.json b/test-snapshots/query/f4102ad6c9242cff/request.json new file mode 100644 index 0000000..d5b8f24 --- /dev/null +++ b/test-snapshots/query/f4102ad6c9242cff/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1008 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.PlaylistTrack", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f4172cb7834631a7/expected.json b/test-snapshots/query/f4172cb7834631a7/expected.json new file mode 100644 index 0000000..036be88 --- /dev/null +++ b/test-snapshots/query/f4172cb7834631a7/expected.json @@ -0,0 +1,24 @@ +[ + { + "aggregates": { + "BillingAddress_count": 412, + "BillingAddress_distinct_count": 59, + "BillingCity_count": 412, + "BillingCity_distinct_count": 53, + "BillingCountry_count": 412, + "BillingCountry_distinct_count": 24, + "BillingPostalCode_count": 384, + "BillingPostalCode_distinct_count": 55, + "BillingState_count": 210, + "BillingState_distinct_count": 25, + "CustomerId_count": 412, + "CustomerId_distinct_count": 59, + "InvoiceDate_count": 412, + "InvoiceDate_distinct_count": 354, + "InvoiceId_count": 412, + "InvoiceId_distinct_count": 412, + "Total_count": 412, + "Total_distinct_count": 23 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/f4172cb7834631a7/request.json b/test-snapshots/query/f4172cb7834631a7/request.json new file mode 100644 index 0000000..36f021c --- /dev/null +++ b/test-snapshots/query/f4172cb7834631a7/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Invoice", + "query": { + "aggregates": { + "BillingAddress_count": { + "type": "column_count", + "column": "BillingAddress", + "distinct": false + }, + "BillingAddress_distinct_count": { + "type": "column_count", + "column": "BillingAddress", + "distinct": true + }, + "BillingCity_count": { + "type": "column_count", + "column": "BillingCity", + "distinct": false + }, + "BillingCity_distinct_count": { + "type": "column_count", + "column": "BillingCity", + "distinct": true + }, + "BillingCountry_count": { + "type": "column_count", + "column": "BillingCountry", + "distinct": false + }, + "BillingCountry_distinct_count": { + "type": "column_count", + "column": "BillingCountry", + "distinct": true + }, + "BillingPostalCode_count": { + "type": "column_count", + "column": "BillingPostalCode", + "distinct": false + }, + "BillingPostalCode_distinct_count": { + "type": "column_count", + "column": "BillingPostalCode", + "distinct": true + }, + "BillingState_count": { + "type": "column_count", + "column": "BillingState", + "distinct": false + }, + "BillingState_distinct_count": { + "type": "column_count", + "column": "BillingState", + "distinct": true + }, + "CustomerId_count": { + "type": "column_count", + "column": "CustomerId", + "distinct": false + }, + "CustomerId_distinct_count": { + "type": "column_count", + "column": "CustomerId", + "distinct": true + }, + "InvoiceDate_count": { + "type": "column_count", + "column": "InvoiceDate", + "distinct": false + }, + "InvoiceDate_distinct_count": { + "type": "column_count", + "column": "InvoiceDate", + "distinct": true + }, + "InvoiceId_count": { + "type": "column_count", + "column": "InvoiceId", + "distinct": false + }, + "InvoiceId_distinct_count": { + "type": "column_count", + "column": "InvoiceId", + "distinct": true + }, + "Total_count": { + "type": "column_count", + "column": "Total", + "distinct": false + }, + "Total_distinct_count": { + "type": "column_count", + "column": "Total", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f433293a41a064f3/expected.json b/test-snapshots/query/f433293a41a064f3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f433293a41a064f3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f433293a41a064f3/request.json b/test-snapshots/query/f433293a41a064f3/request.json new file mode 100644 index 0000000..dc0de2a --- /dev/null +++ b/test-snapshots/query/f433293a41a064f3/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 4 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Protected MPEG-4 video file" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f451c62bb4a8a8dc/expected.json b/test-snapshots/query/f451c62bb4a8a8dc/expected.json new file mode 100644 index 0000000..1b7f940 --- /dev/null +++ b/test-snapshots/query/f451c62bb4a8a8dc/expected.json @@ -0,0 +1,563 @@ +[ + { + "rows": [ + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_4020": 1, + "Name_4674": "MPEG audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 121, + "Bytes": 1851753, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 102630, + "Name": "Midnight", + "TrackId": 1504, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 1944738, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 108435, + "Name": "Hill of the Skull", + "TrackId": 1501, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3300654, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 193560, + "Name": "Satch Boogie", + "TrackId": 1500, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3435777, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 202035, + "Name": "Always With Me, Always With You", + "TrackId": 1499, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 3548553, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 209071, + "Name": "Circles", + "TrackId": 1502, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4036215, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 239721, + "Name": "Ice 9", + "TrackId": 1497, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4418504, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 263707, + "Name": "Surfing with the Alien", + "TrackId": 1496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 4809279, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 288227, + "Name": "Lords of Karma", + "TrackId": 1503, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5232158, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 314768, + "Name": "Crushing Day", + "TrackId": 1498, + "UnitPrice": 0.99 + }, + { + "AlbumId": 121, + "Bytes": 5595557, + "Composer": "J. Satriani", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 337570, + "Name": "Echo", + "TrackId": 1505, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_4020": 2, + "Name_4674": "Protected AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 226, + "Bytes": 490750393, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2622250, + "Name": "Battlestar Galactica: The Story So Far", + "TrackId": 2819, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 1054423946, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 5286953, + "Name": "Occupation / Precipice", + "TrackId": 2820, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 462818231, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2620245, + "Name": "A Day In the Life", + "TrackId": 2833, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 466820021, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2618000, + "Name": "Exodus, Pt. 2", + "TrackId": 2822, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 475079441, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2621708, + "Name": "Exodus, Pt. 1", + "TrackId": 2821, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 483484911, + "Composer": null, + "GenreId": 19, + "MediaTypeId": 3, + "Milliseconds": 2626626, + "Name": "Collaborators", + "TrackId": 2823, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 486233524, + "Composer": null, + "GenreId": 20, + "MediaTypeId": 3, + "Milliseconds": 2622622, + "Name": "Crossroads, Pt. 1", + "TrackId": 2837, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 489715554, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2563938, + "Name": "A Measure of Salvation", + "TrackId": 2825, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 490375760, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2623875, + "Name": "The Passage", + "TrackId": 2828, + "UnitPrice": 1.99 + }, + { + "AlbumId": 227, + "Bytes": 492700163, + "Composer": null, + "GenreId": 18, + "MediaTypeId": 3, + "Milliseconds": 2624207, + "Name": "Taking a Break from All Your Worries", + "TrackId": 2831, + "UnitPrice": 1.99 + } + ] + }, + "MediaTypeId_4020": 3, + "Name_4674": "Protected MPEG-4 video file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 260, + "Bytes": 8052374, + "Composer": null, + "GenreId": 23, + "MediaTypeId": 4, + "Milliseconds": 234013, + "Name": "War Pigs", + "TrackId": 3336, + "UnitPrice": 0.99 + }, + { + "AlbumId": 283, + "Bytes": 10085867, + "Composer": "Franz Joseph Haydn", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 306687, + "Name": "Symphony No. 104 in D Major \"London\": IV. Finale: Spiritoso", + "TrackId": 3414, + "UnitPrice": 0.99 + }, + { + "AlbumId": 318, + "Bytes": 3819535, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 101293, + "Name": "SCRIABIN: Prelude in B Major, Op. 11, No. 11", + "TrackId": 3452, + "UnitPrice": 0.99 + }, + { + "AlbumId": 324, + "Bytes": 10887931, + "Composer": "Ludwig van Beethoven", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 339567, + "Name": "Prometheus Overture, Op. 43", + "TrackId": 3479, + "UnitPrice": 0.99 + }, + { + "AlbumId": 325, + "Bytes": 9785346, + "Composer": "Béla Bartók", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 299350, + "Name": "Sonata for Solo Violin: IV: Presto", + "TrackId": 3480, + "UnitPrice": 0.99 + }, + { + "AlbumId": 340, + "Bytes": 2229617, + "Composer": null, + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 51780, + "Name": "Étude 1, In C Major - Preludio (Presto) - Liszt", + "TrackId": 3496, + "UnitPrice": 0.99 + }, + { + "AlbumId": 342, + "Bytes": 16454937, + "Composer": "Pietro Antonio Locatelli", + "GenreId": 24, + "MediaTypeId": 4, + "Milliseconds": 493573, + "Name": "Concerto for Violin, Strings and Continuo in G Major, Op. 3, No. 9: I. Allegro", + "TrackId": 3498, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_4020": 4, + "Name_4674": "Purchased AAC audio file" + }, + { + "FK_TrackMediaTypeId": { + "rows": [ + { + "AlbumId": 262, + "Bytes": 4011615, + "Composer": "Luca Gusella", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 246503, + "Name": "Amanda", + "TrackId": 3349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 262, + "Bytes": 4821485, + "Composer": "Andrea Dulbecco", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 307385, + "Name": "Despertar", + "TrackId": 3350, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4615841, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 285837, + "Name": "Din Din Wo (Little Child)", + "TrackId": 3351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 263, + "Bytes": 4855457, + "Composer": "Habib Koité", + "GenreId": 16, + "MediaTypeId": 5, + "Milliseconds": 300605, + "Name": "I Ka Barra (Your Work)", + "TrackId": 3354, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 5327463, + "Composer": "Karsh Kale/Vishal Vaid", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 327122, + "Name": "Distance", + "TrackId": 3352, + "UnitPrice": 0.99 + }, + { + "AlbumId": 264, + "Bytes": 6034098, + "Composer": "Karsh Kale", + "GenreId": 15, + "MediaTypeId": 5, + "Milliseconds": 366085, + "Name": "One Step Beyond", + "TrackId": 3358, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3240609, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 199923, + "Name": "Love Comes", + "TrackId": 3355, + "UnitPrice": 0.99 + }, + { + "AlbumId": 265, + "Bytes": 3453849, + "Composer": "Darius \"Take One\" Minwalla/Jon Auer/Ken Stringfellow/Matt Harris", + "GenreId": 1, + "MediaTypeId": 5, + "Milliseconds": 212044, + "Name": "I Guess You're Right", + "TrackId": 3353, + "UnitPrice": 0.99 + }, + { + "AlbumId": 266, + "Bytes": 2775071, + "Composer": "Luciana Souza", + "GenreId": 7, + "MediaTypeId": 5, + "Milliseconds": 172710, + "Name": "Muita Bobeira", + "TrackId": 3356, + "UnitPrice": 0.99 + }, + { + "AlbumId": 267, + "Bytes": 4292028, + "Composer": "Aaron Goldberg", + "GenreId": 2, + "MediaTypeId": 5, + "Milliseconds": 266936, + "Name": "OAM's Blues", + "TrackId": 3357, + "UnitPrice": 0.99 + } + ] + }, + "MediaTypeId_4020": 5, + "Name_4674": "AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f451c62bb4a8a8dc/request.json b/test-snapshots/query/f451c62bb4a8a8dc/request.json new file mode 100644 index 0000000..ba2b038 --- /dev/null +++ b/test-snapshots/query/f451c62bb4a8a8dc/request.json @@ -0,0 +1,84 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_4020": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_4674": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_TrackMediaTypeId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f456aaf41d6651b4/expected.json b/test-snapshots/query/f456aaf41d6651b4/expected.json new file mode 100644 index 0000000..a3b2a89 --- /dev/null +++ b/test-snapshots/query/f456aaf41d6651b4/expected.json @@ -0,0 +1,885 @@ +[ + { + "rows": [ + { + "City_5522": "Amsterdam", + "CustomerId_0843": 48, + "Email_5236": "johavanderberg@yahoo.nl", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2009-05-10", + "InvoiceId": 32, + "Total": 8.91 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2010-12-15", + "InvoiceId": 161, + "Total": 1.98 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2011-03-19", + "InvoiceId": 184, + "Total": 3.96 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2011-06-21", + "InvoiceId": 206, + "Total": 8.94 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2012-02-09", + "InvoiceId": 258, + "Total": 0.99 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2013-08-02", + "InvoiceId": 379, + "Total": 1.98 + }, + { + "BillingAddress": "Lijnbaansgracht 120bg", + "BillingCity": "Amsterdam", + "BillingCountry": "Netherlands", + "BillingPostalCode": "1016", + "BillingState": "VV", + "CustomerId": 48, + "InvoiceDate": "2013-09-12", + "InvoiceId": 390, + "Total": 13.86 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "1016", + "State_6664": "VV" + }, + { + "City_5522": "Bangalore", + "CustomerId_0843": 59, + "Email_5236": "puja_srivastava@yahoo.in", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2009-04-05", + "InvoiceId": 23, + "Total": 3.96 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2009-07-08", + "InvoiceId": 45, + "Total": 5.94 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2010-02-26", + "InvoiceId": 97, + "Total": 1.99 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2011-08-20", + "InvoiceId": 218, + "Total": 1.98 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2011-09-30", + "InvoiceId": 229, + "Total": 13.86 + }, + { + "BillingAddress": "3,Raj Bhavan Road", + "BillingCity": "Bangalore", + "BillingCountry": "India", + "BillingPostalCode": "560001", + "BillingState": null, + "CustomerId": 59, + "InvoiceDate": "2012-05-30", + "InvoiceId": 284, + "Total": 8.91 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "560001", + "State_6664": null + }, + { + "City_5522": "Berlin", + "CustomerId_0843": 36, + "Email_5236": "hannah.schneider@yahoo.de", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2009-05-05", + "InvoiceId": 29, + "Total": 1.98 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2009-06-15", + "InvoiceId": 40, + "Total": 13.86 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2010-02-13", + "InvoiceId": 95, + "Total": 8.91 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2011-09-20", + "InvoiceId": 224, + "Total": 1.98 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2011-12-23", + "InvoiceId": 247, + "Total": 3.96 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2012-03-26", + "InvoiceId": 269, + "Total": 5.94 + }, + { + "BillingAddress": "Tauentzienstraße 8", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10789", + "BillingState": null, + "CustomerId": 36, + "InvoiceDate": "2012-11-14", + "InvoiceId": 321, + "Total": 0.99 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "10789", + "State_6664": null + }, + { + "City_5522": "Berlin", + "CustomerId_0843": 38, + "Email_5236": "nschroder@surfeu.de", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2009-02-01", + "InvoiceId": 7, + "Total": 1.98 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2009-05-06", + "InvoiceId": 30, + "Total": 3.96 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2009-08-08", + "InvoiceId": 52, + "Total": 5.94 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2010-03-29", + "InvoiceId": 104, + "Total": 0.99 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2011-09-20", + "InvoiceId": 225, + "Total": 1.98 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2011-10-31", + "InvoiceId": 236, + "Total": 13.86 + }, + { + "BillingAddress": "Barbarossastraße 19", + "BillingCity": "Berlin", + "BillingCountry": "Germany", + "BillingPostalCode": "10779", + "BillingState": null, + "CustomerId": 38, + "InvoiceDate": "2012-06-30", + "InvoiceId": 291, + "Total": 8.91 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "10779", + "State_6664": null + }, + { + "City_5522": "Bordeaux", + "CustomerId_0843": 42, + "Email_5236": "wyatt.girard@yahoo.fr", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-02-02", + "InvoiceId": 9, + "Total": 3.96 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-05-07", + "InvoiceId": 31, + "Total": 5.94 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2009-12-26", + "InvoiceId": 83, + "Total": 0.99 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2011-06-19", + "InvoiceId": 204, + "Total": 3.98 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2011-07-30", + "InvoiceId": 215, + "Total": 13.86 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2012-03-29", + "InvoiceId": 270, + "Total": 8.91 + }, + { + "BillingAddress": "9, Place Louis Barthou", + "BillingCity": "Bordeaux", + "BillingCountry": "France", + "BillingPostalCode": "33000", + "BillingState": null, + "CustomerId": 42, + "InvoiceDate": "2013-11-03", + "InvoiceId": 399, + "Total": 1.98 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "33000", + "State_6664": null + }, + { + "City_5522": "Boston", + "CustomerId_0843": 23, + "Email_5236": "johngordon22@yahoo.com", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2009-01-11", + "InvoiceId": 5, + "Total": 13.86 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2009-09-11", + "InvoiceId": 60, + "Total": 8.91 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2011-04-18", + "InvoiceId": 189, + "Total": 1.98 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2011-07-21", + "InvoiceId": 212, + "Total": 3.96 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2011-10-23", + "InvoiceId": 234, + "Total": 5.94 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2012-06-12", + "InvoiceId": 286, + "Total": 0.99 + }, + { + "BillingAddress": "69 Salem Street", + "BillingCity": "Boston", + "BillingCountry": "USA", + "BillingPostalCode": "2113", + "BillingState": "MA", + "CustomerId": 23, + "InvoiceDate": "2013-12-04", + "InvoiceId": 407, + "Total": 1.98 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "2113", + "State_6664": "MA" + }, + { + "City_5522": "Brasília", + "CustomerId_0843": 13, + "Email_5236": "fernadaramos4@uol.com.br", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2009-06-05", + "InvoiceId": 35, + "Total": 1.98 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2009-09-07", + "InvoiceId": 58, + "Total": 3.96 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2009-12-10", + "InvoiceId": 80, + "Total": 5.94 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2010-07-31", + "InvoiceId": 132, + "Total": 0.99 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2012-01-22", + "InvoiceId": 253, + "Total": 1.98 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2012-03-03", + "InvoiceId": 264, + "Total": 13.86 + }, + { + "BillingAddress": "Qe 7 Bloco G", + "BillingCity": "Brasília", + "BillingCountry": "Brazil", + "BillingPostalCode": "71020-677", + "BillingState": "DF", + "CustomerId": 13, + "InvoiceDate": "2012-11-01", + "InvoiceId": 319, + "Total": 8.91 + } + ] + }, + "Fax_1538": "+55 (61) 3363-7855", + "PostalCode_9263": "71020-677", + "State_6664": "DF" + }, + { + "City_5522": "Brussels", + "CustomerId_0843": 8, + "Email_5236": "daan_peeters@apple.be", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2009-01-03", + "InvoiceId": 3, + "Total": 5.94 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2009-08-24", + "InvoiceId": 55, + "Total": 0.99 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2011-02-15", + "InvoiceId": 176, + "Total": 1.98 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2011-03-28", + "InvoiceId": 187, + "Total": 13.86 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2011-11-26", + "InvoiceId": 242, + "Total": 8.91 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2013-07-02", + "InvoiceId": 371, + "Total": 1.98 + }, + { + "BillingAddress": "Grétrystraat 63", + "BillingCity": "Brussels", + "BillingCountry": "Belgium", + "BillingPostalCode": "1000", + "BillingState": null, + "CustomerId": 8, + "InvoiceDate": "2013-10-04", + "InvoiceId": 394, + "Total": 3.96 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "1000", + "State_6664": null + }, + { + "City_5522": "Budapest", + "CustomerId_0843": 45, + "Email_5236": "ladislav_kovacs@apple.hu", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-01-08", + "InvoiceId": 85, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-02-18", + "InvoiceId": 96, + "Total": 21.86 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2010-10-19", + "InvoiceId": 151, + "Total": 8.91 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2012-05-25", + "InvoiceId": 280, + "Total": 1.98 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2012-08-27", + "InvoiceId": 303, + "Total": 3.96 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2012-11-29", + "InvoiceId": 325, + "Total": 5.94 + }, + { + "BillingAddress": "Erzsébet krt. 58.", + "BillingCity": "Budapest", + "BillingCountry": "Hungary", + "BillingPostalCode": "H-1073", + "BillingState": null, + "CustomerId": 45, + "InvoiceDate": "2013-07-20", + "InvoiceId": 377, + "Total": 0.99 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "H-1073", + "State_6664": null + }, + { + "City_5522": "Buenos Aires", + "CustomerId_0843": 56, + "Email_5236": "diego.gutierrez@yahoo.ar", + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2010-06-12", + "InvoiceId": 119, + "Total": 1.98 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2010-09-14", + "InvoiceId": 142, + "Total": 3.96 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2010-12-17", + "InvoiceId": 164, + "Total": 5.94 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2011-08-07", + "InvoiceId": 216, + "Total": 0.99 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2013-01-28", + "InvoiceId": 337, + "Total": 1.98 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2013-03-10", + "InvoiceId": 348, + "Total": 13.86 + }, + { + "BillingAddress": "307 Macacha Güemes", + "BillingCity": "Buenos Aires", + "BillingCountry": "Argentina", + "BillingPostalCode": "1106", + "BillingState": null, + "CustomerId": 56, + "InvoiceDate": "2013-11-08", + "InvoiceId": 403, + "Total": 8.91 + } + ] + }, + "Fax_1538": null, + "PostalCode_9263": "1106", + "State_6664": null + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f456aaf41d6651b4/request.json b/test-snapshots/query/f456aaf41d6651b4/request.json new file mode 100644 index 0000000..6029a07 --- /dev/null +++ b/test-snapshots/query/f456aaf41d6651b4/request.json @@ -0,0 +1,104 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "PostalCode_9263": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "City_5522": { + "type": "column", + "column": "City", + "fields": null + }, + "State_6664": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_1538": { + "type": "column", + "column": "Fax", + "fields": null + }, + "CustomerId_0843": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email_5236": { + "type": "column", + "column": "Email", + "fields": null + }, + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f45c714661f9b9c8/expected.json b/test-snapshots/query/f45c714661f9b9c8/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/f45c714661f9b9c8/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f45c714661f9b9c8/request.json b/test-snapshots/query/f45c714661f9b9c8/request.json new file mode 100644 index 0000000..8e523fa --- /dev/null +++ b/test-snapshots/query/f45c714661f9b9c8/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f4601f7aaf80291b/expected.json b/test-snapshots/query/f4601f7aaf80291b/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/f4601f7aaf80291b/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f4601f7aaf80291b/request.json b/test-snapshots/query/f4601f7aaf80291b/request.json new file mode 100644 index 0000000..18ee9ef --- /dev/null +++ b/test-snapshots/query/f4601f7aaf80291b/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f4e25467081cd8bc/expected.json b/test-snapshots/query/f4e25467081cd8bc/expected.json new file mode 100644 index 0000000..854bc50 --- /dev/null +++ b/test-snapshots/query/f4e25467081cd8bc/expected.json @@ -0,0 +1,129 @@ +[ + { + "rows": [ + { + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 1, + "ArtistId_4988": 1 + }, + { + "AlbumId_1832": 4, + "ArtistId_4988": 1 + } + ] + }, + "Name": "AC/DC" + }, + { + "ArtistId": 10, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 13, + "ArtistId_4988": 10 + } + ] + }, + "Name": "Billy Cobham" + }, + { + "ArtistId": 100, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 141, + "ArtistId_4988": 100 + } + ] + }, + "Name": "Lenny Kravitz" + }, + { + "ArtistId": 101, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 142, + "ArtistId_4988": 101 + }, + { + "AlbumId_1832": 143, + "ArtistId_4988": 101 + } + ] + }, + "Name": "Lulu Santos" + }, + { + "ArtistId": 102, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 144, + "ArtistId_4988": 102 + } + ] + }, + "Name": "Marillion" + }, + { + "ArtistId": 103, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 145, + "ArtistId_4988": 103 + } + ] + }, + "Name": "Marisa Monte" + }, + { + "ArtistId": 104, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 146, + "ArtistId_4988": 104 + } + ] + }, + "Name": "Marvin Gaye" + }, + { + "ArtistId": 105, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 147, + "ArtistId_4988": 105 + } + ] + }, + "Name": "Men At Work" + }, + { + "ArtistId": 106, + "FK_AlbumArtistId": { + "rows": [ + { + "AlbumId_1832": 160, + "ArtistId_4988": 106 + } + ] + }, + "Name": "Motörhead" + }, + { + "ArtistId": 107, + "FK_AlbumArtistId": { + "rows": [] + }, + "Name": "Motörhead & Girlschool" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f4e25467081cd8bc/request.json b/test-snapshots/query/f4e25467081cd8bc/request.json new file mode 100644 index 0000000..a4e70cc --- /dev/null +++ b/test-snapshots/query/f4e25467081cd8bc/request.json @@ -0,0 +1,49 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_1832": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_4988": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f5473e08e68b969b/expected.json b/test-snapshots/query/f5473e08e68b969b/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/f5473e08e68b969b/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5473e08e68b969b/request.json b/test-snapshots/query/f5473e08e68b969b/request.json new file mode 100644 index 0000000..51417ce --- /dev/null +++ b/test-snapshots/query/f5473e08e68b969b/request.json @@ -0,0 +1,164 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f547d6973c9f55a1/expected.json b/test-snapshots/query/f547d6973c9f55a1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f547d6973c9f55a1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f547d6973c9f55a1/request.json b/test-snapshots/query/f547d6973c9f55a1/request.json new file mode 100644 index 0000000..ded4a3d --- /dev/null +++ b/test-snapshots/query/f547d6973c9f55a1/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 100 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 49 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f56b107bee8ce701/expected.json b/test-snapshots/query/f56b107bee8ce701/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f56b107bee8ce701/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f56b107bee8ce701/request.json b/test-snapshots/query/f56b107bee8ce701/request.json new file mode 100644 index 0000000..a601187 --- /dev/null +++ b/test-snapshots/query/f56b107bee8ce701/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lenny Kravitz" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f57620294f0e9dfd/expected.json b/test-snapshots/query/f57620294f0e9dfd/expected.json new file mode 100644 index 0000000..0d5ef55 --- /dev/null +++ b/test-snapshots/query/f57620294f0e9dfd/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 10, + "Name": "Soundtrack" + }, + { + "GenreId": 11, + "Name": "Bossa Nova" + }, + { + "GenreId": 12, + "Name": "Easy Listening" + }, + { + "GenreId": 13, + "Name": "Heavy Metal" + }, + { + "GenreId": 14, + "Name": "R&B/Soul" + }, + { + "GenreId": 15, + "Name": "Electronica/Dance" + }, + { + "GenreId": 16, + "Name": "World" + }, + { + "GenreId": 17, + "Name": "Hip Hop/Rap" + }, + { + "GenreId": 18, + "Name": "Science Fiction" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f57620294f0e9dfd/request.json b/test-snapshots/query/f57620294f0e9dfd/request.json new file mode 100644 index 0000000..b7424d6 --- /dev/null +++ b/test-snapshots/query/f57620294f0e9dfd/request.json @@ -0,0 +1,20 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f582da5cf1c96fc8/expected.json b/test-snapshots/query/f582da5cf1c96fc8/expected.json new file mode 100644 index 0000000..6fa6fe5 --- /dev/null +++ b/test-snapshots/query/f582da5cf1c96fc8/expected.json @@ -0,0 +1,836 @@ +[ + { + "rows": [ + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2010-04-29", + "InvoiceId": 111, + "Total": 0.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-10-21", + "InvoiceId": 232, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2011-12-01", + "InvoiceId": 243, + "Total": 13.86 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2012-07-31", + "InvoiceId": 298, + "Total": 10.91 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2009-06-10", + "InvoiceId": 39, + "Total": 8.91 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-01-15", + "InvoiceId": 168, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-07-22", + "InvoiceId": 213, + "Total": 5.94 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2012-03-11", + "InvoiceId": 265, + "Total": 0.99 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-09-02", + "InvoiceId": 386, + "Total": 1.98 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2013-10-13", + "InvoiceId": 397, + "Total": 13.86 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2011-06-24", + "InvoiceId": 207, + "Total": 8.91 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-01-28", + "InvoiceId": 336, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-08-04", + "InvoiceId": 381, + "Total": 5.94 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2010-06-12", + "InvoiceId": 120, + "Total": 1.98 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2010-07-23", + "InvoiceId": 131, + "Total": 13.86 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2011-03-23", + "InvoiceId": 186, + "Total": 8.91 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2012-10-27", + "InvoiceId": 315, + "Total": 1.98 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-01-29", + "InvoiceId": 338, + "Total": 3.96 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-05-03", + "InvoiceId": 360, + "Total": 5.94 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-12-22", + "InvoiceId": 412, + "Total": 1.99 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-02-08", + "InvoiceId": 91, + "Total": 1.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-08-15", + "InvoiceId": 136, + "Total": 5.94 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2011-04-05", + "InvoiceId": 188, + "Total": 0.99 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-09-26", + "InvoiceId": 309, + "Total": 3.98 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2012-11-06", + "InvoiceId": 320, + "Total": 13.86 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2013-07-07", + "InvoiceId": 375, + "Total": 8.91 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-03-11", + "InvoiceId": 99, + "Total": 3.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-04-21", + "InvoiceId": 110, + "Total": 13.86 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2010-12-20", + "InvoiceId": 165, + "Total": 8.91 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-07-26", + "InvoiceId": 294, + "Total": 1.98 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-01-30", + "InvoiceId": 339, + "Total": 5.94 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2013-09-20", + "InvoiceId": 391, + "Total": 0.99 + } + ] + } + }, + { + "FK_InvoiceCustomerId": { + "rows": [ + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2009-02-19", + "InvoiceId": 13, + "Total": 0.99 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-08-13", + "InvoiceId": 134, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2010-09-23", + "InvoiceId": 145, + "Total": 13.86 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2011-05-24", + "InvoiceId": 200, + "Total": 8.91 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2012-12-28", + "InvoiceId": 329, + "Total": 1.98 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-07-04", + "InvoiceId": 374, + "Total": 5.94 + } + ] + } + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f582da5cf1c96fc8/request.json b/test-snapshots/query/f582da5cf1c96fc8/request.json new file mode 100644 index 0000000..24b35dd --- /dev/null +++ b/test-snapshots/query/f582da5cf1c96fc8/request.json @@ -0,0 +1,74 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "FK_InvoiceCustomerId": { + "type": "relationship", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "object", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f58ef937f4744282/expected.json b/test-snapshots/query/f58ef937f4744282/expected.json new file mode 100644 index 0000000..5cb4355 --- /dev/null +++ b/test-snapshots/query/f58ef937f4744282/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "BillingCountry_9277": "Germany", + "BillingPostalCode_5446": "70174", + "InvoiceDate_0741": "2009-01-01" + }, + { + "BillingCountry_9277": "Norway", + "BillingPostalCode_5446": "0171", + "InvoiceDate_0741": "2009-01-02" + }, + { + "BillingCountry_9277": "Belgium", + "BillingPostalCode_5446": "1000", + "InvoiceDate_0741": "2009-01-03" + }, + { + "BillingCountry_9277": "Canada", + "BillingPostalCode_5446": "T6G 2C7", + "InvoiceDate_0741": "2009-01-06" + }, + { + "BillingCountry_9277": "USA", + "BillingPostalCode_5446": "2113", + "InvoiceDate_0741": "2009-01-11" + }, + { + "BillingCountry_9277": "Germany", + "BillingPostalCode_5446": "60316", + "InvoiceDate_0741": "2009-01-19" + }, + { + "BillingCountry_9277": "Germany", + "BillingPostalCode_5446": "10779", + "InvoiceDate_0741": "2009-02-01" + }, + { + "BillingCountry_9277": "France", + "BillingPostalCode_5446": "75002", + "InvoiceDate_0741": "2009-02-01" + }, + { + "BillingCountry_9277": "France", + "BillingPostalCode_5446": "33000", + "InvoiceDate_0741": "2009-02-02" + }, + { + "BillingCountry_9277": "Ireland", + "BillingPostalCode_5446": null, + "InvoiceDate_0741": "2009-02-03" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f58ef937f4744282/request.json b/test-snapshots/query/f58ef937f4744282/request.json new file mode 100644 index 0000000..eb038ce --- /dev/null +++ b/test-snapshots/query/f58ef937f4744282/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingPostalCode_5446": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "InvoiceDate_0741": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "BillingCountry_9277": { + "type": "column", + "column": "BillingCountry", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f5a24333ae732e90/expected.json b/test-snapshots/query/f5a24333ae732e90/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f5a24333ae732e90/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5a24333ae732e90/request.json b/test-snapshots/query/f5a24333ae732e90/request.json new file mode 100644 index 0000000..358e0f0 --- /dev/null +++ b/test-snapshots/query/f5a24333ae732e90/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8596840 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Let's Get It Up" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f5a448a2a2e4c1cf/expected.json b/test-snapshots/query/f5a448a2a2e4c1cf/expected.json new file mode 100644 index 0000000..3e316b7 --- /dev/null +++ b/test-snapshots/query/f5a448a2a2e4c1cf/expected.json @@ -0,0 +1,118 @@ +[ + { + "rows": [ + { + "Address_5994": "1111 6 Ave SW", + "BirthDate_0681": "1973-08-29", + "City_8361": "Calgary", + "Country_0188": "Canada", + "Email_1055": "jane@chinookcorp.com", + "EmployeeId_9868": 3, + "FirstName_3435": "Jane", + "HireDate_1245": "2002-04-01", + "LastName_6280": "Peacock", + "ReportsTo_1359": 2, + "State_7731": "AB", + "Title_5254": "Sales Support Agent" + }, + { + "Address_5994": "11120 Jasper Ave NW", + "BirthDate_0681": "1962-02-18", + "City_8361": "Edmonton", + "Country_0188": "Canada", + "Email_1055": "andrew@chinookcorp.com", + "EmployeeId_9868": 1, + "FirstName_3435": "Andrew", + "HireDate_1245": "2002-08-14", + "LastName_6280": "Adams", + "ReportsTo_1359": null, + "State_7731": "AB", + "Title_5254": "General Manager" + }, + { + "Address_5994": "5827 Bowness Road NW", + "BirthDate_0681": "1973-07-01", + "City_8361": "Calgary", + "Country_0188": "Canada", + "Email_1055": "michael@chinookcorp.com", + "EmployeeId_9868": 6, + "FirstName_3435": "Michael", + "HireDate_1245": "2003-10-17", + "LastName_6280": "Mitchell", + "ReportsTo_1359": 1, + "State_7731": "AB", + "Title_5254": "IT Manager" + }, + { + "Address_5994": "590 Columbia Boulevard West", + "BirthDate_0681": "1970-05-29", + "City_8361": "Lethbridge", + "Country_0188": "Canada", + "Email_1055": "robert@chinookcorp.com", + "EmployeeId_9868": 7, + "FirstName_3435": "Robert", + "HireDate_1245": "2004-01-02", + "LastName_6280": "King", + "ReportsTo_1359": 6, + "State_7731": "AB", + "Title_5254": "IT Staff" + }, + { + "Address_5994": "683 10 Street SW", + "BirthDate_0681": "1947-09-19", + "City_8361": "Calgary", + "Country_0188": "Canada", + "Email_1055": "margaret@chinookcorp.com", + "EmployeeId_9868": 4, + "FirstName_3435": "Margaret", + "HireDate_1245": "2003-05-03", + "LastName_6280": "Park", + "ReportsTo_1359": 2, + "State_7731": "AB", + "Title_5254": "Sales Support Agent" + }, + { + "Address_5994": "7727B 41 Ave", + "BirthDate_0681": "1965-03-03", + "City_8361": "Calgary", + "Country_0188": "Canada", + "Email_1055": "steve@chinookcorp.com", + "EmployeeId_9868": 5, + "FirstName_3435": "Steve", + "HireDate_1245": "2003-10-17", + "LastName_6280": "Johnson", + "ReportsTo_1359": 2, + "State_7731": "AB", + "Title_5254": "Sales Support Agent" + }, + { + "Address_5994": "825 8 Ave SW", + "BirthDate_0681": "1958-12-08", + "City_8361": "Calgary", + "Country_0188": "Canada", + "Email_1055": "nancy@chinookcorp.com", + "EmployeeId_9868": 2, + "FirstName_3435": "Nancy", + "HireDate_1245": "2002-05-01", + "LastName_6280": "Edwards", + "ReportsTo_1359": 1, + "State_7731": "AB", + "Title_5254": "Sales Manager" + }, + { + "Address_5994": "923 7 ST NW", + "BirthDate_0681": "1968-01-09", + "City_8361": "Lethbridge", + "Country_0188": "Canada", + "Email_1055": "laura@chinookcorp.com", + "EmployeeId_9868": 8, + "FirstName_3435": "Laura", + "HireDate_1245": "2004-03-04", + "LastName_6280": "Callahan", + "ReportsTo_1359": 6, + "State_7731": "AB", + "Title_5254": "IT Staff" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5a448a2a2e4c1cf/request.json b/test-snapshots/query/f5a448a2a2e4c1cf/request.json new file mode 100644 index 0000000..571a8dc --- /dev/null +++ b/test-snapshots/query/f5a448a2a2e4c1cf/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_5994": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_0681": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_8361": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_0188": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email_1055": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId_9868": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "ReportsTo_1359": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "FirstName_3435": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate_1245": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName_6280": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Title_5254": { + "type": "column", + "column": "Title", + "fields": null + }, + "State_7731": { + "type": "column", + "column": "State", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Country", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f5b36bf91564ac0a/expected.json b/test-snapshots/query/f5b36bf91564ac0a/expected.json new file mode 100644 index 0000000..2419323 --- /dev/null +++ b/test-snapshots/query/f5b36bf91564ac0a/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 101, + "Name": "Lulu Santos" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5b36bf91564ac0a/request.json b/test-snapshots/query/f5b36bf91564ac0a/request.json new file mode 100644 index 0000000..6512d13 --- /dev/null +++ b/test-snapshots/query/f5b36bf91564ac0a/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lulu Santos" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f5d50638e6d1950e/expected.json b/test-snapshots/query/f5d50638e6d1950e/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/f5d50638e6d1950e/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5d50638e6d1950e/request.json b/test-snapshots/query/f5d50638e6d1950e/request.json new file mode 100644 index 0000000..ab7499d --- /dev/null +++ b/test-snapshots/query/f5d50638e6d1950e/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f5e5d75ed6c97430/expected.json b/test-snapshots/query/f5e5d75ed6c97430/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f5e5d75ed6c97430/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5e5d75ed6c97430/request.json b/test-snapshots/query/f5e5d75ed6c97430/request.json new file mode 100644 index 0000000..93f6bdd --- /dev/null +++ b/test-snapshots/query/f5e5d75ed6c97430/request.json @@ -0,0 +1,119 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "T3B 0C5" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f5eba25e640c132f/expected.json b/test-snapshots/query/f5eba25e640c132f/expected.json new file mode 100644 index 0000000..da45be4 --- /dev/null +++ b/test-snapshots/query/f5eba25e640c132f/expected.json @@ -0,0 +1,24 @@ +[ + { + "aggregates": { + "AlbumId_count": 3503, + "AlbumId_distinct_count": 347, + "Bytes_count": 3503, + "Bytes_distinct_count": 3501, + "Composer_count": 2525, + "Composer_distinct_count": 851, + "GenreId_count": 3503, + "GenreId_distinct_count": 25, + "MediaTypeId_count": 3503, + "MediaTypeId_distinct_count": 5, + "Milliseconds_count": 3503, + "Milliseconds_distinct_count": 3080, + "Name_count": 3503, + "Name_distinct_count": 3247, + "TrackId_count": 3503, + "TrackId_distinct_count": 3503, + "UnitPrice_count": 3503, + "UnitPrice_distinct_count": 2 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5eba25e640c132f/request.json b/test-snapshots/query/f5eba25e640c132f/request.json new file mode 100644 index 0000000..5bf1f63 --- /dev/null +++ b/test-snapshots/query/f5eba25e640c132f/request.json @@ -0,0 +1,100 @@ +{ + "collection": "chinook.Track", + "query": { + "aggregates": { + "AlbumId_count": { + "type": "column_count", + "column": "AlbumId", + "distinct": false + }, + "AlbumId_distinct_count": { + "type": "column_count", + "column": "AlbumId", + "distinct": true + }, + "Bytes_count": { + "type": "column_count", + "column": "Bytes", + "distinct": false + }, + "Bytes_distinct_count": { + "type": "column_count", + "column": "Bytes", + "distinct": true + }, + "Composer_count": { + "type": "column_count", + "column": "Composer", + "distinct": false + }, + "Composer_distinct_count": { + "type": "column_count", + "column": "Composer", + "distinct": true + }, + "GenreId_count": { + "type": "column_count", + "column": "GenreId", + "distinct": false + }, + "GenreId_distinct_count": { + "type": "column_count", + "column": "GenreId", + "distinct": true + }, + "MediaTypeId_count": { + "type": "column_count", + "column": "MediaTypeId", + "distinct": false + }, + "MediaTypeId_distinct_count": { + "type": "column_count", + "column": "MediaTypeId", + "distinct": true + }, + "Milliseconds_count": { + "type": "column_count", + "column": "Milliseconds", + "distinct": false + }, + "Milliseconds_distinct_count": { + "type": "column_count", + "column": "Milliseconds", + "distinct": true + }, + "Name_count": { + "type": "column_count", + "column": "Name", + "distinct": false + }, + "Name_distinct_count": { + "type": "column_count", + "column": "Name", + "distinct": true + }, + "TrackId_count": { + "type": "column_count", + "column": "TrackId", + "distinct": false + }, + "TrackId_distinct_count": { + "type": "column_count", + "column": "TrackId", + "distinct": true + }, + "UnitPrice_count": { + "type": "column_count", + "column": "UnitPrice", + "distinct": false + }, + "UnitPrice_distinct_count": { + "type": "column_count", + "column": "UnitPrice", + "distinct": true + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f5ec03d88949d2dc/expected.json b/test-snapshots/query/f5ec03d88949d2dc/expected.json new file mode 100644 index 0000000..a767b4f --- /dev/null +++ b/test-snapshots/query/f5ec03d88949d2dc/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1033 N Park Ave", + "BillingCity": "Tucson", + "BillingCountry": "USA", + "BillingPostalCode": "85719", + "BillingState": "AZ", + "CustomerId": 27, + "InvoiceDate": "2011-04-19", + "InvoiceId": 191, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2013-05-02", + "InvoiceId": 359, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "12,Community Centre", + "BillingCity": "Delhi", + "BillingCountry": "India", + "BillingPostalCode": "110017", + "BillingState": null, + "CustomerId": 58, + "InvoiceDate": "2013-01-29", + "InvoiceId": 338, + "Total": 3.96 + }, + { + "BillingAddress": "120 S Orange Ave", + "BillingCity": "Orlando", + "BillingCountry": "USA", + "BillingPostalCode": "32801", + "BillingState": "FL", + "CustomerId": 22, + "InvoiceDate": "2010-05-13", + "InvoiceId": 114, + "Total": 3.96 + }, + { + "BillingAddress": "1498 rue Bélanger", + "BillingCity": "Montréal", + "BillingCountry": "Canada", + "BillingPostalCode": "H2G 1A7", + "BillingState": "QC", + "CustomerId": 3, + "InvoiceDate": "2012-10-28", + "InvoiceId": 317, + "Total": 3.96 + }, + { + "BillingAddress": "1600 Amphitheatre Parkway", + "BillingCity": "Mountain View", + "BillingCountry": "USA", + "BillingPostalCode": "94043-1351", + "BillingState": "CA", + "CustomerId": 16, + "InvoiceDate": "2013-04-01", + "InvoiceId": 352, + "Total": 3.96 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f5ec03d88949d2dc/request.json b/test-snapshots/query/f5ec03d88949d2dc/request.json new file mode 100644 index 0000000..a8de817 --- /dev/null +++ b/test-snapshots/query/f5ec03d88949d2dc/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 3.96 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f630cf5a6709f01a/expected.json b/test-snapshots/query/f630cf5a6709f01a/expected.json new file mode 100644 index 0000000..d6ac22f --- /dev/null +++ b/test-snapshots/query/f630cf5a6709f01a/expected.json @@ -0,0 +1,11 @@ +[ + { + "aggregates": { + "GenreId_min_6313": 1, + "GenreId_sum_0895": 325, + "Name_count_0470": 25, + "Name_max_7869": "World", + "Name_min_5438": "Alternative" + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/f630cf5a6709f01a/request.json b/test-snapshots/query/f630cf5a6709f01a/request.json new file mode 100644 index 0000000..f19edfe --- /dev/null +++ b/test-snapshots/query/f630cf5a6709f01a/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Genre", + "query": { + "aggregates": { + "Name_min_5438": { + "type": "single_column", + "column": "Name", + "function": "min" + }, + "Name_count_0470": { + "type": "single_column", + "column": "Name", + "function": "count" + }, + "GenreId_min_6313": { + "type": "single_column", + "column": "GenreId", + "function": "min" + }, + "Name_max_7869": { + "type": "single_column", + "column": "Name", + "function": "max" + }, + "GenreId_sum_0895": { + "type": "single_column", + "column": "GenreId", + "function": "sum" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f6491ac1f3af10f6/expected.json b/test-snapshots/query/f6491ac1f3af10f6/expected.json new file mode 100644 index 0000000..b71fcef --- /dev/null +++ b/test-snapshots/query/f6491ac1f3af10f6/expected.json @@ -0,0 +1,118 @@ +[ + { + "rows": [ + { + "BirthDate_3846": "1947-09-19", + "City_6784": "Calgary", + "Country_4290": "Canada", + "EmployeeId_4469": 4, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (403) 263-4289", + "FirstName_6462": "Margaret", + "Phone_5450": "+1 (403) 263-4423", + "State_2336": "AB", + "Title_9994": "Sales Support Agent" + }, + { + "BirthDate_3846": "1958-12-08", + "City_6784": "Calgary", + "Country_4290": "Canada", + "EmployeeId_4469": 2, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (403) 262-3322", + "FirstName_6462": "Nancy", + "Phone_5450": "+1 (403) 262-3443", + "State_2336": "AB", + "Title_9994": "Sales Manager" + }, + { + "BirthDate_3846": "1962-02-18", + "City_6784": "Edmonton", + "Country_4290": "Canada", + "EmployeeId_4469": 1, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (780) 428-3457", + "FirstName_6462": "Andrew", + "Phone_5450": "+1 (780) 428-9482", + "State_2336": "AB", + "Title_9994": "General Manager" + }, + { + "BirthDate_3846": "1965-03-03", + "City_6784": "Calgary", + "Country_4290": "Canada", + "EmployeeId_4469": 5, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "1 (780) 836-9543", + "FirstName_6462": "Steve", + "Phone_5450": "1 (780) 836-9987", + "State_2336": "AB", + "Title_9994": "Sales Support Agent" + }, + { + "BirthDate_3846": "1968-01-09", + "City_6784": "Lethbridge", + "Country_4290": "Canada", + "EmployeeId_4469": 8, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (403) 467-8772", + "FirstName_6462": "Laura", + "Phone_5450": "+1 (403) 467-3351", + "State_2336": "AB", + "Title_9994": "IT Staff" + }, + { + "BirthDate_3846": "1970-05-29", + "City_6784": "Lethbridge", + "Country_4290": "Canada", + "EmployeeId_4469": 7, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (403) 456-8485", + "FirstName_6462": "Robert", + "Phone_5450": "+1 (403) 456-9986", + "State_2336": "AB", + "Title_9994": "IT Staff" + }, + { + "BirthDate_3846": "1973-07-01", + "City_6784": "Calgary", + "Country_4290": "Canada", + "EmployeeId_4469": 6, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (403) 246-9899", + "FirstName_6462": "Michael", + "Phone_5450": "+1 (403) 246-9887", + "State_2336": "AB", + "Title_9994": "IT Manager" + }, + { + "BirthDate_3846": "1973-08-29", + "City_6784": "Calgary", + "Country_4290": "Canada", + "EmployeeId_4469": 3, + "FK_EmployeeReportsTo": { + "rows": [] + }, + "Fax_5535": "+1 (403) 262-6712", + "FirstName_6462": "Jane", + "Phone_5450": "+1 (403) 262-3443", + "State_2336": "AB", + "Title_9994": "Sales Support Agent" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f6491ac1f3af10f6/request.json b/test-snapshots/query/f6491ac1f3af10f6/request.json new file mode 100644 index 0000000..453fd12 --- /dev/null +++ b/test-snapshots/query/f6491ac1f3af10f6/request.json @@ -0,0 +1,149 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "State_2336": { + "type": "column", + "column": "State", + "fields": null + }, + "BirthDate_3846": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City_6784": { + "type": "column", + "column": "City", + "fields": null + }, + "Country_4290": { + "type": "column", + "column": "Country", + "fields": null + }, + "Title_9994": { + "type": "column", + "column": "Title", + "fields": null + }, + "EmployeeId_4469": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax_5535": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_6462": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Phone_5450": { + "type": "column", + "column": "Phone", + "fields": null + }, + "FK_EmployeeReportsTo": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f65b0f1fc9e70cbe/expected.json b/test-snapshots/query/f65b0f1fc9e70cbe/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f65b0f1fc9e70cbe/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f65b0f1fc9e70cbe/request.json b/test-snapshots/query/f65b0f1fc9e70cbe/request.json new file mode 100644 index 0000000..3b0dc1c --- /dev/null +++ b/test-snapshots/query/f65b0f1fc9e70cbe/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Grunge" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f65c9adba17b718/expected.json b/test-snapshots/query/f65c9adba17b718/expected.json new file mode 100644 index 0000000..890202e --- /dev/null +++ b/test-snapshots/query/f65c9adba17b718/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "AlbumId_7976": 347, + "ArtistId_8371": 275 + }, + { + "AlbumId_7976": 346, + "ArtistId_8371": 274 + }, + { + "AlbumId_7976": 345, + "ArtistId_8371": 273 + }, + { + "AlbumId_7976": 344, + "ArtistId_8371": 272 + }, + { + "AlbumId_7976": 343, + "ArtistId_8371": 226 + }, + { + "AlbumId_7976": 342, + "ArtistId_8371": 271 + }, + { + "AlbumId_7976": 341, + "ArtistId_8371": 270 + }, + { + "AlbumId_7976": 340, + "ArtistId_8371": 269 + }, + { + "AlbumId_7976": 339, + "ArtistId_8371": 268 + }, + { + "AlbumId_7976": 338, + "ArtistId_8371": 267 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f65c9adba17b718/request.json b/test-snapshots/query/f65c9adba17b718/request.json new file mode 100644 index 0000000..ea42579 --- /dev/null +++ b/test-snapshots/query/f65c9adba17b718/request.json @@ -0,0 +1,48 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_7976": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_8371": { + "type": "column", + "column": "ArtistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f66f09f85ff94bf/expected.json b/test-snapshots/query/f66f09f85ff94bf/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/f66f09f85ff94bf/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f66f09f85ff94bf/request.json b/test-snapshots/query/f66f09f85ff94bf/request.json new file mode 100644 index 0000000..b32b0f2 --- /dev/null +++ b/test-snapshots/query/f66f09f85ff94bf/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f66f61152e5d537/expected.json b/test-snapshots/query/f66f61152e5d537/expected.json new file mode 100644 index 0000000..e169a60 --- /dev/null +++ b/test-snapshots/query/f66f61152e5d537/expected.json @@ -0,0 +1,531 @@ +[ + { + "rows": [ + { + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_5829": "+1 (403) 246-9899", + "LastName_7457": "Mitchell", + "PostalCode_0346": "T3B 0C5", + "ReportsTo_3345": 1 + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_5829": "+1 (403) 262-3322", + "LastName_7457": "Edwards", + "PostalCode_0346": "T2P 2T3", + "ReportsTo_3345": 1 + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_5829": "+1 (403) 456-8485", + "LastName_7457": "King", + "PostalCode_0346": "T1K 5N8", + "ReportsTo_3345": 6 + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_5829": "+1 (403) 467-8772", + "LastName_7457": "Callahan", + "PostalCode_0346": "T1H 1Y8", + "ReportsTo_3345": 6 + }, + { + "FK_CustomerSupportRepId": { + "rows": [] + }, + "Fax_5829": "+1 (780) 428-3457", + "LastName_7457": "Adams", + "PostalCode_0346": "T5K 2N1", + "ReportsTo_3345": null + }, + { + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + }, + "Fax_5829": "+1 (403) 262-6712", + "LastName_7457": "Peacock", + "PostalCode_0346": "T2P 5M5", + "ReportsTo_3345": 2 + }, + { + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "194A Chain Lake Drive", + "City": "Halifax", + "Company": null, + "Country": "Canada", + "CustomerId": 31, + "Email": "marthasilk@gmail.com", + "Fax": null, + "FirstName": "Martha", + "LastName": "Silk", + "Phone": "+1 (902) 450-0450", + "PostalCode": "B3S 1C5", + "State": "NS", + "SupportRepId": 5 + }, + { + "Address": "302 S 700 E", + "City": "Salt Lake City", + "Company": null, + "Country": "USA", + "CustomerId": 28, + "Email": "jubarnett@gmail.com", + "Fax": null, + "FirstName": "Julia", + "LastName": "Barnett", + "Phone": "+1 (801) 531-7272", + "PostalCode": "84102", + "State": "UT", + "SupportRepId": 5 + }, + { + "Address": "319 N. Frances Street", + "City": "Madison", + "Company": null, + "Country": "USA", + "CustomerId": 25, + "Email": "vstevens@yahoo.com", + "Fax": null, + "FirstName": "Victor", + "LastName": "Stevens", + "Phone": "+1 (608) 257-0597", + "PostalCode": "53703", + "State": "WI", + "SupportRepId": 5 + }, + { + "Address": "801 W 4th Street", + "City": "Reno", + "Company": null, + "Country": "USA", + "CustomerId": 21, + "Email": "kachase@hotmail.com", + "Fax": null, + "FirstName": "Kathy", + "LastName": "Chase", + "Phone": "+1 (775) 223-7665", + "PostalCode": "89503", + "State": "NV", + "SupportRepId": 5 + }, + { + "Address": "8210 111 ST NW", + "City": "Edmonton", + "Company": "Telus", + "Country": "Canada", + "CustomerId": 14, + "Email": "mphilips12@shaw.ca", + "Fax": "+1 (780) 434-5565", + "FirstName": "Mark", + "LastName": "Philips", + "Phone": "+1 (780) 434-4554", + "PostalCode": "T6G 2C7", + "State": "AB", + "SupportRepId": 5 + }, + { + "Address": "Av. Paulista, 2022", + "City": "São Paulo", + "Company": "Banco do Brasil S.A.", + "Country": "Brazil", + "CustomerId": 11, + "Email": "alero@uol.com.br", + "Fax": "+55 (11) 3055-8131", + "FirstName": "Alexandre", + "LastName": "Rocha", + "Phone": "+55 (11) 3055-3278", + "PostalCode": "01310-200", + "State": "SP", + "SupportRepId": 5 + }, + { + "Address": "C/ San Bernardo 85", + "City": "Madrid", + "Company": null, + "Country": "Spain", + "CustomerId": 50, + "Email": "enrique_munoz@yahoo.es", + "Fax": null, + "FirstName": "Enrique", + "LastName": "Muñoz", + "Phone": "+34 914 454 454", + "PostalCode": "28015", + "State": null, + "SupportRepId": 5 + } + ] + }, + "Fax_5829": "1 (780) 836-9543", + "LastName_7457": "Johnson", + "PostalCode_0346": "T3B 1Y7", + "ReportsTo_3345": 2 + }, + { + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "2211 W Berry Street", + "City": "Fort Worth", + "Company": null, + "Country": "USA", + "CustomerId": 26, + "Email": "ricunningham@hotmail.com", + "Fax": null, + "FirstName": "Richard", + "LastName": "Cunningham", + "Phone": "+1 (817) 924-7272", + "PostalCode": "76110", + "State": "TX", + "SupportRepId": 4 + }, + { + "Address": "307 Macacha Güemes", + "City": "Buenos Aires", + "Company": null, + "Country": "Argentina", + "CustomerId": 56, + "Email": "diego.gutierrez@yahoo.ar", + "Fax": null, + "FirstName": "Diego", + "LastName": "Gutiérrez", + "Phone": "+54 (0)11 4311 4333", + "PostalCode": "1106", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "4, Rue Milton", + "City": "Paris", + "Company": null, + "Country": "France", + "CustomerId": 39, + "Email": "camille.bernard@yahoo.fr", + "Fax": null, + "FirstName": "Camille", + "LastName": "Bernard", + "Phone": "+33 01 49 70 65 65", + "PostalCode": "75009", + "State": null, + "SupportRepId": 4 + }, + { + "Address": "421 Bourke Street", + "City": "Sidney", + "Company": null, + "Country": "Australia", + "CustomerId": 55, + "Email": "mark.taylor@yahoo.au", + "Fax": null, + "FirstName": "Mark", + "LastName": "Taylor", + "Phone": "+61 (02) 9332 3633", + "PostalCode": "2010", + "State": "NSW", + "SupportRepId": 4 + }, + { + "Address": "541 Del Medio Avenue", + "City": "Mountain View", + "Company": null, + "Country": "USA", + "CustomerId": 20, + "Email": "dmiller@comcast.com", + "Fax": null, + "FirstName": "Dan", + "LastName": "Miller", + "Phone": "+1 (650) 644-3358", + "PostalCode": "94040-111", + "State": "CA", + "SupportRepId": 4 + }, + { + "Address": "69 Salem Street", + "City": "Boston", + "Company": null, + "Country": "USA", + "CustomerId": 23, + "Email": "johngordon22@yahoo.com", + "Fax": null, + "FirstName": "John", + "LastName": "Gordon", + "Phone": "+1 (617) 522-1333", + "PostalCode": "2113", + "State": "MA", + "SupportRepId": 4 + }, + { + "Address": "696 Osborne Street", + "City": "Winnipeg", + "Company": null, + "Country": "Canada", + "CustomerId": 32, + "Email": "aaronmitchell@yahoo.ca", + "Fax": null, + "FirstName": "Aaron", + "LastName": "Mitchell", + "Phone": "+1 (204) 452-6452", + "PostalCode": "R3L 2B9", + "State": "MB", + "SupportRepId": 4 + } + ] + }, + "Fax_5829": "+1 (403) 263-4289", + "LastName_7457": "Park", + "PostalCode_0346": "T2P 5G3", + "ReportsTo_3345": 2 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f66f61152e5d537/request.json b/test-snapshots/query/f66f61152e5d537/request.json new file mode 100644 index 0000000..3b3e077 --- /dev/null +++ b/test-snapshots/query/f66f61152e5d537/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "PostalCode_0346": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "Fax_5829": { + "type": "column", + "column": "Fax", + "fields": null + }, + "LastName_7457": { + "type": "column", + "column": "LastName", + "fields": null + }, + "ReportsTo_3345": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "EmployeeId": "SupportRepId" + }, + "relationship_type": "object", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f6d827d323b4b4bb/expected.json b/test-snapshots/query/f6d827d323b4b4bb/expected.json new file mode 100644 index 0000000..2b953dd --- /dev/null +++ b/test-snapshots/query/f6d827d323b4b4bb/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_3066": 317, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 174813 + }, + { + "AlbumId_3066": 268, + "MediaTypeId_5992": 5, + "Milliseconds_0116": 356426 + }, + { + "AlbumId_3066": 272, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 245317 + }, + { + "AlbumId_3066": 273, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 501503 + }, + { + "AlbumId_3066": 274, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 271788 + }, + { + "AlbumId_3066": 275, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 199086 + }, + { + "AlbumId_3066": 276, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 193722 + }, + { + "AlbumId_3066": 277, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 120463 + }, + { + "AlbumId_3066": 278, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 143288 + }, + { + "AlbumId_3066": 279, + "MediaTypeId_5992": 2, + "Milliseconds_0116": 582029 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f6d827d323b4b4bb/request.json b/test-snapshots/query/f6d827d323b4b4bb/request.json new file mode 100644 index 0000000..816cb5f --- /dev/null +++ b/test-snapshots/query/f6d827d323b4b4bb/request.json @@ -0,0 +1,37 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_3066": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Milliseconds_0116": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "MediaTypeId_5992": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f70257cbf163c243/expected.json b/test-snapshots/query/f70257cbf163c243/expected.json new file mode 100644 index 0000000..421c71a --- /dev/null +++ b/test-snapshots/query/f70257cbf163c243/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_9992": 25, + "Name_2484": "Opera" + }, + { + "GenreId_9992": 24, + "Name_2484": "Classical" + }, + { + "GenreId_9992": 23, + "Name_2484": "Alternative" + }, + { + "GenreId_9992": 22, + "Name_2484": "Comedy" + }, + { + "GenreId_9992": 21, + "Name_2484": "Drama" + }, + { + "GenreId_9992": 20, + "Name_2484": "Sci Fi & Fantasy" + }, + { + "GenreId_9992": 19, + "Name_2484": "TV Shows" + }, + { + "GenreId_9992": 18, + "Name_2484": "Science Fiction" + }, + { + "GenreId_9992": 17, + "Name_2484": "Hip Hop/Rap" + }, + { + "GenreId_9992": 16, + "Name_2484": "World" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f70257cbf163c243/request.json b/test-snapshots/query/f70257cbf163c243/request.json new file mode 100644 index 0000000..8e0541f --- /dev/null +++ b/test-snapshots/query/f70257cbf163c243/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_9992": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_2484": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f7043fbcd30410f5/expected.json b/test-snapshots/query/f7043fbcd30410f5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f7043fbcd30410f5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7043fbcd30410f5/request.json b/test-snapshots/query/f7043fbcd30410f5/request.json new file mode 100644 index 0000000..61faceb --- /dev/null +++ b/test-snapshots/query/f7043fbcd30410f5/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2011-07-20" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingAddress", + "path": [] + }, + "operator": "is_null" + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f70eace40154286c/expected.json b/test-snapshots/query/f70eace40154286c/expected.json new file mode 100644 index 0000000..2050099 --- /dev/null +++ b/test-snapshots/query/f70eace40154286c/expected.json @@ -0,0 +1,14 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + }, + { + "GenreId": 2, + "Name": "Jazz" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f70eace40154286c/request.json b/test-snapshots/query/f70eace40154286c/request.json new file mode 100644 index 0000000..9900f0b --- /dev/null +++ b/test-snapshots/query/f70eace40154286c/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 205662 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f722738c53cdcbed/expected.json b/test-snapshots/query/f722738c53cdcbed/expected.json new file mode 100644 index 0000000..9f2066d --- /dev/null +++ b/test-snapshots/query/f722738c53cdcbed/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WI" + }, + { + "BillingState_4589": "WA" + }, + { + "BillingState_4589": "WA" + }, + { + "BillingState_4589": "WA" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f722738c53cdcbed/request.json b/test-snapshots/query/f722738c53cdcbed/request.json new file mode 100644 index 0000000..2c6434c --- /dev/null +++ b/test-snapshots/query/f722738c53cdcbed/request.json @@ -0,0 +1,35 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingState_4589": { + "type": "column", + "column": "BillingState", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f72ff192f680cb4d/expected.json b/test-snapshots/query/f72ff192f680cb4d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f72ff192f680cb4d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f72ff192f680cb4d/request.json b/test-snapshots/query/f72ff192f680cb4d/request.json new file mode 100644 index 0000000..ceeedc7 --- /dev/null +++ b/test-snapshots/query/f72ff192f680cb4d/request.json @@ -0,0 +1,153 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "margaret@chinookcorp.com" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "IT Staff" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f74b9333c2094f02/expected.json b/test-snapshots/query/f74b9333c2094f02/expected.json new file mode 100644 index 0000000..69eb316 --- /dev/null +++ b/test-snapshots/query/f74b9333c2094f02/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "AlbumId": 107, + "Bytes": 19599577, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 816509, + "Name": "Rime of the Ancient Mariner", + "TrackId": 1351, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 5828861, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 242729, + "Name": "Flash of The Blade", + "TrackId": 1347, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6074756, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 252891, + "Name": "Losfer Words", + "TrackId": 1346, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 6472088, + "Composer": "Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 269531, + "Name": "Aces High", + "TrackId": 1344, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 7696518, + "Composer": "Dickinson/Smith", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 320548, + "Name": "Back in the Village", + "TrackId": 1349, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8638809, + "Composer": "Smith/Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 359810, + "Name": "2 Minutes To Midnight", + "TrackId": 1345, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 8800686, + "Composer": "Steve Harris", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 366471, + "Name": "Duelists", + "TrackId": 1348, + "UnitPrice": 0.99 + }, + { + "AlbumId": 107, + "Bytes": 9791106, + "Composer": "Dickinson", + "GenreId": 3, + "MediaTypeId": 1, + "Milliseconds": 407823, + "Name": "Powerslave", + "TrackId": 1350, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f74b9333c2094f02/request.json b/test-snapshots/query/f74b9333c2094f02/request.json new file mode 100644 index 0000000..64b946a --- /dev/null +++ b/test-snapshots/query/f74b9333c2094f02/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 107 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7636070c34db27e/expected.json b/test-snapshots/query/f7636070c34db27e/expected.json new file mode 100644 index 0000000..d81ce15 --- /dev/null +++ b/test-snapshots/query/f7636070c34db27e/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "InvoiceId_4239": 1, + "InvoiceLineId_8961": 1, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 1, + "InvoiceLineId_8961": 2, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 10, + "InvoiceLineId_8961": 45, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 10, + "InvoiceLineId_8961": 46, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 10, + "InvoiceLineId_8961": 47, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 10, + "InvoiceLineId_8961": 48, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 10, + "InvoiceLineId_8961": 49, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 10, + "InvoiceLineId_8961": 50, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 100, + "InvoiceLineId_8961": 535, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + }, + { + "InvoiceId_4239": 100, + "InvoiceLineId_8961": 536, + "Quantity_2865": 1, + "UnitPrice_7109": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7636070c34db27e/request.json b/test-snapshots/query/f7636070c34db27e/request.json new file mode 100644 index 0000000..1ca5ca8 --- /dev/null +++ b/test-snapshots/query/f7636070c34db27e/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_4239": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_8961": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_2865": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "UnitPrice_7109": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f783cbe8fb2630d4/expected.json b/test-snapshots/query/f783cbe8fb2630d4/expected.json new file mode 100644 index 0000000..7ab5cfa --- /dev/null +++ b/test-snapshots/query/f783cbe8fb2630d4/expected.json @@ -0,0 +1,94 @@ +[ + { + "rows": [ + { + "Address_2649": "1111 6 Ave SW", + "BirthDate_2066": "1973-08-29", + "Email_7101": "jane@chinookcorp.com", + "Fax_0650": "+1 (403) 262-6712", + "FirstName_0437": "Jane", + "LastName_1631": "Peacock", + "Phone_6120": "+1 (403) 262-3443", + "ReportsTo_2884": 2, + "State_3881": "AB" + }, + { + "Address_2649": "11120 Jasper Ave NW", + "BirthDate_2066": "1962-02-18", + "Email_7101": "andrew@chinookcorp.com", + "Fax_0650": "+1 (780) 428-3457", + "FirstName_0437": "Andrew", + "LastName_1631": "Adams", + "Phone_6120": "+1 (780) 428-9482", + "ReportsTo_2884": null, + "State_3881": "AB" + }, + { + "Address_2649": "5827 Bowness Road NW", + "BirthDate_2066": "1973-07-01", + "Email_7101": "michael@chinookcorp.com", + "Fax_0650": "+1 (403) 246-9899", + "FirstName_0437": "Michael", + "LastName_1631": "Mitchell", + "Phone_6120": "+1 (403) 246-9887", + "ReportsTo_2884": 1, + "State_3881": "AB" + }, + { + "Address_2649": "590 Columbia Boulevard West", + "BirthDate_2066": "1970-05-29", + "Email_7101": "robert@chinookcorp.com", + "Fax_0650": "+1 (403) 456-8485", + "FirstName_0437": "Robert", + "LastName_1631": "King", + "Phone_6120": "+1 (403) 456-9986", + "ReportsTo_2884": 6, + "State_3881": "AB" + }, + { + "Address_2649": "683 10 Street SW", + "BirthDate_2066": "1947-09-19", + "Email_7101": "margaret@chinookcorp.com", + "Fax_0650": "+1 (403) 263-4289", + "FirstName_0437": "Margaret", + "LastName_1631": "Park", + "Phone_6120": "+1 (403) 263-4423", + "ReportsTo_2884": 2, + "State_3881": "AB" + }, + { + "Address_2649": "7727B 41 Ave", + "BirthDate_2066": "1965-03-03", + "Email_7101": "steve@chinookcorp.com", + "Fax_0650": "1 (780) 836-9543", + "FirstName_0437": "Steve", + "LastName_1631": "Johnson", + "Phone_6120": "1 (780) 836-9987", + "ReportsTo_2884": 2, + "State_3881": "AB" + }, + { + "Address_2649": "825 8 Ave SW", + "BirthDate_2066": "1958-12-08", + "Email_7101": "nancy@chinookcorp.com", + "Fax_0650": "+1 (403) 262-3322", + "FirstName_0437": "Nancy", + "LastName_1631": "Edwards", + "Phone_6120": "+1 (403) 262-3443", + "ReportsTo_2884": 1, + "State_3881": "AB" + }, + { + "Address_2649": "923 7 ST NW", + "BirthDate_2066": "1968-01-09", + "Email_7101": "laura@chinookcorp.com", + "Fax_0650": "+1 (403) 467-8772", + "FirstName_0437": "Laura", + "LastName_1631": "Callahan", + "Phone_6120": "+1 (403) 467-3351", + "ReportsTo_2884": 6, + "State_3881": "AB" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f783cbe8fb2630d4/request.json b/test-snapshots/query/f783cbe8fb2630d4/request.json new file mode 100644 index 0000000..645906d --- /dev/null +++ b/test-snapshots/query/f783cbe8fb2630d4/request.json @@ -0,0 +1,67 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address_2649": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate_2066": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "ReportsTo_2884": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "LastName_1631": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Email_7101": { + "type": "column", + "column": "Email", + "fields": null + }, + "State_3881": { + "type": "column", + "column": "State", + "fields": null + }, + "Fax_0650": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_0437": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "Phone_6120": { + "type": "column", + "column": "Phone", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Address", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f784cded24876979/expected.json b/test-snapshots/query/f784cded24876979/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/f784cded24876979/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f784cded24876979/request.json b/test-snapshots/query/f784cded24876979/request.json new file mode 100644 index 0000000..a7f2960 --- /dev/null +++ b/test-snapshots/query/f784cded24876979/request.json @@ -0,0 +1,95 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 11170334 + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7ba084b507d3420/expected.json b/test-snapshots/query/f7ba084b507d3420/expected.json new file mode 100644 index 0000000..8bab846 --- /dev/null +++ b/test-snapshots/query/f7ba084b507d3420/expected.json @@ -0,0 +1,9 @@ +[ + { + "aggregates": { + "InvoiceId_median_1663": 207, + "TrackId_sum_5137": 3847725, + "UnitPrice_median_6301": 0.99 + } + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7ba084b507d3420/request.json b/test-snapshots/query/f7ba084b507d3420/request.json new file mode 100644 index 0000000..addf678 --- /dev/null +++ b/test-snapshots/query/f7ba084b507d3420/request.json @@ -0,0 +1,25 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "aggregates": { + "UnitPrice_median_6301": { + "type": "single_column", + "column": "UnitPrice", + "function": "median" + }, + "TrackId_sum_5137": { + "type": "single_column", + "column": "TrackId", + "function": "sum" + }, + "InvoiceId_median_1663": { + "type": "single_column", + "column": "InvoiceId", + "function": "median" + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f7d641fb8bf90f24/expected.json b/test-snapshots/query/f7d641fb8bf90f24/expected.json new file mode 100644 index 0000000..dbc8dc5 --- /dev/null +++ b/test-snapshots/query/f7d641fb8bf90f24/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-07-06", + "InvoiceId": 43, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2009-08-16", + "InvoiceId": 54, + "Total": 13.86 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2010-04-16", + "InvoiceId": 109, + "Total": 8.91 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2011-11-21", + "InvoiceId": 238, + "Total": 1.98 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-02-23", + "InvoiceId": 261, + "Total": 3.96 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2012-05-27", + "InvoiceId": 283, + "Total": 5.94 + }, + { + "BillingAddress": "113 Lupus St", + "BillingCity": "London", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "SW1V 3EN", + "BillingState": null, + "CustomerId": 53, + "InvoiceDate": "2013-01-15", + "InvoiceId": 335, + "Total": 0.99 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2009-04-04", + "InvoiceId": 22, + "Total": 1.98 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2009-05-15", + "InvoiceId": 33, + "Total": 13.86 + }, + { + "BillingAddress": "Calle Lira, 198", + "BillingCity": "Santiago", + "BillingCountry": "Chile", + "BillingPostalCode": null, + "BillingState": null, + "CustomerId": 57, + "InvoiceDate": "2010-01-13", + "InvoiceId": 88, + "Total": 17.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7d641fb8bf90f24/request.json b/test-snapshots/query/f7d641fb8bf90f24/request.json new file mode 100644 index 0000000..3dc0df4 --- /dev/null +++ b/test-snapshots/query/f7d641fb8bf90f24/request.json @@ -0,0 +1,113 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "SW1V 3EN" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7d8f5502fe5b976/expected.json b/test-snapshots/query/f7d8f5502fe5b976/expected.json new file mode 100644 index 0000000..ab0fbfc --- /dev/null +++ b/test-snapshots/query/f7d8f5502fe5b976/expected.json @@ -0,0 +1,28 @@ +[ + { + "rows": [ + { + "AlbumId": 2, + "Bytes": 5510424, + "Composer": null, + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 342562, + "Name": "Balls to the Wall", + "TrackId": 2, + "UnitPrice": 0.99 + }, + { + "AlbumId": 3, + "Bytes": 4331779, + "Composer": "F. Baltes, R.A. Smith-Diesel, S. Kaufman, U. Dirkscneider & W. Hoffman", + "GenreId": 1, + "MediaTypeId": 2, + "Milliseconds": 252051, + "Name": "Restless and Wild", + "TrackId": 4, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7d8f5502fe5b976/request.json b/test-snapshots/query/f7d8f5502fe5b976/request.json new file mode 100644 index 0000000..e0442ab --- /dev/null +++ b/test-snapshots/query/f7d8f5502fe5b976/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7d9b866a6342d29/expected.json b/test-snapshots/query/f7d9b866a6342d29/expected.json new file mode 100644 index 0000000..33eaf38 --- /dev/null +++ b/test-snapshots/query/f7d9b866a6342d29/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 255, + "Bytes": 4506425, + "Composer": null, + "GenreId": 9, + "MediaTypeId": 2, + "Milliseconds": 278312, + "Name": "#9 Dream", + "TrackId": 3254, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7d9b866a6342d29/request.json b/test-snapshots/query/f7d9b866a6342d29/request.json new file mode 100644 index 0000000..8e4b39a --- /dev/null +++ b/test-snapshots/query/f7d9b866a6342d29/request.json @@ -0,0 +1,103 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Quantity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 535 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7da75559ed7f3f3/expected.json b/test-snapshots/query/f7da75559ed7f3f3/expected.json new file mode 100644 index 0000000..e9c4279 --- /dev/null +++ b/test-snapshots/query/f7da75559ed7f3f3/expected.json @@ -0,0 +1,224 @@ +[ + { + "rows": [ + { + "AlbumId_6354": 1, + "Bytes_7531": 11170334, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 579, + "Quantity": 1, + "TrackId": 1, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 343719, + "Name_8227": "For Those About To Rock (We Salute You)", + "TrackId_8712": 1, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 6566314, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 199836, + "Name_8227": "C.O.D.", + "TrackId_8712": 11, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 6599424, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 581, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 319, + "InvoiceLineId": 1729, + "Quantity": 1, + "TrackId": 9, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 203102, + "Name_8227": "Snowballed", + "TrackId_8712": 9, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 6706347, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 108, + "InvoiceLineId": 582, + "Quantity": 1, + "TrackId": 13, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 205688, + "Name_8227": "Night Of The Long Knives", + "TrackId_8712": 13, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 6713451, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 3, + "Quantity": 1, + "TrackId": 6, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 205662, + "Name_8227": "Put The Finger On You", + "TrackId_8712": 6, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 6852860, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 210834, + "Name_8227": "Inject The Venom", + "TrackId_8712": 8, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 7636561, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 233926, + "Name_8227": "Let's Get It Up", + "TrackId_8712": 7, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 8596840, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 6, + "Quantity": 1, + "TrackId": 12, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 263288, + "Name_8227": "Breaking The Rules", + "TrackId_8712": 12, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 8611245, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 5, + "Quantity": 1, + "TrackId": 10, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 263497, + "Name_8227": "Evil Walks", + "TrackId_8712": 10, + "UnitPrice_8668": 0.99 + }, + { + "AlbumId_6354": 1, + "Bytes_7531": 8817038, + "Composer_4805": "Angus Young, Malcolm Young, Brian Johnson", + "FK_InvoiceLineTrackId": { + "rows": [ + { + "InvoiceId": 214, + "InvoiceLineId": 1156, + "Quantity": 1, + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + }, + "GenreId_8406": 1, + "MediaTypeId_8726": 1, + "Milliseconds_8020": 270863, + "Name_8227": "Spellbound", + "TrackId_8712": 14, + "UnitPrice_8668": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7da75559ed7f3f3/request.json b/test-snapshots/query/f7da75559ed7f3f3/request.json new file mode 100644 index 0000000..3a7fa20 --- /dev/null +++ b/test-snapshots/query/f7da75559ed7f3f3/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_6354": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes_7531": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer_4805": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId_8406": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId_8726": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds_8020": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name_8227": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId_8712": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice_8668": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_InvoiceLineTrackId": { + "type": "relationship", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "object", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7e33de1127cb0c5/expected.json b/test-snapshots/query/f7e33de1127cb0c5/expected.json new file mode 100644 index 0000000..cc98762 --- /dev/null +++ b/test-snapshots/query/f7e33de1127cb0c5/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "GenreId_3522": 1, + "Name_7893": "Rock" + }, + { + "GenreId_3522": 2, + "Name_7893": "Jazz" + }, + { + "GenreId_3522": 3, + "Name_7893": "Metal" + }, + { + "GenreId_3522": 4, + "Name_7893": "Alternative & Punk" + }, + { + "GenreId_3522": 5, + "Name_7893": "Rock And Roll" + }, + { + "GenreId_3522": 6, + "Name_7893": "Blues" + }, + { + "GenreId_3522": 7, + "Name_7893": "Latin" + }, + { + "GenreId_3522": 8, + "Name_7893": "Reggae" + }, + { + "GenreId_3522": 9, + "Name_7893": "Pop" + }, + { + "GenreId_3522": 10, + "Name_7893": "Soundtrack" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7e33de1127cb0c5/request.json b/test-snapshots/query/f7e33de1127cb0c5/request.json new file mode 100644 index 0000000..5bbfaa0 --- /dev/null +++ b/test-snapshots/query/f7e33de1127cb0c5/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_3522": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name_7893": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f7e8bfd61f36796a/expected.json b/test-snapshots/query/f7e8bfd61f36796a/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f7e8bfd61f36796a/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7e8bfd61f36796a/request.json b/test-snapshots/query/f7e8bfd61f36796a/request.json new file mode 100644 index 0000000..43fe3ef --- /dev/null +++ b/test-snapshots/query/f7e8bfd61f36796a/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Address", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "590 Columbia Boulevard West" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f7eea9799a103ecd/expected.json b/test-snapshots/query/f7eea9799a103ecd/expected.json new file mode 100644 index 0000000..5003496 --- /dev/null +++ b/test-snapshots/query/f7eea9799a103ecd/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "BillingAddress": "3 Chatham Street", + "BillingCity": "Dublin", + "BillingCountry": "Ireland", + "BillingPostalCode": null, + "BillingState": "Dublin", + "CustomerId": 46, + "InvoiceDate": "2009-02-03", + "InvoiceId": 10, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f7eea9799a103ecd/request.json b/test-snapshots/query/f7eea9799a103ecd/request.json new file mode 100644 index 0000000..24bcb99 --- /dev/null +++ b/test-snapshots/query/f7eea9799a103ecd/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 45 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f818c927324602a2/expected.json b/test-snapshots/query/f818c927324602a2/expected.json new file mode 100644 index 0000000..b5ec3ac --- /dev/null +++ b/test-snapshots/query/f818c927324602a2/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_0690": 1, + "InvoiceLineId_4222": 1, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 1, + "InvoiceLineId_4222": 2, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 2, + "InvoiceLineId_4222": 3, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 2, + "InvoiceLineId_4222": 4, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 2, + "InvoiceLineId_4222": 5, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 2, + "InvoiceLineId_4222": 6, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 3, + "InvoiceLineId_4222": 10, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 3, + "InvoiceLineId_4222": 11, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 3, + "InvoiceLineId_4222": 12, + "UnitPrice_4608": 0.99 + }, + { + "InvoiceId_0690": 3, + "InvoiceLineId_4222": 7, + "UnitPrice_4608": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f818c927324602a2/request.json b/test-snapshots/query/f818c927324602a2/request.json new file mode 100644 index 0000000..4825ba8 --- /dev/null +++ b/test-snapshots/query/f818c927324602a2/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_0690": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_4222": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "UnitPrice_4608": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f83fd615ef433103/expected.json b/test-snapshots/query/f83fd615ef433103/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f83fd615ef433103/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f83fd615ef433103/request.json b/test-snapshots/query/f83fd615ef433103/request.json new file mode 100644 index 0000000..918c525 --- /dev/null +++ b/test-snapshots/query/f83fd615ef433103/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "For Those About To Rock We Salute You" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 103 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f8567500ce11d38e/expected.json b/test-snapshots/query/f8567500ce11d38e/expected.json new file mode 100644 index 0000000..a6810a8 --- /dev/null +++ b/test-snapshots/query/f8567500ce11d38e/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_1268": 5, + "Name_8719": "AAC audio file" + }, + { + "MediaTypeId_1268": 4, + "Name_8719": "Purchased AAC audio file" + }, + { + "MediaTypeId_1268": 3, + "Name_8719": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_1268": 2, + "Name_8719": "Protected AAC audio file" + }, + { + "MediaTypeId_1268": 1, + "Name_8719": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8567500ce11d38e/request.json b/test-snapshots/query/f8567500ce11d38e/request.json new file mode 100644 index 0000000..1e8593a --- /dev/null +++ b/test-snapshots/query/f8567500ce11d38e/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_1268": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_8719": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f85fc99f972cfab2/expected.json b/test-snapshots/query/f85fc99f972cfab2/expected.json new file mode 100644 index 0000000..1f4040c --- /dev/null +++ b/test-snapshots/query/f85fc99f972cfab2/expected.json @@ -0,0 +1,13 @@ +[ + { + "rows": [ + { + "InvoiceId": 1, + "InvoiceLineId": 1, + "Quantity": 1, + "TrackId": 2, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f85fc99f972cfab2/request.json b/test-snapshots/query/f85fc99f972cfab2/request.json new file mode 100644 index 0000000..92c463a --- /dev/null +++ b/test-snapshots/query/f85fc99f972cfab2/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f8ca3c23ee196bbe/expected.json b/test-snapshots/query/f8ca3c23ee196bbe/expected.json new file mode 100644 index 0000000..1534588 --- /dev/null +++ b/test-snapshots/query/f8ca3c23ee196bbe/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 100, + "Bytes": 10276872, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 428016, + "Name": "05 - Phantom of the Opera", + "TrackId": 1272, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4712576, + "Composer": "David Murray/Paul Di'Anno/Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 196284, + "Name": "02 - Sanctuary", + "TrackId": 1269, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 4739122, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 197276, + "Name": "04 - Running Free", + "TrackId": 1271, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5189891, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 216058, + "Name": "09 - Iron Maiden", + "TrackId": 1276, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 5668992, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 236173, + "Name": "01 - Prowler", + "TrackId": 1268, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6066304, + "Composer": "Murray Dave", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 252708, + "Name": "08 - Charlotte the Harlot", + "TrackId": 1275, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 6226048, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 259343, + "Name": "06 - Transylvania", + "TrackId": 1273, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7889024, + "Composer": "Harris/Paul Di´Anno", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 328620, + "Name": "03 - Remember Tomorrow", + "TrackId": 1270, + "UnitPrice": 0.99 + }, + { + "AlbumId": 100, + "Bytes": 7981184, + "Composer": "Steve Harris", + "GenreId": 6, + "MediaTypeId": 1, + "Milliseconds": 332460, + "Name": "07 - Strange World", + "TrackId": 1274, + "UnitPrice": 0.99 + }, + { + "AlbumId": 101, + "Bytes": 2543744, + "Composer": "Steve Harris", + "GenreId": 13, + "MediaTypeId": 1, + "Milliseconds": 105926, + "Name": "The Ides Of March", + "TrackId": 1277, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8ca3c23ee196bbe/request.json b/test-snapshots/query/f8ca3c23ee196bbe/request.json new file mode 100644 index 0000000..d5abb60 --- /dev/null +++ b/test-snapshots/query/f8ca3c23ee196bbe/request.json @@ -0,0 +1,85 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f8cfd5ed45b145e5/expected.json b/test-snapshots/query/f8cfd5ed45b145e5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f8cfd5ed45b145e5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8cfd5ed45b145e5/request.json b/test-snapshots/query/f8cfd5ed45b145e5/request.json new file mode 100644 index 0000000..fb82dbf --- /dev/null +++ b/test-snapshots/query/f8cfd5ed45b145e5/request.json @@ -0,0 +1,112 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Patrick" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Fax", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f8d530cacf91d522/expected.json b/test-snapshots/query/f8d530cacf91d522/expected.json new file mode 100644 index 0000000..10945ce --- /dev/null +++ b/test-snapshots/query/f8d530cacf91d522/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "ArtistId": 90, + "Name": "Iron Maiden" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8d530cacf91d522/request.json b/test-snapshots/query/f8d530cacf91d522/request.json new file mode 100644 index 0000000..ce5ca0f --- /dev/null +++ b/test-snapshots/query/f8d530cacf91d522/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live After Death" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f8d5e355e177b94e/expected.json b/test-snapshots/query/f8d5e355e177b94e/expected.json new file mode 100644 index 0000000..1860b6e --- /dev/null +++ b/test-snapshots/query/f8d5e355e177b94e/expected.json @@ -0,0 +1,20 @@ +[ + { + "rows": [ + { + "InvoiceId": 2, + "InvoiceLineId": 4, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 214, + "InvoiceLineId": 1155, + "Quantity": 1, + "TrackId": 8, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8d5e355e177b94e/request.json b/test-snapshots/query/f8d5e355e177b94e/request.json new file mode 100644 index 0000000..06148b8 --- /dev/null +++ b/test-snapshots/query/f8d5e355e177b94e/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Bytes", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6852860 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f8dfa7332a8370c4/expected.json b/test-snapshots/query/f8dfa7332a8370c4/expected.json new file mode 100644 index 0000000..e14d987 --- /dev/null +++ b/test-snapshots/query/f8dfa7332a8370c4/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8dfa7332a8370c4/request.json b/test-snapshots/query/f8dfa7332a8370c4/request.json new file mode 100644 index 0000000..ed61b8b --- /dev/null +++ b/test-snapshots/query/f8dfa7332a8370c4/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f8ed970d38c47af1/expected.json b/test-snapshots/query/f8ed970d38c47af1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f8ed970d38c47af1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f8ed970d38c47af1/request.json b/test-snapshots/query/f8ed970d38c47af1/request.json new file mode 100644 index 0000000..8a8751e --- /dev/null +++ b/test-snapshots/query/f8ed970d38c47af1/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 15 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Soundtrack" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f91bf4c1e9bdb6ed/expected.json b/test-snapshots/query/f91bf4c1e9bdb6ed/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f91bf4c1e9bdb6ed/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f91bf4c1e9bdb6ed/request.json b/test-snapshots/query/f91bf4c1e9bdb6ed/request.json new file mode 100644 index 0000000..305a06e --- /dev/null +++ b/test-snapshots/query/f91bf4c1e9bdb6ed/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "World" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f9611cd5bb55d0df/expected.json b/test-snapshots/query/f9611cd5bb55d0df/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f9611cd5bb55d0df/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f9611cd5bb55d0df/request.json b/test-snapshots/query/f9611cd5bb55d0df/request.json new file mode 100644 index 0000000..6cd95c8 --- /dev/null +++ b/test-snapshots/query/f9611cd5bb55d0df/request.json @@ -0,0 +1,69 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "No Prayer For The Dying" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f974e7ad65298953/expected.json b/test-snapshots/query/f974e7ad65298953/expected.json new file mode 100644 index 0000000..bcf0cf7 --- /dev/null +++ b/test-snapshots/query/f974e7ad65298953/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-04-11", + "InvoiceId": 106, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2010-05-22", + "InvoiceId": 117, + "Total": 13.86 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2011-01-20", + "InvoiceId": 172, + "Total": 8.91 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-08-26", + "InvoiceId": 301, + "Total": 1.98 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2012-11-28", + "InvoiceId": 324, + "Total": 3.96 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-03-02", + "InvoiceId": 346, + "Total": 5.94 + }, + { + "BillingAddress": "11, Place Bellecour", + "BillingCity": "Lyon", + "BillingCountry": "France", + "BillingPostalCode": "69002", + "BillingState": null, + "CustomerId": 41, + "InvoiceDate": "2013-10-21", + "InvoiceId": 398, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2009-03-22", + "InvoiceId": 20, + "Total": 0.99 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-09-13", + "InvoiceId": 141, + "Total": 1.98 + }, + { + "BillingAddress": "110 Raeburn Pl", + "BillingCity": "Edinburgh ", + "BillingCountry": "United Kingdom", + "BillingPostalCode": "EH4 1HH", + "BillingState": null, + "CustomerId": 54, + "InvoiceDate": "2010-10-24", + "InvoiceId": 152, + "Total": 13.86 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f974e7ad65298953/request.json b/test-snapshots/query/f974e7ad65298953/request.json new file mode 100644 index 0000000..792d176 --- /dev/null +++ b/test-snapshots/query/f974e7ad65298953/request.json @@ -0,0 +1,99 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "FL" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Customer", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/f975b3d32462a1c0/expected.json b/test-snapshots/query/f975b3d32462a1c0/expected.json new file mode 100644 index 0000000..47ee8f0 --- /dev/null +++ b/test-snapshots/query/f975b3d32462a1c0/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "90’s Music", + "PlaylistId": 5 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f975b3d32462a1c0/request.json b/test-snapshots/query/f975b3d32462a1c0/request.json new file mode 100644 index 0000000..db37a3c --- /dev/null +++ b/test-snapshots/query/f975b3d32462a1c0/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f99fbc24ec2a66c5/expected.json b/test-snapshots/query/f99fbc24ec2a66c5/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f99fbc24ec2a66c5/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f99fbc24ec2a66c5/request.json b/test-snapshots/query/f99fbc24ec2a66c5/request.json new file mode 100644 index 0000000..a1bdf75 --- /dev/null +++ b/test-snapshots/query/f99fbc24ec2a66c5/request.json @@ -0,0 +1,115 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Phone", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "marc.dubois@hotmail.com" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "FirstName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Marc" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f9dfa5809ba97d9/expected.json b/test-snapshots/query/f9dfa5809ba97d9/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f9dfa5809ba97d9/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f9dfa5809ba97d9/request.json b/test-snapshots/query/f9dfa5809ba97d9/request.json new file mode 100644 index 0000000..70ee8b0 --- /dev/null +++ b/test-snapshots/query/f9dfa5809ba97d9/request.json @@ -0,0 +1,112 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "andrew@chinookcorp.com" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f9e9315498de44ca/expected.json b/test-snapshots/query/f9e9315498de44ca/expected.json new file mode 100644 index 0000000..c64f946 --- /dev/null +++ b/test-snapshots/query/f9e9315498de44ca/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 106, + "ArtistId": 90, + "Title": "Piece Of Mind" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f9e9315498de44ca/request.json b/test-snapshots/query/f9e9315498de44ca/request.json new file mode 100644 index 0000000..4d9814c --- /dev/null +++ b/test-snapshots/query/f9e9315498de44ca/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Piece Of Mind" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f9ee432bf4c40d4d/expected.json b/test-snapshots/query/f9ee432bf4c40d4d/expected.json new file mode 100644 index 0000000..a1c484e --- /dev/null +++ b/test-snapshots/query/f9ee432bf4c40d4d/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "GenreId_1091": 23 + }, + { + "GenreId_1091": 4 + }, + { + "GenreId_1091": 6 + }, + { + "GenreId_1091": 11 + }, + { + "GenreId_1091": 24 + }, + { + "GenreId_1091": 22 + }, + { + "GenreId_1091": 21 + }, + { + "GenreId_1091": 12 + }, + { + "GenreId_1091": 15 + }, + { + "GenreId_1091": 13 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f9ee432bf4c40d4d/request.json b/test-snapshots/query/f9ee432bf4c40d4d/request.json new file mode 100644 index 0000000..941a714 --- /dev/null +++ b/test-snapshots/query/f9ee432bf4c40d4d/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_1091": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/f9efd3bb055c8759/expected.json b/test-snapshots/query/f9efd3bb055c8759/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/f9efd3bb055c8759/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/f9efd3bb055c8759/request.json b/test-snapshots/query/f9efd3bb055c8759/request.json new file mode 100644 index 0000000..1761560 --- /dev/null +++ b/test-snapshots/query/f9efd3bb055c8759/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fa0aac79505c6e6/expected.json b/test-snapshots/query/fa0aac79505c6e6/expected.json new file mode 100644 index 0000000..ffcdb1a --- /dev/null +++ b/test-snapshots/query/fa0aac79505c6e6/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_8335": 227, + "Composer_0485": null, + "GenreId_0126": 19 + }, + { + "AlbumId_8335": 229, + "Composer_0485": null, + "GenreId_0126": 21 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + }, + { + "AlbumId_8335": 253, + "Composer_0485": null, + "GenreId_0126": 20 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fa0aac79505c6e6/request.json b/test-snapshots/query/fa0aac79505c6e6/request.json new file mode 100644 index 0000000..5cd018d --- /dev/null +++ b/test-snapshots/query/fa0aac79505c6e6/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId_8335": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "GenreId_0126": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Composer_0485": { + "type": "column", + "column": "Composer", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Milliseconds", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Composer", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fa222e71bfde9524/expected.json b/test-snapshots/query/fa222e71bfde9524/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fa222e71bfde9524/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fa222e71bfde9524/request.json b/test-snapshots/query/fa222e71bfde9524/request.json new file mode 100644 index 0000000..abd3726 --- /dev/null +++ b/test-snapshots/query/fa222e71bfde9524/request.json @@ -0,0 +1,129 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "State", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AB" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fa274838778535e/expected.json b/test-snapshots/query/fa274838778535e/expected.json new file mode 100644 index 0000000..a5b5927 --- /dev/null +++ b/test-snapshots/query/fa274838778535e/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "City_8543": "Budapest", + "Country_2455": "Hungary", + "Fax_6684": null, + "SupportRepId_7753": 3 + }, + { + "City_8543": "Winnipeg", + "Country_2455": "Canada", + "Fax_6684": null, + "SupportRepId_7753": 4 + }, + { + "City_8543": "New York", + "Country_2455": "USA", + "Fax_6684": "+1 (212) 221-4679", + "SupportRepId_7753": 3 + }, + { + "City_8543": "Chicago", + "Country_2455": "USA", + "Fax_6684": null, + "SupportRepId_7753": 3 + }, + { + "City_8543": "Orlando", + "Country_2455": "USA", + "Fax_6684": null, + "SupportRepId_7753": 4 + }, + { + "City_8543": "Cupertino", + "Country_2455": "USA", + "Fax_6684": "+1 (408) 996-1011", + "SupportRepId_7753": 3 + }, + { + "City_8543": "Toronto", + "Country_2455": "Canada", + "Fax_6684": null, + "SupportRepId_7753": 3 + }, + { + "City_8543": "Redmond", + "Country_2455": "USA", + "Fax_6684": "+1 (425) 882-8081", + "SupportRepId_7753": 5 + }, + { + "City_8543": "Montréal", + "Country_2455": "Canada", + "Fax_6684": null, + "SupportRepId_7753": 3 + }, + { + "City_8543": "Tucson", + "Country_2455": "USA", + "Fax_6684": null, + "SupportRepId_7753": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fa274838778535e/request.json b/test-snapshots/query/fa274838778535e/request.json new file mode 100644 index 0000000..e37cdb1 --- /dev/null +++ b/test-snapshots/query/fa274838778535e/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "SupportRepId_7753": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "City_8543": { + "type": "column", + "column": "City", + "fields": null + }, + "Fax_6684": { + "type": "column", + "column": "Fax", + "fields": null + }, + "Country_2455": { + "type": "column", + "column": "Country", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Phone", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fa39d2bf329505e4/expected.json b/test-snapshots/query/fa39d2bf329505e4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fa39d2bf329505e4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fa39d2bf329505e4/request.json b/test-snapshots/query/fa39d2bf329505e4/request.json new file mode 100644 index 0000000..c25eb8d --- /dev/null +++ b/test-snapshots/query/fa39d2bf329505e4/request.json @@ -0,0 +1,117 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "MediaTypeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 2 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AAC audio file" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.MediaType", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fa4b87a739584a89/expected.json b/test-snapshots/query/fa4b87a739584a89/expected.json new file mode 100644 index 0000000..e9cccaa --- /dev/null +++ b/test-snapshots/query/fa4b87a739584a89/expected.json @@ -0,0 +1,17 @@ +[ + { + "rows": [ + { + "AlbumId": 24, + "Bytes": 7380787, + "Composer": "Chico Science", + "GenreId": 7, + "MediaTypeId": 1, + "Milliseconds": 221492, + "Name": "Maracatu Atômico [Trip Hop]", + "TrackId": 268, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fa4b87a739584a89/request.json b/test-snapshots/query/fa4b87a739584a89/request.json new file mode 100644 index 0000000..1fd049c --- /dev/null +++ b/test-snapshots/query/fa4b87a739584a89/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 50 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "TrackId": "TrackId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fa78c80d6458968c/expected.json b/test-snapshots/query/fa78c80d6458968c/expected.json new file mode 100644 index 0000000..7d9f7cf --- /dev/null +++ b/test-snapshots/query/fa78c80d6458968c/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "1 Microsoft Way", + "City": "Redmond", + "Company": "Microsoft Corporation", + "Country": "USA", + "CustomerId": 17, + "Email": "jacksmith@microsoft.com", + "Fax": "+1 (425) 882-8081", + "FirstName": "Jack", + "LastName": "Smith", + "Phone": "+1 (425) 882-8080", + "PostalCode": "98052-8300", + "State": "WA", + "SupportRepId": 5 + }, + { + "Address": "1033 N Park Ave", + "City": "Tucson", + "Company": null, + "Country": "USA", + "CustomerId": 27, + "Email": "patrick.gray@aol.com", + "Fax": null, + "FirstName": "Patrick", + "LastName": "Gray", + "Phone": "+1 (520) 622-4200", + "PostalCode": "85719", + "State": "AZ", + "SupportRepId": 4 + }, + { + "Address": "11, Place Bellecour", + "City": "Lyon", + "Company": null, + "Country": "France", + "CustomerId": 41, + "Email": "marc.dubois@hotmail.com", + "Fax": null, + "FirstName": "Marc", + "LastName": "Dubois", + "Phone": "+33 04 78 30 30 30", + "PostalCode": "69002", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "110 Raeburn Pl", + "City": "Edinburgh ", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 54, + "Email": "steve.murray@yahoo.uk", + "Fax": null, + "FirstName": "Steve", + "LastName": "Murray", + "Phone": "+44 0131 315 3300", + "PostalCode": "EH4 1HH", + "State": null, + "SupportRepId": 5 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "120 S Orange Ave", + "City": "Orlando", + "Company": null, + "Country": "USA", + "CustomerId": 22, + "Email": "hleacock@gmail.com", + "Fax": null, + "FirstName": "Heather", + "LastName": "Leacock", + "Phone": "+1 (407) 999-7788", + "PostalCode": "32801", + "State": "FL", + "SupportRepId": 4 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "1600 Amphitheatre Parkway", + "City": "Mountain View", + "Company": "Google Inc.", + "Country": "USA", + "CustomerId": 16, + "Email": "fharris@google.com", + "Fax": "+1 (650) 253-0000", + "FirstName": "Frank", + "LastName": "Harris", + "Phone": "+1 (650) 253-0000", + "PostalCode": "94043-1351", + "State": "CA", + "SupportRepId": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fa78c80d6458968c/request.json b/test-snapshots/query/fa78c80d6458968c/request.json new file mode 100644 index 0000000..8d5ac7c --- /dev/null +++ b/test-snapshots/query/fa78c80d6458968c/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Total", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1.98 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fac2bfed5195f06/expected.json b/test-snapshots/query/fac2bfed5195f06/expected.json new file mode 100644 index 0000000..211308a --- /dev/null +++ b/test-snapshots/query/fac2bfed5195f06/expected.json @@ -0,0 +1,16 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fac2bfed5195f06/request.json b/test-snapshots/query/fac2bfed5195f06/request.json new file mode 100644 index 0000000..4109900 --- /dev/null +++ b/test-snapshots/query/fac2bfed5195f06/request.json @@ -0,0 +1,21 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fad9712e01a96f1e/expected.json b/test-snapshots/query/fad9712e01a96f1e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fad9712e01a96f1e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fad9712e01a96f1e/request.json b/test-snapshots/query/fad9712e01a96f1e/request.json new file mode 100644 index 0000000..58cb4c6 --- /dev/null +++ b/test-snapshots/query/fad9712e01a96f1e/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Milliseconds", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233926 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fafd2fc3ad178978/expected.json b/test-snapshots/query/fafd2fc3ad178978/expected.json new file mode 100644 index 0000000..0c458d9 --- /dev/null +++ b/test-snapshots/query/fafd2fc3ad178978/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-03-04", + "InvoiceId": 15, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-04-14", + "InvoiceId": 26, + "Total": 13.86 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2009-12-13", + "InvoiceId": 81, + "Total": 8.91 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-07-20", + "InvoiceId": 210, + "Total": 1.98 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2011-10-22", + "InvoiceId": 233, + "Total": 3.96 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-01-24", + "InvoiceId": 255, + "Total": 5.94 + }, + { + "BillingAddress": "1 Infinite Loop", + "BillingCity": "Cupertino", + "BillingCountry": "USA", + "BillingPostalCode": "95014", + "BillingState": "CA", + "CustomerId": 19, + "InvoiceDate": "2012-09-13", + "InvoiceId": 307, + "Total": 1.99 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-03-04", + "InvoiceId": 14, + "Total": 1.98 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-06-06", + "InvoiceId": 37, + "Total": 3.96 + }, + { + "BillingAddress": "1 Microsoft Way", + "BillingCity": "Redmond", + "BillingCountry": "USA", + "BillingPostalCode": "98052-8300", + "BillingState": "WA", + "CustomerId": 17, + "InvoiceDate": "2009-09-08", + "InvoiceId": 59, + "Total": 5.94 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fafd2fc3ad178978/request.json b/test-snapshots/query/fafd2fc3ad178978/request.json new file mode 100644 index 0000000..7622396 --- /dev/null +++ b/test-snapshots/query/fafd2fc3ad178978/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fb404d12335a7587/expected.json b/test-snapshots/query/fb404d12335a7587/expected.json new file mode 100644 index 0000000..ee04541 --- /dev/null +++ b/test-snapshots/query/fb404d12335a7587/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 4, + "Name": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fb404d12335a7587/request.json b/test-snapshots/query/fb404d12335a7587/request.json new file mode 100644 index 0000000..91f64bc --- /dev/null +++ b/test-snapshots/query/fb404d12335a7587/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Purchased AAC audio file" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fb800b4dbf696a49/expected.json b/test-snapshots/query/fb800b4dbf696a49/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fb800b4dbf696a49/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fb800b4dbf696a49/request.json b/test-snapshots/query/fb800b4dbf696a49/request.json new file mode 100644 index 0000000..2f3253b --- /dev/null +++ b/test-snapshots/query/fb800b4dbf696a49/request.json @@ -0,0 +1,73 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "AC/DC" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fb9273c35072827/expected.json b/test-snapshots/query/fb9273c35072827/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fb9273c35072827/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fb9273c35072827/request.json b/test-snapshots/query/fb9273c35072827/request.json new file mode 100644 index 0000000..390fa57 --- /dev/null +++ b/test-snapshots/query/fb9273c35072827/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "BillingPostalCode": { + "type": "column", + "column": "BillingPostalCode", + "fields": null + }, + "BillingState": { + "type": "column", + "column": "BillingState", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "InvoiceDate": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "Total": { + "type": "column", + "column": "Total", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "UnitPrice", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 0.99 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 256 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 46 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.InvoiceLine", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fb9a874de248e0ba/expected.json b/test-snapshots/query/fb9a874de248e0ba/expected.json new file mode 100644 index 0000000..e7a9692 --- /dev/null +++ b/test-snapshots/query/fb9a874de248e0ba/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 101, + "ArtistId": 90, + "Title": "Killers" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fb9a874de248e0ba/request.json b/test-snapshots/query/fb9a874de248e0ba/request.json new file mode 100644 index 0000000..b0a26dd --- /dev/null +++ b/test-snapshots/query/fb9a874de248e0ba/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Killers" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fbe6be2b0fce4cff/expected.json b/test-snapshots/query/fbe6be2b0fce4cff/expected.json new file mode 100644 index 0000000..d4a2ff1 --- /dev/null +++ b/test-snapshots/query/fbe6be2b0fce4cff/expected.json @@ -0,0 +1,34 @@ +[ + { + "rows": [ + { + "InvoiceId": 37, + "InvoiceLineId": 193, + "Quantity": 1, + "TrackId": 1166, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 37, + "InvoiceLineId": 194, + "Quantity": 1, + "TrackId": 1168, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 37, + "InvoiceLineId": 195, + "Quantity": 1, + "TrackId": 1170, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 37, + "InvoiceLineId": 196, + "Quantity": 1, + "TrackId": 1172, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fbe6be2b0fce4cff/request.json b/test-snapshots/query/fbe6be2b0fce4cff/request.json new file mode 100644 index 0000000..a36211f --- /dev/null +++ b/test-snapshots/query/fbe6be2b0fce4cff/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 37 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fbf50f4cce4c5b73/expected.json b/test-snapshots/query/fbf50f4cce4c5b73/expected.json new file mode 100644 index 0000000..d639aa6 --- /dev/null +++ b/test-snapshots/query/fbf50f4cce4c5b73/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "PlaylistId": 1, + "TrackId": 1003 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fbf50f4cce4c5b73/request.json b/test-snapshots/query/fbf50f4cce4c5b73/request.json new file mode 100644 index 0000000..6dfc2ea --- /dev/null +++ b/test-snapshots/query/fbf50f4cce4c5b73/request.json @@ -0,0 +1,51 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1003 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fc01c5e614f6ba8c/expected.json b/test-snapshots/query/fc01c5e614f6ba8c/expected.json new file mode 100644 index 0000000..da05f30 --- /dev/null +++ b/test-snapshots/query/fc01c5e614f6ba8c/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "Name": "Classical 101 - Deep Cuts", + "PlaylistId": 13 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fc01c5e614f6ba8c/request.json b/test-snapshots/query/fc01c5e614f6ba8c/request.json new file mode 100644 index 0000000..15a0978 --- /dev/null +++ b/test-snapshots/query/fc01c5e614f6ba8c/request.json @@ -0,0 +1,47 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Classical 101 - Deep Cuts" + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fc14a9e221db2770/expected.json b/test-snapshots/query/fc14a9e221db2770/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fc14a9e221db2770/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fc14a9e221db2770/request.json b/test-snapshots/query/fc14a9e221db2770/request.json new file mode 100644 index 0000000..5c96377 --- /dev/null +++ b/test-snapshots/query/fc14a9e221db2770/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 14 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fc47bb2fa0bec000/expected.json b/test-snapshots/query/fc47bb2fa0bec000/expected.json new file mode 100644 index 0000000..64fd639 --- /dev/null +++ b/test-snapshots/query/fc47bb2fa0bec000/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "MediaTypeId": 1, + "Name": "MPEG audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fc47bb2fa0bec000/request.json b/test-snapshots/query/fc47bb2fa0bec000/request.json new file mode 100644 index 0000000..c4c98c6 --- /dev/null +++ b/test-snapshots/query/fc47bb2fa0bec000/request.json @@ -0,0 +1,96 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "MediaTypeId": "MediaTypeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fc5b6e5c44069b1d/expected.json b/test-snapshots/query/fc5b6e5c44069b1d/expected.json new file mode 100644 index 0000000..e8b65cd --- /dev/null +++ b/test-snapshots/query/fc5b6e5c44069b1d/expected.json @@ -0,0 +1,136 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "ArtistId": 1, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 1, + "Name_1346": "AC/DC" + } + ] + }, + "Title": "For Those About To Rock We Salute You" + }, + { + "AlbumId": 10, + "ArtistId": 8, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 8, + "Name_1346": "Audioslave" + } + ] + }, + "Title": "Audioslave" + }, + { + "AlbumId": 100, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Iron Maiden" + }, + { + "AlbumId": 101, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Killers" + }, + { + "AlbumId": 102, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Live After Death" + }, + { + "AlbumId": 103, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Live At Donington 1992 (Disc 1)" + }, + { + "AlbumId": 104, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Live At Donington 1992 (Disc 2)" + }, + { + "AlbumId": 105, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "No Prayer For The Dying" + }, + { + "AlbumId": 106, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Piece Of Mind" + }, + { + "AlbumId": 107, + "ArtistId": 90, + "FK_AlbumArtistId": { + "rows": [ + { + "ArtistId_1853": 90, + "Name_1346": "Iron Maiden" + } + ] + }, + "Title": "Powerslave" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fc5b6e5c44069b1d/request.json b/test-snapshots/query/fc5b6e5c44069b1d/request.json new file mode 100644 index 0000000..c421630 --- /dev/null +++ b/test-snapshots/query/fc5b6e5c44069b1d/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + }, + "FK_AlbumArtistId": { + "type": "relationship", + "query": { + "fields": { + "ArtistId_1853": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name_1346": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fc7db32387e3e8ff/expected.json b/test-snapshots/query/fc7db32387e3e8ff/expected.json new file mode 100644 index 0000000..8adebf2 --- /dev/null +++ b/test-snapshots/query/fc7db32387e3e8ff/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "GenreId_4253": 1 + }, + { + "GenreId_4253": 2 + }, + { + "GenreId_4253": 3 + }, + { + "GenreId_4253": 4 + }, + { + "GenreId_4253": 5 + }, + { + "GenreId_4253": 6 + }, + { + "GenreId_4253": 7 + }, + { + "GenreId_4253": 8 + }, + { + "GenreId_4253": 9 + }, + { + "GenreId_4253": 10 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fc7db32387e3e8ff/request.json b/test-snapshots/query/fc7db32387e3e8ff/request.json new file mode 100644 index 0000000..abfaf0d --- /dev/null +++ b/test-snapshots/query/fc7db32387e3e8ff/request.json @@ -0,0 +1,27 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId_4253": { + "type": "column", + "column": "GenreId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "GenreId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fc94171e90b91026/expected.json b/test-snapshots/query/fc94171e90b91026/expected.json new file mode 100644 index 0000000..eedc528 --- /dev/null +++ b/test-snapshots/query/fc94171e90b91026/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 13, + "Name": "Heavy Metal" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fc94171e90b91026/request.json b/test-snapshots/query/fc94171e90b91026/request.json new file mode 100644 index 0000000..725ec0b --- /dev/null +++ b/test-snapshots/query/fc94171e90b91026/request.json @@ -0,0 +1,33 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fcaaa485ffac4e2/expected.json b/test-snapshots/query/fcaaa485ffac4e2/expected.json new file mode 100644 index 0000000..4501189 --- /dev/null +++ b/test-snapshots/query/fcaaa485ffac4e2/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "InvoiceId_2588": 102, + "InvoiceLineId_8044": 553, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 103, + "InvoiceLineId_8044": 554, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 103, + "InvoiceLineId_8044": 563, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 193, + "InvoiceLineId_8044": 1042, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 193, + "InvoiceLineId_8044": 1043, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 193, + "InvoiceLineId_8044": 1044, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 193, + "InvoiceLineId_8044": 1045, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 193, + "InvoiceLineId_8044": 1046, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 193, + "InvoiceLineId_8044": 1047, + "Quantity_1265": 1 + }, + { + "InvoiceId_2588": 194, + "InvoiceLineId_8044": 1048, + "Quantity_1265": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fcaaa485ffac4e2/request.json b/test-snapshots/query/fcaaa485ffac4e2/request.json new file mode 100644 index 0000000..48204c0 --- /dev/null +++ b/test-snapshots/query/fcaaa485ffac4e2/request.json @@ -0,0 +1,45 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_2588": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId_8044": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity_1265": { + "type": "column", + "column": "Quantity", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Quantity", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "UnitPrice", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fcb09d7779067090/expected.json b/test-snapshots/query/fcb09d7779067090/expected.json new file mode 100644 index 0000000..7616af2 --- /dev/null +++ b/test-snapshots/query/fcb09d7779067090/expected.json @@ -0,0 +1,346 @@ +[ + { + "rows": [ + { + "Address_0501": "1 Infinite Loop", + "City_7590": "Cupertino", + "Company_8032": "Apple Inc.", + "Country_1555": "USA", + "Email_2096": "tgoyer@apple.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": "+1 (408) 996-1011", + "FirstName_4975": "Tim", + "Phone_6293": "+1 (408) 996-1010", + "PostalCode_1196": "95014", + "State_7879": "CA", + "SupportRepId_8792": 3 + }, + { + "Address_0501": "1 Microsoft Way", + "City_7590": "Redmond", + "Company_8032": "Microsoft Corporation", + "Country_1555": "USA", + "Email_2096": "jacksmith@microsoft.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": "+1 (425) 882-8081", + "FirstName_4975": "Jack", + "Phone_6293": "+1 (425) 882-8080", + "PostalCode_1196": "98052-8300", + "State_7879": "WA", + "SupportRepId_8792": 5 + }, + { + "Address_0501": "1033 N Park Ave", + "City_7590": "Tucson", + "Company_8032": null, + "Country_1555": "USA", + "Email_2096": "patrick.gray@aol.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "Patrick", + "Phone_6293": "+1 (520) 622-4200", + "PostalCode_1196": "85719", + "State_7879": "AZ", + "SupportRepId_8792": 4 + }, + { + "Address_0501": "11, Place Bellecour", + "City_7590": "Lyon", + "Company_8032": null, + "Country_1555": "France", + "Email_2096": "marc.dubois@hotmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "Marc", + "Phone_6293": "+33 04 78 30 30 30", + "PostalCode_1196": "69002", + "State_7879": null, + "SupportRepId_8792": 5 + }, + { + "Address_0501": "110 Raeburn Pl", + "City_7590": "Edinburgh ", + "Company_8032": null, + "Country_1555": "United Kingdom", + "Email_2096": "steve.murray@yahoo.uk", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "7727B 41 Ave", + "BirthDate": "1965-03-03", + "City": "Calgary", + "Country": "Canada", + "Email": "steve@chinookcorp.com", + "EmployeeId": 5, + "Fax": "1 (780) 836-9543", + "FirstName": "Steve", + "HireDate": "2003-10-17", + "LastName": "Johnson", + "Phone": "1 (780) 836-9987", + "PostalCode": "T3B 1Y7", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "Steve", + "Phone_6293": "+44 0131 315 3300", + "PostalCode_1196": "EH4 1HH", + "State_7879": null, + "SupportRepId_8792": 5 + }, + { + "Address_0501": "113 Lupus St", + "City_7590": "London", + "Company_8032": null, + "Country_1555": "United Kingdom", + "Email_2096": "phil.hughes@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "Phil", + "Phone_6293": "+44 020 7976 5722", + "PostalCode_1196": "SW1V 3EN", + "State_7879": null, + "SupportRepId_8792": 3 + }, + { + "Address_0501": "12,Community Centre", + "City_7590": "Delhi", + "Company_8032": null, + "Country_1555": "India", + "Email_2096": "manoj.pareek@rediff.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "Manoj", + "Phone_6293": "+91 0124 39883988", + "PostalCode_1196": "110017", + "State_7879": null, + "SupportRepId_8792": 3 + }, + { + "Address_0501": "120 S Orange Ave", + "City_7590": "Orlando", + "Company_8032": null, + "Country_1555": "USA", + "Email_2096": "hleacock@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "Heather", + "Phone_6293": "+1 (407) 999-7788", + "PostalCode_1196": "32801", + "State_7879": "FL", + "SupportRepId_8792": 4 + }, + { + "Address_0501": "1498 rue Bélanger", + "City_7590": "Montréal", + "Company_8032": null, + "Country_1555": "Canada", + "Email_2096": "ftremblay@gmail.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "1111 6 Ave SW", + "BirthDate": "1973-08-29", + "City": "Calgary", + "Country": "Canada", + "Email": "jane@chinookcorp.com", + "EmployeeId": 3, + "Fax": "+1 (403) 262-6712", + "FirstName": "Jane", + "HireDate": "2002-04-01", + "LastName": "Peacock", + "Phone": "+1 (403) 262-3443", + "PostalCode": "T2P 5M5", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": null, + "FirstName_4975": "François", + "Phone_6293": "+1 (514) 721-4711", + "PostalCode_1196": "H2G 1A7", + "State_7879": "QC", + "SupportRepId_8792": 3 + }, + { + "Address_0501": "1600 Amphitheatre Parkway", + "City_7590": "Mountain View", + "Company_8032": "Google Inc.", + "Country_1555": "USA", + "Email_2096": "fharris@google.com", + "FK_CustomerSupportRepId": { + "rows": [ + { + "Address": "683 10 Street SW", + "BirthDate": "1947-09-19", + "City": "Calgary", + "Country": "Canada", + "Email": "margaret@chinookcorp.com", + "EmployeeId": 4, + "Fax": "+1 (403) 263-4289", + "FirstName": "Margaret", + "HireDate": "2003-05-03", + "LastName": "Park", + "Phone": "+1 (403) 263-4423", + "PostalCode": "T2P 5G3", + "ReportsTo": 2, + "State": "AB", + "Title": "Sales Support Agent" + } + ] + }, + "Fax_1362": "+1 (650) 253-0000", + "FirstName_4975": "Frank", + "Phone_6293": "+1 (650) 253-0000", + "PostalCode_1196": "94043-1351", + "State_7879": "CA", + "SupportRepId_8792": 4 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fcb09d7779067090/request.json b/test-snapshots/query/fcb09d7779067090/request.json new file mode 100644 index 0000000..086f6c5 --- /dev/null +++ b/test-snapshots/query/fcb09d7779067090/request.json @@ -0,0 +1,159 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address_0501": { + "type": "column", + "column": "Address", + "fields": null + }, + "City_7590": { + "type": "column", + "column": "City", + "fields": null + }, + "Company_8032": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country_1555": { + "type": "column", + "column": "Country", + "fields": null + }, + "State_7879": { + "type": "column", + "column": "State", + "fields": null + }, + "Email_2096": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax_1362": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName_4975": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "SupportRepId_8792": { + "type": "column", + "column": "SupportRepId", + "fields": null + }, + "Phone_6293": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode_1196": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "FK_CustomerSupportRepId": { + "type": "relationship", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "object", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fcee3787402980a0/expected.json b/test-snapshots/query/fcee3787402980a0/expected.json new file mode 100644 index 0000000..6e7e343 --- /dev/null +++ b/test-snapshots/query/fcee3787402980a0/expected.json @@ -0,0 +1,26 @@ +[ + { + "rows": [ + { + "MediaTypeId_2871": 5, + "Name_5860": "AAC audio file" + }, + { + "MediaTypeId_2871": 1, + "Name_5860": "MPEG audio file" + }, + { + "MediaTypeId_2871": 2, + "Name_5860": "Protected AAC audio file" + }, + { + "MediaTypeId_2871": 3, + "Name_5860": "Protected MPEG-4 video file" + }, + { + "MediaTypeId_2871": 4, + "Name_5860": "Purchased AAC audio file" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fcee3787402980a0/request.json b/test-snapshots/query/fcee3787402980a0/request.json new file mode 100644 index 0000000..e2e723a --- /dev/null +++ b/test-snapshots/query/fcee3787402980a0/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": { + "MediaTypeId_2871": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Name_5860": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fd358af61f94c98e/expected.json b/test-snapshots/query/fd358af61f94c98e/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fd358af61f94c98e/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fd358af61f94c98e/request.json b/test-snapshots/query/fd358af61f94c98e/request.json new file mode 100644 index 0000000..ad929aa --- /dev/null +++ b/test-snapshots/query/fd358af61f94c98e/request.json @@ -0,0 +1,146 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 5 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "City", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Lethbridge" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Edwards" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "EmployeeId": "ReportsTo" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fd5be94cf4cd63ab/expected.json b/test-snapshots/query/fd5be94cf4cd63ab/expected.json new file mode 100644 index 0000000..e9c6d4f --- /dev/null +++ b/test-snapshots/query/fd5be94cf4cd63ab/expected.json @@ -0,0 +1,206 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "FK_TrackAlbumId": { + "rows": [ + { + "AlbumId_0904": 1, + "ArtistId_3757": 1, + "Title_6855": "For Those About To Rock We Salute You" + } + ] + }, + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fd5be94cf4cd63ab/request.json b/test-snapshots/query/fd5be94cf4cd63ab/request.json new file mode 100644 index 0000000..2065bfc --- /dev/null +++ b/test-snapshots/query/fd5be94cf4cd63ab/request.json @@ -0,0 +1,89 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "FK_TrackAlbumId": { + "type": "relationship", + "query": { + "fields": { + "AlbumId_0904": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_3757": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_6855": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10 + }, + "relationship": "__array_relationship", + "arguments": {} + } + }, + "limit": 10 + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fd63d8ef16a03331/expected.json b/test-snapshots/query/fd63d8ef16a03331/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fd63d8ef16a03331/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fd63d8ef16a03331/request.json b/test-snapshots/query/fd63d8ef16a03331/request.json new file mode 100644 index 0000000..4019b42 --- /dev/null +++ b/test-snapshots/query/fd63d8ef16a03331/request.json @@ -0,0 +1,56 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fd68d0845e7eeb21/expected.json b/test-snapshots/query/fd68d0845e7eeb21/expected.json new file mode 100644 index 0000000..af7daf6 --- /dev/null +++ b/test-snapshots/query/fd68d0845e7eeb21/expected.json @@ -0,0 +1,116 @@ +[ + { + "rows": [ + { + "AlbumId": 1, + "Bytes": 11170334, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 343719, + "Name": "For Those About To Rock (We Salute You)", + "TrackId": 1, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6566314, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 199836, + "Name": "C.O.D.", + "TrackId": 11, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6599424, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 203102, + "Name": "Snowballed", + "TrackId": 9, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6706347, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205688, + "Name": "Night Of The Long Knives", + "TrackId": 13, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6713451, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 205662, + "Name": "Put The Finger On You", + "TrackId": 6, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 6852860, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 210834, + "Name": "Inject The Venom", + "TrackId": 8, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 7636561, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 233926, + "Name": "Let's Get It Up", + "TrackId": 7, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8596840, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263288, + "Name": "Breaking The Rules", + "TrackId": 12, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8611245, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 263497, + "Name": "Evil Walks", + "TrackId": 10, + "UnitPrice": 0.99 + }, + { + "AlbumId": 1, + "Bytes": 8817038, + "Composer": "Angus Young, Malcolm Young, Brian Johnson", + "GenreId": 1, + "MediaTypeId": 1, + "Milliseconds": 270863, + "Name": "Spellbound", + "TrackId": 14, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fd68d0845e7eeb21/request.json b/test-snapshots/query/fd68d0845e7eeb21/request.json new file mode 100644 index 0000000..0b7efb5 --- /dev/null +++ b/test-snapshots/query/fd68d0845e7eeb21/request.json @@ -0,0 +1,114 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 1 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Composer", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Angus Young, Malcolm Young, Brian Johnson" + } + } + ] + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fd69dc3c916218e8/expected.json b/test-snapshots/query/fd69dc3c916218e8/expected.json new file mode 100644 index 0000000..ffc8d66 --- /dev/null +++ b/test-snapshots/query/fd69dc3c916218e8/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceDate_6216": "2013-12-22", + "InvoiceId_0995": 412 + }, + { + "InvoiceDate_6216": "2013-12-14", + "InvoiceId_0995": 411 + }, + { + "InvoiceDate_6216": "2013-12-09", + "InvoiceId_0995": 410 + }, + { + "InvoiceDate_6216": "2013-12-06", + "InvoiceId_0995": 409 + }, + { + "InvoiceDate_6216": "2013-12-05", + "InvoiceId_0995": 408 + }, + { + "InvoiceDate_6216": "2013-12-04", + "InvoiceId_0995": 406 + }, + { + "InvoiceDate_6216": "2013-12-04", + "InvoiceId_0995": 407 + }, + { + "InvoiceDate_6216": "2013-11-21", + "InvoiceId_0995": 405 + }, + { + "InvoiceDate_6216": "2013-11-13", + "InvoiceId_0995": 404 + }, + { + "InvoiceDate_6216": "2013-11-08", + "InvoiceId_0995": 403 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fd69dc3c916218e8/request.json b/test-snapshots/query/fd69dc3c916218e8/request.json new file mode 100644 index 0000000..c23328d --- /dev/null +++ b/test-snapshots/query/fd69dc3c916218e8/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "InvoiceDate_6216": { + "type": "column", + "column": "InvoiceDate", + "fields": null + }, + "InvoiceId_0995": { + "type": "column", + "column": "InvoiceId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "InvoiceDate", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fd73a57a05d56c23/expected.json b/test-snapshots/query/fd73a57a05d56c23/expected.json new file mode 100644 index 0000000..7819942 --- /dev/null +++ b/test-snapshots/query/fd73a57a05d56c23/expected.json @@ -0,0 +1,66 @@ +[ + { + "rows": [ + { + "Bytes_2355": 38747, + "MediaTypeId_0896": 1, + "Name_7249": "É Uma Partida De Futebol", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 161266, + "MediaTypeId_0896": 1, + "Name_7249": "Now Sports", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 211997, + "MediaTypeId_0896": 1, + "Name_7249": "A Statistic", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 224313, + "MediaTypeId_0896": 1, + "Name_7249": "Oprah", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 319888, + "MediaTypeId_0896": 1, + "Name_7249": "Commercial 1", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 387360, + "MediaTypeId_0896": 1, + "Name_7249": "The Real Problem", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 850698, + "MediaTypeId_0896": 1, + "Name_7249": "Commercial 2", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 967098, + "MediaTypeId_0896": 1, + "Name_7249": "Bossa", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 1039615, + "MediaTypeId_0896": 1, + "Name_7249": "Casinha Feliz", + "UnitPrice_8083": 0.99 + }, + { + "Bytes_2355": 1095012, + "MediaTypeId_0896": 1, + "Name_7249": "Deixa Entrar", + "UnitPrice_8083": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fd73a57a05d56c23/request.json b/test-snapshots/query/fd73a57a05d56c23/request.json new file mode 100644 index 0000000..17586d4 --- /dev/null +++ b/test-snapshots/query/fd73a57a05d56c23/request.json @@ -0,0 +1,42 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "UnitPrice_8083": { + "type": "column", + "column": "UnitPrice", + "fields": null + }, + "Bytes_2355": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Name_7249": { + "type": "column", + "column": "Name", + "fields": null + }, + "MediaTypeId_0896": { + "type": "column", + "column": "MediaTypeId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "Bytes", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fda63b4213314535/expected.json b/test-snapshots/query/fda63b4213314535/expected.json new file mode 100644 index 0000000..8f8ff9f --- /dev/null +++ b/test-snapshots/query/fda63b4213314535/expected.json @@ -0,0 +1,156 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + }, + { + "Address": "113 Lupus St", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 53, + "Email": "phil.hughes@gmail.com", + "Fax": null, + "FirstName": "Phil", + "LastName": "Hughes", + "Phone": "+44 020 7976 5722", + "PostalCode": "SW1V 3EN", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "12,Community Centre", + "City": "Delhi", + "Company": null, + "Country": "India", + "CustomerId": 58, + "Email": "manoj.pareek@rediff.com", + "Fax": null, + "FirstName": "Manoj", + "LastName": "Pareek", + "Phone": "+91 0124 39883988", + "PostalCode": "110017", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "1498 rue Bélanger", + "City": "Montréal", + "Company": null, + "Country": "Canada", + "CustomerId": 3, + "Email": "ftremblay@gmail.com", + "Fax": null, + "FirstName": "François", + "LastName": "Tremblay", + "Phone": "+1 (514) 721-4711", + "PostalCode": "H2G 1A7", + "State": "QC", + "SupportRepId": 3 + }, + { + "Address": "162 E Superior Street", + "City": "Chicago", + "Company": null, + "Country": "USA", + "CustomerId": 24, + "Email": "fralston@gmail.com", + "Fax": null, + "FirstName": "Frank", + "LastName": "Ralston", + "Phone": "+1 (312) 332-3232", + "PostalCode": "60611", + "State": "IL", + "SupportRepId": 3 + }, + { + "Address": "202 Hoxton Street", + "City": "London", + "Company": null, + "Country": "United Kingdom", + "CustomerId": 52, + "Email": "emma_jones@hotmail.com", + "Fax": null, + "FirstName": "Emma", + "LastName": "Jones", + "Phone": "+44 020 7707 0707", + "PostalCode": "N1 5LH", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "230 Elgin Street", + "City": "Ottawa", + "Company": null, + "Country": "Canada", + "CustomerId": 30, + "Email": "edfrancis@yachoo.ca", + "Fax": null, + "FirstName": "Edward", + "LastName": "Francis", + "Phone": "+1 (613) 234-3322", + "PostalCode": "K2P 1L7", + "State": "ON", + "SupportRepId": 3 + }, + { + "Address": "3 Chatham Street", + "City": "Dublin", + "Company": null, + "Country": "Ireland", + "CustomerId": 46, + "Email": "hughoreilly@apple.ie", + "Fax": null, + "FirstName": "Hugh", + "LastName": "O'Reilly", + "Phone": "+353 01 6792424", + "PostalCode": null, + "State": "Dublin", + "SupportRepId": 3 + }, + { + "Address": "3,Raj Bhavan Road", + "City": "Bangalore", + "Company": null, + "Country": "India", + "CustomerId": 59, + "Email": "puja_srivastava@yahoo.in", + "Fax": null, + "FirstName": "Puja", + "LastName": "Srivastava", + "Phone": "+91 080 22289999", + "PostalCode": "560001", + "State": null, + "SupportRepId": 3 + }, + { + "Address": "5112 48 Street", + "City": "Yellowknife", + "Company": null, + "Country": "Canada", + "CustomerId": 33, + "Email": "ellie.sullivan@shaw.ca", + "Fax": null, + "FirstName": "Ellie", + "LastName": "Sullivan", + "Phone": "+1 (867) 920-2233", + "PostalCode": "X1A 1N6", + "State": "NT", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fda63b4213314535/request.json b/test-snapshots/query/fda63b4213314535/request.json new file mode 100644 index 0000000..084ea0c --- /dev/null +++ b/test-snapshots/query/fda63b4213314535/request.json @@ -0,0 +1,105 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "LastName", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Peacock" + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fde92a8876d0367d/expected.json b/test-snapshots/query/fde92a8876d0367d/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fde92a8876d0367d/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fde92a8876d0367d/request.json b/test-snapshots/query/fde92a8876d0367d/request.json new file mode 100644 index 0000000..2be5ace --- /dev/null +++ b/test-snapshots/query/fde92a8876d0367d/request.json @@ -0,0 +1,132 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 233 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "CustomerId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fdf0dee29000da03/expected.json b/test-snapshots/query/fdf0dee29000da03/expected.json new file mode 100644 index 0000000..3d6c8fe --- /dev/null +++ b/test-snapshots/query/fdf0dee29000da03/expected.json @@ -0,0 +1,10 @@ +[ + { + "rows": [ + { + "GenreId": 1, + "Name": "Rock" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fdf0dee29000da03/request.json b/test-snapshots/query/fdf0dee29000da03/request.json new file mode 100644 index 0000000..7841851 --- /dev/null +++ b/test-snapshots/query/fdf0dee29000da03/request.json @@ -0,0 +1,50 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 13 + } + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fdf4b3477d94f31d/expected.json b/test-snapshots/query/fdf4b3477d94f31d/expected.json new file mode 100644 index 0000000..89f3134 --- /dev/null +++ b/test-snapshots/query/fdf4b3477d94f31d/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + {}, + {}, + {}, + {}, + {} + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fdf4b3477d94f31d/request.json b/test-snapshots/query/fdf4b3477d94f31d/request.json new file mode 100644 index 0000000..03194b2 --- /dev/null +++ b/test-snapshots/query/fdf4b3477d94f31d/request.json @@ -0,0 +1,29 @@ +{ + "collection": "chinook.MediaType", + "query": { + "fields": {}, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "MediaTypeId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fe00ca3b21cf8359/expected.json b/test-snapshots/query/fe00ca3b21cf8359/expected.json new file mode 100644 index 0000000..902c622 --- /dev/null +++ b/test-snapshots/query/fe00ca3b21cf8359/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceLineId_5417": 578, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 1727, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 1153, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 577, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 1726, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 1152, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 576, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 575, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 1151, + "Quantity_5566": 1 + }, + { + "InvoiceLineId_5417": 574, + "Quantity_5566": 1 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe00ca3b21cf8359/request.json b/test-snapshots/query/fe00ca3b21cf8359/request.json new file mode 100644 index 0000000..7d887d5 --- /dev/null +++ b/test-snapshots/query/fe00ca3b21cf8359/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "Quantity_5566": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "InvoiceLineId_5417": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "TrackId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fe0f3b39612f9070/expected.json b/test-snapshots/query/fe0f3b39612f9070/expected.json new file mode 100644 index 0000000..f29d9d1 --- /dev/null +++ b/test-snapshots/query/fe0f3b39612f9070/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "Name_5979": "TV Shows", + "PlaylistId_2939": 3 + }, + { + "Name_5979": "TV Shows", + "PlaylistId_2939": 10 + }, + { + "Name_5979": "On-The-Go 1", + "PlaylistId_2939": 18 + }, + { + "Name_5979": "Music Videos", + "PlaylistId_2939": 9 + }, + { + "Name_5979": "Music", + "PlaylistId_2939": 1 + }, + { + "Name_5979": "Music", + "PlaylistId_2939": 8 + }, + { + "Name_5979": "Movies", + "PlaylistId_2939": 2 + }, + { + "Name_5979": "Movies", + "PlaylistId_2939": 7 + }, + { + "Name_5979": "Heavy Metal Classic", + "PlaylistId_2939": 17 + }, + { + "Name_5979": "Grunge", + "PlaylistId_2939": 16 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe0f3b39612f9070/request.json b/test-snapshots/query/fe0f3b39612f9070/request.json new file mode 100644 index 0000000..8840313 --- /dev/null +++ b/test-snapshots/query/fe0f3b39612f9070/request.json @@ -0,0 +1,40 @@ +{ + "collection": "chinook.Playlist", + "query": { + "fields": { + "Name_5979": { + "type": "column", + "column": "Name", + "fields": null + }, + "PlaylistId_2939": { + "type": "column", + "column": "PlaylistId", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "PlaylistId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fe1cd40d037ff4c0/expected.json b/test-snapshots/query/fe1cd40d037ff4c0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fe1cd40d037ff4c0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe1cd40d037ff4c0/request.json b/test-snapshots/query/fe1cd40d037ff4c0/request.json new file mode 100644 index 0000000..4ea3069 --- /dev/null +++ b/test-snapshots/query/fe1cd40d037ff4c0/request.json @@ -0,0 +1,65 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Billy Cobham" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 101 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fe3b3f9443b3180f/expected.json b/test-snapshots/query/fe3b3f9443b3180f/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fe3b3f9443b3180f/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe3b3f9443b3180f/request.json b/test-snapshots/query/fe3b3f9443b3180f/request.json new file mode 100644 index 0000000..f7a4b81 --- /dev/null +++ b/test-snapshots/query/fe3b3f9443b3180f/request.json @@ -0,0 +1,82 @@ +{ + "collection": "chinook.PlaylistTrack", + "query": { + "fields": { + "PlaylistId": { + "type": "column", + "column": "PlaylistId", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Audiobooks" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "PlaylistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 17 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "PlaylistId": "PlaylistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Playlist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fe482c88220f3d76/expected.json b/test-snapshots/query/fe482c88220f3d76/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fe482c88220f3d76/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe482c88220f3d76/request.json b/test-snapshots/query/fe482c88220f3d76/request.json new file mode 100644 index 0000000..13d8def --- /dev/null +++ b/test-snapshots/query/fe482c88220f3d76/request.json @@ -0,0 +1,160 @@ +{ + "collection": "chinook.Employee", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "BirthDate": { + "type": "column", + "column": "BirthDate", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "EmployeeId": { + "type": "column", + "column": "EmployeeId", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "HireDate": { + "type": "column", + "column": "HireDate", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "ReportsTo": { + "type": "column", + "column": "ReportsTo", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "General Manager" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Email", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "jane@chinookcorp.com" + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ReportsTo", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 6 + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ReportsTo": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fe4c6aae7bc02e06/expected.json b/test-snapshots/query/fe4c6aae7bc02e06/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fe4c6aae7bc02e06/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe4c6aae7bc02e06/request.json b/test-snapshots/query/fe4c6aae7bc02e06/request.json new file mode 100644 index 0000000..6e488ca --- /dev/null +++ b/test-snapshots/query/fe4c6aae7bc02e06/request.json @@ -0,0 +1,116 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "Bytes": { + "type": "column", + "column": "Bytes", + "fields": null + }, + "Composer": { + "type": "column", + "column": "Composer", + "fields": null + }, + "GenreId": { + "type": "column", + "column": "GenreId", + "fields": null + }, + "MediaTypeId": { + "type": "column", + "column": "MediaTypeId", + "fields": null + }, + "Milliseconds": { + "type": "column", + "column": "Milliseconds", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Powerslave" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 90 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "AlbumId": "AlbumId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fe59bc4fc81e12b8/expected.json b/test-snapshots/query/fe59bc4fc81e12b8/expected.json new file mode 100644 index 0000000..735368b --- /dev/null +++ b/test-snapshots/query/fe59bc4fc81e12b8/expected.json @@ -0,0 +1,86 @@ +[ + { + "rows": [ + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2009-04-22", + "InvoiceId_4081": 27, + "Total_9640": 0.99 + }, + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2010-10-14", + "InvoiceId_4081": 148, + "Total_9640": 1.98 + }, + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2010-11-24", + "InvoiceId_4081": 159, + "Total_9640": 13.86 + }, + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2011-07-25", + "InvoiceId_4081": 214, + "Total_9640": 8.91 + }, + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2013-02-28", + "InvoiceId_4081": 343, + "Total_9640": 1.98 + }, + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2013-06-02", + "InvoiceId_4081": 366, + "Total_9640": 3.96 + }, + { + "BillingAddress_7004": "5112 48 Street", + "BillingCity_8387": "Yellowknife", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2013-09-04", + "InvoiceId_4081": 388, + "Total_9640": 5.94 + }, + { + "BillingAddress_7004": "700 W Pender Street", + "BillingCity_8387": "Vancouver", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2009-06-05", + "InvoiceId_4081": 36, + "Total_9640": 1.98 + }, + { + "BillingAddress_7004": "700 W Pender Street", + "BillingCity_8387": "Vancouver", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2009-07-16", + "InvoiceId_4081": 47, + "Total_9640": 13.86 + }, + { + "BillingAddress_7004": "700 W Pender Street", + "BillingCity_8387": "Vancouver", + "BillingCountry_8273": "Canada", + "InvoiceDate_7420": "2010-03-16", + "InvoiceId_4081": 102, + "Total_9640": 9.91 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe59bc4fc81e12b8/request.json b/test-snapshots/query/fe59bc4fc81e12b8/request.json new file mode 100644 index 0000000..6dd1c0f --- /dev/null +++ b/test-snapshots/query/fe59bc4fc81e12b8/request.json @@ -0,0 +1,68 @@ +{ + "collection": "chinook.Invoice", + "query": { + "fields": { + "BillingAddress_7004": { + "type": "column", + "column": "BillingAddress", + "fields": null + }, + "BillingCity_8387": { + "type": "column", + "column": "BillingCity", + "fields": null + }, + "BillingCountry_8273": { + "type": "column", + "column": "BillingCountry", + "fields": null + }, + "Total_9640": { + "type": "column", + "column": "Total", + "fields": null + }, + "InvoiceId_4081": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceDate_7420": { + "type": "column", + "column": "InvoiceDate", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingCity", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "BillingState", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fe6950bc2e48e4da/expected.json b/test-snapshots/query/fe6950bc2e48e4da/expected.json new file mode 100644 index 0000000..7d914eb --- /dev/null +++ b/test-snapshots/query/fe6950bc2e48e4da/expected.json @@ -0,0 +1,46 @@ +[ + { + "rows": [ + { + "InvoiceId_9807": 1, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 1, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 2, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 2, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 2, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 2, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 3, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 3, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 3, + "UnitPrice_4197": 0.99 + }, + { + "InvoiceId_9807": 3, + "UnitPrice_4197": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe6950bc2e48e4da/request.json b/test-snapshots/query/fe6950bc2e48e4da/request.json new file mode 100644 index 0000000..c6da467 --- /dev/null +++ b/test-snapshots/query/fe6950bc2e48e4da/request.json @@ -0,0 +1,32 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId_9807": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "UnitPrice_4197": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/fe6d410d8130c9b3/expected.json b/test-snapshots/query/fe6d410d8130c9b3/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fe6d410d8130c9b3/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe6d410d8130c9b3/request.json b/test-snapshots/query/fe6d410d8130c9b3/request.json new file mode 100644 index 0000000..0f70675 --- /dev/null +++ b/test-snapshots/query/fe6d410d8130c9b3/request.json @@ -0,0 +1,87 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 106 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Name", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Men At Work" + } + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Artist", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fe9f50271470edd1/expected.json b/test-snapshots/query/fe9f50271470edd1/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/fe9f50271470edd1/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fe9f50271470edd1/request.json b/test-snapshots/query/fe9f50271470edd1/request.json new file mode 100644 index 0000000..7e72780 --- /dev/null +++ b/test-snapshots/query/fe9f50271470edd1/request.json @@ -0,0 +1,81 @@ +{ + "collection": "chinook.Artist", + "query": { + "fields": { + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Name": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Iron Maiden" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "ArtistId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 8 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "AlbumId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "ArtistId": "ArtistId" + }, + "relationship_type": "array", + "target_collection": "chinook.Album", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/fed5026f3a008598/expected.json b/test-snapshots/query/fed5026f3a008598/expected.json new file mode 100644 index 0000000..139da0b --- /dev/null +++ b/test-snapshots/query/fed5026f3a008598/expected.json @@ -0,0 +1,76 @@ +[ + { + "rows": [ + { + "InvoiceId": 15, + "InvoiceLineId": 77, + "Quantity": 1, + "TrackId": 466, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 15, + "InvoiceLineId": 78, + "Quantity": 1, + "TrackId": 468, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1139, + "Quantity": 1, + "TrackId": 3456, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 210, + "InvoiceLineId": 1140, + "Quantity": 1, + "TrackId": 3457, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1257, + "Quantity": 1, + "TrackId": 656, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1258, + "Quantity": 1, + "TrackId": 658, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1259, + "Quantity": 1, + "TrackId": 660, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 233, + "InvoiceLineId": 1260, + "Quantity": 1, + "TrackId": 662, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1375, + "Quantity": 1, + "TrackId": 1362, + "UnitPrice": 0.99 + }, + { + "InvoiceId": 255, + "InvoiceLineId": 1376, + "Quantity": 1, + "TrackId": 1366, + "UnitPrice": 0.99 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/fed5026f3a008598/request.json b/test-snapshots/query/fed5026f3a008598/request.json new file mode 100644 index 0000000..711792c --- /dev/null +++ b/test-snapshots/query/fed5026f3a008598/request.json @@ -0,0 +1,97 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Cupertino" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCity", + "path": [] + }, + "operator": "is_null" + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ff1a01dbf3bf20cf/expected.json b/test-snapshots/query/ff1a01dbf3bf20cf/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ff1a01dbf3bf20cf/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ff1a01dbf3bf20cf/request.json b/test-snapshots/query/ff1a01dbf3bf20cf/request.json new file mode 100644 index 0000000..e4b0f89 --- /dev/null +++ b/test-snapshots/query/ff1a01dbf3bf20cf/request.json @@ -0,0 +1,110 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 26 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "is_null" + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "98052-8300" + } + } + ] + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2012-01-24" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "InvoiceId": "InvoiceId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ff37c1e04ab6cd56/expected.json b/test-snapshots/query/ff37c1e04ab6cd56/expected.json new file mode 100644 index 0000000..f2b5cba --- /dev/null +++ b/test-snapshots/query/ff37c1e04ab6cd56/expected.json @@ -0,0 +1,21 @@ +[ + { + "rows": [ + { + "Address": "1 Infinite Loop", + "City": "Cupertino", + "Company": "Apple Inc.", + "Country": "USA", + "CustomerId": 19, + "Email": "tgoyer@apple.com", + "Fax": "+1 (408) 996-1011", + "FirstName": "Tim", + "LastName": "Goyer", + "Phone": "+1 (408) 996-1010", + "PostalCode": "95014", + "State": "CA", + "SupportRepId": 3 + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ff37c1e04ab6cd56/request.json b/test-snapshots/query/ff37c1e04ab6cd56/request.json new file mode 100644 index 0000000..23c4b3c --- /dev/null +++ b/test-snapshots/query/ff37c1e04ab6cd56/request.json @@ -0,0 +1,150 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingPostalCode", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "95014" + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 26 + } + }, + { + "type": "or", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "USA" + } + }, + { + "type": "unary_comparison_operator", + "column": { + "type": "column", + "name": "BillingCountry", + "path": [] + }, + "operator": "is_null" + } + ] + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "CustomerId": "CustomerId" + }, + "relationship_type": "array", + "target_collection": "chinook.Invoice", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/ff3f85a684449fed/expected.json b/test-snapshots/query/ff3f85a684449fed/expected.json new file mode 100644 index 0000000..6877a1e --- /dev/null +++ b/test-snapshots/query/ff3f85a684449fed/expected.json @@ -0,0 +1,11 @@ +[ + { + "rows": [ + { + "AlbumId": 104, + "ArtistId": 90, + "Title": "Live At Donington 1992 (Disc 2)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ff3f85a684449fed/request.json b/test-snapshots/query/ff3f85a684449fed/request.json new file mode 100644 index 0000000..c98e281 --- /dev/null +++ b/test-snapshots/query/ff3f85a684449fed/request.json @@ -0,0 +1,38 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "Title", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "Live At Donington 1992 (Disc 2)" + } + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ffc29cae212d6a63/expected.json b/test-snapshots/query/ffc29cae212d6a63/expected.json new file mode 100644 index 0000000..1f50475 --- /dev/null +++ b/test-snapshots/query/ffc29cae212d6a63/expected.json @@ -0,0 +1,56 @@ +[ + { + "rows": [ + { + "AlbumId_7527": 347, + "ArtistId_9061": 275, + "Title_1250": "Koyaanisqatsi (Soundtrack from the Motion Picture)" + }, + { + "AlbumId_7527": 346, + "ArtistId_9061": 274, + "Title_1250": "Mozart: Chamber Music" + }, + { + "AlbumId_7527": 345, + "ArtistId_9061": 273, + "Title_1250": "Monteverdi: L'Orfeo" + }, + { + "AlbumId_7527": 344, + "ArtistId_9061": 272, + "Title_1250": "Schubert: The Late String Quartets & String Quintet (3 CD's)" + }, + { + "AlbumId_7527": 343, + "ArtistId_9061": 226, + "Title_1250": "Respighi:Pines of Rome" + }, + { + "AlbumId_7527": 342, + "ArtistId_9061": 271, + "Title_1250": "Locatelli: Concertos for Violin, Strings and Continuo, Vol. 3" + }, + { + "AlbumId_7527": 341, + "ArtistId_9061": 270, + "Title_1250": "Great Recordings of the Century - Shubert: Schwanengesang, 4 Lieder" + }, + { + "AlbumId_7527": 340, + "ArtistId_9061": 269, + "Title_1250": "Liszt - 12 Études D'Execution Transcendante" + }, + { + "AlbumId_7527": 339, + "ArtistId_9061": 268, + "Title_1250": "Great Recordings of the Century: Paganini's 24 Caprices" + }, + { + "AlbumId_7527": 338, + "ArtistId_9061": 267, + "Title_1250": "Nielsen: The Six Symphonies" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ffc29cae212d6a63/request.json b/test-snapshots/query/ffc29cae212d6a63/request.json new file mode 100644 index 0000000..c3f8566 --- /dev/null +++ b/test-snapshots/query/ffc29cae212d6a63/request.json @@ -0,0 +1,53 @@ +{ + "collection": "chinook.Album", + "query": { + "fields": { + "AlbumId_7527": { + "type": "column", + "column": "AlbumId", + "fields": null + }, + "ArtistId_9061": { + "type": "column", + "column": "ArtistId", + "fields": null + }, + "Title_1250": { + "type": "column", + "column": "Title", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "AlbumId", + "path": [] + } + }, + { + "order_direction": "asc", + "target": { + "type": "column", + "name": "ArtistId", + "path": [] + } + }, + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Title", + "path": [] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ffe7cb9a012363f4/expected.json b/test-snapshots/query/ffe7cb9a012363f4/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ffe7cb9a012363f4/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ffe7cb9a012363f4/request.json b/test-snapshots/query/ffe7cb9a012363f4/request.json new file mode 100644 index 0000000..a72dfa2 --- /dev/null +++ b/test-snapshots/query/ffe7cb9a012363f4/request.json @@ -0,0 +1,66 @@ +{ + "collection": "chinook.InvoiceLine", + "query": { + "fields": { + "InvoiceId": { + "type": "column", + "column": "InvoiceId", + "fields": null + }, + "InvoiceLineId": { + "type": "column", + "column": "InvoiceLineId", + "fields": null + }, + "Quantity": { + "type": "column", + "column": "Quantity", + "fields": null + }, + "TrackId": { + "type": "column", + "column": "TrackId", + "fields": null + }, + "UnitPrice": { + "type": "column", + "column": "UnitPrice", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceLineId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 536 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "InvoiceId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 10 + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": {} +} \ No newline at end of file diff --git a/test-snapshots/query/ffe8ed551d55bcf0/expected.json b/test-snapshots/query/ffe8ed551d55bcf0/expected.json new file mode 100644 index 0000000..9698cf2 --- /dev/null +++ b/test-snapshots/query/ffe8ed551d55bcf0/expected.json @@ -0,0 +1,5 @@ +[ + { + "rows": [] + } +] \ No newline at end of file diff --git a/test-snapshots/query/ffe8ed551d55bcf0/request.json b/test-snapshots/query/ffe8ed551d55bcf0/request.json new file mode 100644 index 0000000..1dc5f42 --- /dev/null +++ b/test-snapshots/query/ffe8ed551d55bcf0/request.json @@ -0,0 +1,123 @@ +{ + "collection": "chinook.Customer", + "query": { + "fields": { + "Address": { + "type": "column", + "column": "Address", + "fields": null + }, + "City": { + "type": "column", + "column": "City", + "fields": null + }, + "Company": { + "type": "column", + "column": "Company", + "fields": null + }, + "Country": { + "type": "column", + "column": "Country", + "fields": null + }, + "CustomerId": { + "type": "column", + "column": "CustomerId", + "fields": null + }, + "Email": { + "type": "column", + "column": "Email", + "fields": null + }, + "Fax": { + "type": "column", + "column": "Fax", + "fields": null + }, + "FirstName": { + "type": "column", + "column": "FirstName", + "fields": null + }, + "LastName": { + "type": "column", + "column": "LastName", + "fields": null + }, + "Phone": { + "type": "column", + "column": "Phone", + "fields": null + }, + "PostalCode": { + "type": "column", + "column": "PostalCode", + "fields": null + }, + "State": { + "type": "column", + "column": "State", + "fields": null + }, + "SupportRepId": { + "type": "column", + "column": "SupportRepId", + "fields": null + } + }, + "limit": 10, + "predicate": { + "type": "exists", + "in_collection": { + "type": "related", + "relationship": "__array_relationship", + "arguments": {} + }, + "predicate": { + "type": "and", + "expressions": [ + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "EmployeeId", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": 7 + } + }, + { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "HireDate", + "path": [] + }, + "operator": "equal", + "value": { + "type": "scalar", + "value": "2003-10-17" + } + } + ] + } + } + }, + "arguments": {}, + "collection_relationships": { + "__array_relationship": { + "column_mapping": { + "SupportRepId": "EmployeeId" + }, + "relationship_type": "array", + "target_collection": "chinook.Employee", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/order_by_aggregate/expected.json b/test-snapshots/query/order_by_aggregate/expected.json new file mode 100644 index 0000000..0000976 --- /dev/null +++ b/test-snapshots/query/order_by_aggregate/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6228": "Alternative & Punk" + }, + { + "Name_6228": "Metal" + }, + { + "Name_6228": "Jazz" + }, + { + "Name_6228": "Rock" + }, + { + "Name_6228": "Alternative" + }, + { + "Name_6228": "Blues" + }, + { + "Name_6228": "Bossa Nova" + }, + { + "Name_6228": "Classical" + }, + { + "Name_6228": "Comedy" + }, + { + "Name_6228": "Drama" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/order_by_aggregate/request.json b/test-snapshots/query/order_by_aggregate/request.json new file mode 100644 index 0000000..356159a --- /dev/null +++ b/test-snapshots/query/order_by_aggregate/request.json @@ -0,0 +1,55 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_6228": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "single_column_aggregate", + "column": "Name", + "function": "min", + "path": [ + { + "relationship": "GenreToTrack", + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "less", + "value": { + "type": "scalar", + "value": 100 + } + }, + "arguments": {} + } + ] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": { + "GenreToTrack": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/order_by_count_star/expected.json b/test-snapshots/query/order_by_count_star/expected.json new file mode 100644 index 0000000..9488bb5 --- /dev/null +++ b/test-snapshots/query/order_by_count_star/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6228": "Alternative & Punk" + }, + { + "Name_6228": "Jazz" + }, + { + "Name_6228": "Metal" + }, + { + "Name_6228": "Rock" + }, + { + "Name_6228": "Alternative" + }, + { + "Name_6228": "Blues" + }, + { + "Name_6228": "Bossa Nova" + }, + { + "Name_6228": "Classical" + }, + { + "Name_6228": "Comedy" + }, + { + "Name_6228": "Drama" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/order_by_count_star/request.json b/test-snapshots/query/order_by_count_star/request.json new file mode 100644 index 0000000..0f56465 --- /dev/null +++ b/test-snapshots/query/order_by_count_star/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Genre", + "query": { + "fields": { + "Name_6228": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "star_count_aggregate", + "name": "Name", + "path": [ + { + "relationship": "GenreToTrack", + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "TrackId", + "path": [] + }, + "operator": "less", + "value": { + "type": "scalar", + "value": 100 + } + }, + "arguments": {} + } + ] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": { + "GenreToTrack": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "array", + "target_collection": "chinook.Track", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/query/order_by_relationship/expected.json b/test-snapshots/query/order_by_relationship/expected.json new file mode 100644 index 0000000..4f3371b --- /dev/null +++ b/test-snapshots/query/order_by_relationship/expected.json @@ -0,0 +1,36 @@ +[ + { + "rows": [ + { + "Name_6228": "A Moça e a Chuva" + }, + { + "Name_6228": "Aos Leões" + }, + { + "Name_6228": "Beijo do Olhar" + }, + { + "Name_6228": "Borogodo" + }, + { + "Name_6228": "Cafezinho" + }, + { + "Name_6228": "Choramingando" + }, + { + "Name_6228": "Cuando A Noite Vai Chegando" + }, + { + "Name_6228": "Cuando Eu For Pro Ceu" + }, + { + "Name_6228": "Demorou!" + }, + { + "Name_6228": "Din Din Wo (Little Child)" + } + ] + } +] \ No newline at end of file diff --git a/test-snapshots/query/order_by_relationship/request.json b/test-snapshots/query/order_by_relationship/request.json new file mode 100644 index 0000000..e8888b9 --- /dev/null +++ b/test-snapshots/query/order_by_relationship/request.json @@ -0,0 +1,54 @@ +{ + "collection": "chinook.Track", + "query": { + "fields": { + "Name_6228": { + "type": "column", + "column": "Name", + "fields": null + } + }, + "limit": 10, + "order_by": { + "elements": [ + { + "order_direction": "desc", + "target": { + "type": "column", + "name": "Name", + "path": [ + { + "relationship": "GenreToTrack", + "predicate": { + "type": "binary_comparison_operator", + "column": { + "type": "column", + "name": "GenreId", + "path": [] + }, + "operator": "less", + "value": { + "type": "scalar", + "value": 100 + } + }, + "arguments": {} + } + ] + } + } + ] + } + }, + "arguments": {}, + "collection_relationships": { + "GenreToTrack": { + "column_mapping": { + "GenreId": "GenreId" + }, + "relationship_type": "object", + "target_collection": "chinook.Genre", + "arguments": {} + } + } +} \ No newline at end of file diff --git a/test-snapshots/schema b/test-snapshots/schema new file mode 100644 index 0000000..49afb88 --- /dev/null +++ b/test-snapshots/schema @@ -0,0 +1,1230 @@ +{ + "scalar_types": { + "BLOB": { + "aggregate_functions": { + "any_value": { + "result_type": { + "type": "named", + "name": "BLOB" + } + }, + "count": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "group_concat": { + "result_type": { + "type": "named", + "name": "BLOB" + } + }, + "max": { + "result_type": { + "type": "named", + "name": "BLOB" + } + }, + "min": { + "result_type": { + "type": "named", + "name": "BLOB" + } + } + }, + "comparison_operators": { + "equal": { + "type": "equal" + }, + "greater": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "BLOB" + } + }, + "greater_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "BLOB" + } + }, + "less": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "BLOB" + } + }, + "less_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "BLOB" + } + }, + "like": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "BLOB" + } + } + } + }, + "DATETIME": { + "aggregate_functions": { + "any_value": { + "result_type": { + "type": "named", + "name": "DATETIME" + } + }, + "count": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "max": { + "result_type": { + "type": "named", + "name": "DATETIME" + } + }, + "min": { + "result_type": { + "type": "named", + "name": "DATETIME" + } + } + }, + "comparison_operators": { + "equal": { + "type": "equal" + }, + "greater": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "DATETIME" + } + }, + "greater_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "DATETIME" + } + }, + "less": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "DATETIME" + } + }, + "less_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "DATETIME" + } + } + } + }, + "INTEGER": { + "aggregate_functions": { + "any_value": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "avg": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "count": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "max": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "median": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "min": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "std": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "stddev": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "stddev_pop": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "stddev_samp": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "sum": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "var_samp": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "variance": { + "result_type": { + "type": "named", + "name": "REAL" + } + } + }, + "comparison_operators": { + "equal": { + "type": "equal" + }, + "greater": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "INTEGER" + } + }, + "greater_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "INTEGER" + } + }, + "less": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "INTEGER" + } + }, + "less_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "INTEGER" + } + } + } + }, + "OTHER": { + "aggregate_functions": { + "any_value": { + "result_type": { + "type": "named", + "name": "OTHER" + } + }, + "count": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + } + }, + "comparison_operators": { + "equal": { + "type": "equal" + } + } + }, + "REAL": { + "aggregate_functions": { + "any_value": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "avg": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "count": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "max": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "median": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "min": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "std": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "stddev": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "stddev_pop": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "stddev_samp": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "sum": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "var_samp": { + "result_type": { + "type": "named", + "name": "REAL" + } + }, + "variance": { + "result_type": { + "type": "named", + "name": "REAL" + } + } + }, + "comparison_operators": { + "equal": { + "type": "equal" + }, + "greater": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "REAL" + } + }, + "greater_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "REAL" + } + }, + "less": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "REAL" + } + }, + "less_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "REAL" + } + } + } + }, + "STRING": { + "aggregate_functions": { + "any_value": { + "result_type": { + "type": "named", + "name": "STRING" + } + }, + "count": { + "result_type": { + "type": "named", + "name": "INTEGER" + } + }, + "group_concat": { + "result_type": { + "type": "named", + "name": "STRING" + } + }, + "max": { + "result_type": { + "type": "named", + "name": "STRING" + } + }, + "min": { + "result_type": { + "type": "named", + "name": "STRING" + } + } + }, + "comparison_operators": { + "equal": { + "type": "equal" + }, + "greater": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "STRING" + } + }, + "greater_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "STRING" + } + }, + "less": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "STRING" + } + }, + "less_or_equal": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "STRING" + } + }, + "like": { + "type": "custom", + "argument_type": { + "type": "named", + "name": "STRING" + } + } + } + } + }, + "object_types": { + "chinook.Album": { + "description": "", + "fields": { + "AlbumId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "ArtistId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Title": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + } + } + }, + "chinook.Artist": { + "description": "", + "fields": { + "ArtistId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Name": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + } + } + }, + "chinook.Customer": { + "description": "", + "fields": { + "Address": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "City": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "Company": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "Country": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "CustomerId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Email": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + }, + "Fax": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "FirstName": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + }, + "LastName": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + }, + "Phone": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "PostalCode": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "State": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "SupportRepId": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "INTEGER" + } + } + } + } + }, + "chinook.Employee": { + "description": "", + "fields": { + "Address": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "BirthDate": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "DATETIME" + } + } + }, + "City": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "Country": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "Email": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "EmployeeId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Fax": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "FirstName": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + }, + "HireDate": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "DATETIME" + } + } + }, + "LastName": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + }, + "Phone": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "PostalCode": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "ReportsTo": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "INTEGER" + } + } + }, + "State": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "Title": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + } + } + }, + "chinook.Genre": { + "description": "", + "fields": { + "GenreId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Name": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + } + } + }, + "chinook.Invoice": { + "description": "", + "fields": { + "BillingAddress": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "BillingCity": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "BillingCountry": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "BillingPostalCode": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "BillingState": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "CustomerId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "InvoiceDate": { + "description": "", + "type": { + "type": "named", + "name": "DATETIME" + } + }, + "InvoiceId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Total": { + "description": "", + "type": { + "type": "named", + "name": "REAL" + } + } + } + }, + "chinook.InvoiceLine": { + "description": "", + "fields": { + "InvoiceId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "InvoiceLineId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Quantity": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "TrackId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "UnitPrice": { + "description": "", + "type": { + "type": "named", + "name": "REAL" + } + } + } + }, + "chinook.MediaType": { + "description": "", + "fields": { + "MediaTypeId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Name": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + } + } + }, + "chinook.Playlist": { + "description": "", + "fields": { + "Name": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "PlaylistId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + } + } + }, + "chinook.PlaylistTrack": { + "description": "", + "fields": { + "PlaylistId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "TrackId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + } + } + }, + "chinook.Track": { + "description": "", + "fields": { + "AlbumId": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "INTEGER" + } + } + }, + "Bytes": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "INTEGER" + } + } + }, + "Composer": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "STRING" + } + } + }, + "GenreId": { + "description": "", + "type": { + "type": "nullable", + "underlying_type": { + "type": "named", + "name": "INTEGER" + } + } + }, + "MediaTypeId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Milliseconds": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "Name": { + "description": "", + "type": { + "type": "named", + "name": "STRING" + } + }, + "TrackId": { + "description": "", + "type": { + "type": "named", + "name": "INTEGER" + } + }, + "UnitPrice": { + "description": "", + "type": { + "type": "named", + "name": "REAL" + } + } + } + } + }, + "collections": [ + { + "name": "chinook.Album", + "description": "", + "arguments": {}, + "type": "chinook.Album", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "AlbumId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Artist", + "description": "", + "arguments": {}, + "type": "chinook.Artist", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "ArtistId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Customer", + "description": "", + "arguments": {}, + "type": "chinook.Customer", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "CustomerId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Employee", + "description": "", + "arguments": {}, + "type": "chinook.Employee", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "EmployeeId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Genre", + "description": "", + "arguments": {}, + "type": "chinook.Genre", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "GenreId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Invoice", + "description": "", + "arguments": {}, + "type": "chinook.Invoice", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "InvoiceId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.InvoiceLine", + "description": "", + "arguments": {}, + "type": "chinook.InvoiceLine", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "InvoiceLineId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.MediaType", + "description": "", + "arguments": {}, + "type": "chinook.MediaType", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "MediaTypeId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Playlist", + "description": "", + "arguments": {}, + "type": "chinook.Playlist", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "PlaylistId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.PlaylistTrack", + "description": "", + "arguments": {}, + "type": "chinook.PlaylistTrack", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "PlaylistId", + "TrackId" + ] + } + }, + "foreign_keys": {} + }, + { + "name": "chinook.Track", + "description": "", + "arguments": {}, + "type": "chinook.Track", + "uniqueness_constraints": { + "PRIMARY": { + "unique_columns": [ + "TrackId" + ] + } + }, + "foreign_keys": {} + } + ], + "functions": [], + "procedures": [] +} \ No newline at end of file