diff --git a/meta/type-scope.json b/meta/type-scope.json index bb8530e..5a5b4e1 100644 --- a/meta/type-scope.json +++ b/meta/type-scope.json @@ -6,6 +6,18 @@ "types": "*", "note": "Generic over Temporal *: appends to any temporal type." }, + "temporal_append_tsequence": { + "types": "*", + "note": "Generic over Temporal *: appends to any temporal type. Its bool expand parameter is no scope." + }, + "temporal_merge": { + "types": "*", + "note": "Generic over Temporal *: merges any two temporal values of one type. Its trgeometry branch is no scope." + }, + "temporal_merge_array": { + "types": "*", + "note": "Generic over Temporal *: merges an array of temporal values of one type. Its trgeometry branch is no scope." + }, "temporal_at_values": { "types": "*", "note": "Generic over Temporal *: restricts any temporal type to a value set." diff --git a/tests/test_typescope.py b/tests/test_typescope.py index 7f4511f..c7596c0 100644 --- a/tests/test_typescope.py +++ b/tests/test_typescope.py @@ -180,6 +180,16 @@ def test_the_array_accessors_serve_every_temporal_type(self): self.assertTrue({'tint', 'tfloat', 'ttext', 'tgeompoint', 'tgeogpoint'} <= first, f'{name} serves {sorted(first)}') + def test_append_and_merge_serve_every_temporal_type(self): + # as #test_the_array_accessors_serve_every_temporal_type: the bool expand parameter of + # temporal_append_tsequence and the trgeometry branch of temporal_merge read as scopes, + # keeping tbool and trgeometry alone + for name in ('temporal_append_tsequence', 'temporal_merge', 'temporal_merge_array'): + first = {s['args'][0].rstrip('[]') + for s in self.fns[name].get('sqlSignatures') or ()} + self.assertTrue({'tbool', 'tint', 'tfloat', 'ttext', 'tgeompoint', 'tgeogpoint', + 'trgeometry'} <= first, f'{name} serves {sorted(first)}') + if __name__ == '__main__': unittest.main()