microsoft / ODBC-Specification

Microsoft ODBC Specification
Other
122 stars 40 forks source link

What additional functions should we define for collections? #29

Open mikepizzo opened 8 years ago

mikepizzo commented 8 years ago

ANSI collection functions (define getinfo masks for these?): -Cardinality =>CARDINALITY(array|multiset) -Max Cardinality for an array =>ARRAY_MAX_CARDINALITY(array) -Unique =>SET(multiset) "Element" to turn a multiset with cardinality 1 into a row-valued expression =>ELEMENT(multiset) Array Concatenation => a || b union, intersect, except =>a MULTISET (UNION | INTERSECT | EXCEPT) [ALL | DISTINCT] b (default is ALL) Array Trim =>TRIM_ARRAY(array,index) -Table function derived table =>TABLE(array|multiset) -membership =>a [NOT] MEMBER [OF] multiset =>multiset [NOT] SUBMULTISET [OF] multiset

With Ordinality for array unnest?

Other functions Any/All? (apply to unnest?)

IndexOf?

Also, good article on SQL support for arrays/multisets: http://farrago.sourceforge.net/design/CollectionTypes.html