Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
# carries, or a change to them is not exercised until after it merges.
# Consumers use the action; this repository owns the rules.
- name: Refuse a skip, and a suite that shrank
run: tools/check-test-outcome.py "$RUNNER_TEMP/pytest.log" --min-tests 317
run: tools/check-test-outcome.py "$RUNNER_TEMP/pytest.log" --min-tests 337

# The rules earn their place by refusing a log that carries what they
# name. Both fixtures are written here rather than tracked, and the
Expand Down
62 changes: 62 additions & 0 deletions meta/sql-columns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "./sql-columns.schema.json",
"description": "The columns of rows a SQL function returns whose value MEOS does not state. parser/sqlfn.py feeds every column of a returned row from the C value of its type: the value or array the function returns, or an out-parameter. A column its wrapper computes rather than reads is declared here, keyed by the composite type the function returns, or by its SQL name when it returns record; a row with a column neither fed nor declared stops the catalog.",
"rows": {
"index_tbox": {
"note": "The tiles of a temporal box: index numbers them from 1 in the order the MEOS array returns them.",
"columns": {"index": {"from": "ordinal"}}
},
"index_stbox": {
"note": "The tiles of a spatiotemporal box: index numbers them from 1 in the order the MEOS array returns them.",
"columns": {"index": {"from": "ordinal"}}
},
"aDisjointPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"aDwithinPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"aIntersectsPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"aTouchesPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"eDisjointPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"eDwithinPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"eIntersectsPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"eTouchesPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"tDisjointPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"tDwithinPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"tIntersectsPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
},
"tTouchesPairs": {
"note": "i and j are positions in the SQL arrays, from 1; MEOS returns the C indices, from 0.",
"columns": {"i": {"offset": 1}, "j": {"offset": 1}}
}
}
}
49 changes: 49 additions & 0 deletions meta/sql-columns.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "sql-columns.schema.json",
"title": "Columns of returned SQL rows that MEOS does not state",
"description": "Declared values of the columns of rows a SQL function returns that its wrapper computes rather than reads from MEOS. Consumed by parser/sqlfn.py, which fails generation on any row with a column neither fed by a C value nor declared here.",
"type": "object",
"required": ["rows"],
"additionalProperties": false,
"properties": {
"$schema": { "type": "string" },
"description": { "type": "string" },
"rows": {
"type": "object",
"description": "Keyed by the composite type a function returns, or by its SQL name when it returns record.",
"additionalProperties": {
"type": "object",
"required": ["note", "columns"],
"additionalProperties": false,
"properties": {
"note": {
"type": "string",
"description": "What the wrapper computes, and why MEOS does not state it.",
"minLength": 1
},
"columns": {
"type": "object",
"description": "Keyed by column name.",
"minProperties": 1,
"additionalProperties": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"from": {
"description": "ordinal: the column numbers the rows from 1, as PostgreSQL's WITH ORDINALITY.",
"const": "ordinal"
},
"offset": {
"description": "A constant the wrapper adds to the C value feeding the column.",
"type": "integer"
}
}
}
}
}
}
}
}
}
Loading
Loading