/docs/about/compatibility.md

https://github.com/tathougies/beam · Markdown · 423 lines · 418 code · 5 blank · 0 comment · 0 complexity · f7b8664f958dcdf1a716efa4a442b0c5 MD5 · raw file

  1. Beam strives to cover the full breadth of the relevant SQL
  2. standards. In general, if there is something in a SQL standard that is
  3. not implemented in a generic manner in `beam-core`, feel free to file
  4. an issue requesting support. There are some features that beam
  5. purposefully omits because no major RDBMS implements them. For
  6. example, database-level assertions are not supported in any of the
  7. default beam backends, and thus are not supported by `beam-core`. If
  8. you have a need for these features, feel free to file an issue. Be
  9. sure to motivate your use case with examples and a testing strategy.
  10. The relevant SQL standards are SQL-92, SQL:1999, SQL:2003, SQL:2008,
  11. and SQL:2011. Because not all the standards are not publicly
  12. accessible, I've done my best to piece together features from various
  13. documents available online. I believe I've covered most of the common
  14. cases, but there may be pieces of functionality that are missing. File
  15. an issue if this is the case.
  16. The table below summarizes the features defined in each SQL standard and beam's
  17. support for them. FULL means beam supports everything in that feature. NONE
  18. means that there is no support for that feature, and none planned. N/A means
  19. that the feature only applies to RDBMSs, not the SQL language. WONTFIX means
  20. that the feature has been considered and willfully ignored. UNKNOWN means not
  21. enough investigation has gone into the feature to make a determination. TODO
  22. means the feature has not been implemented yet, but an implementation is
  23. planned.
  24. !!! tip "Tip"
  25. The 'TODO' items are a great way to contribute to beam!
  26. | Feature | Status | Notes |
  27. | :-------------------------------------------------------------- | :------: | :---------------------------------------------------------------------------------------- |
  28. | **B011 Embedded Ada** | NONE | |
  29. | **B012 Embedded C** | NONE | |
  30. | **B013 Embedded COBOL** | NONE | |
  31. | **B014 Embedded FORTRAN** | NONE | |
  32. | **B015 Embedded MUMPS** | NONE | |
  33. | **B016 Embedded Pascal** | NONE | |
  34. | **B017 Embedded PL/I** | NONE | |
  35. | **B021 Direct SQL** | NONE | |
  36. | **B031 Basic dynamic SQL** | NONE | |
  37. | **B032 Extended dynamic SQL** | NONE | |
  38. | **B033 Untyped SQL-invoked function arguments** | NONE | |
  39. | **B034 Dynamic specification of cursor attributes** | NONE | |
  40. | **B035 Non-extended descriptor names** | NONE | |
  41. | **B051 Enhanced execution rights** | NONE | |
  42. | **B111 Module language Ada** | NONE | |
  43. | **B112 Module language C** | NONE | |
  44. | **B113 Module language COBOL** | NONE | |
  45. | **B114 Module language Fortran** | NONE | |
  46. | **B115 Module language MUMPS** | NONE | |
  47. | **B116 Module language Pascal** | NONE | |
  48. | **B117 Module language PL/I** | NONE | |
  49. | **B121 Routine language Ada** | NONE | |
  50. | **B122 Routine language C** | NONE | |
  51. | **B123 Routine language COBOL** | NONE | |
  52. | **B124 Routine language Fortran** | NONE | |
  53. | **B125 Routine language MUMPS** | NONE | |
  54. | **B126 Routine language Pascal** | NONE | |
  55. | **B127 Routine language PL/I** | NONE | |
  56. | **B128 Routine language SQL** | NONE | |
  57. | **B211 Module language Ada: VARCHAR and NUMERIC support** | NONE | |
  58. | **B221 Routine language Ada: VARCHAR and NUMERIC support** | NONE | |
  59. | **E011 - Numeric data types** | | |
  60. | E011-01 INTEGER and SMALLINT data types | FULL | Use `Int32` for `INTEGER`, `Int16` for `SMALLINT` |
  61. | E011-02 REAL, DOUBLE PRECISION, FLOAT | FULL | Use `Double` and `Float` |
  62. | E011-03 DECIMAL and NUMERIC data types | FULL | Use `Scientific`. You can provide the database precision using `beam-migrate` |
  63. | E011-04 Arithmetic operators | FULL | Use the `Num` instance for `QGenExpr` |
  64. | E011-05 Numeric comparison | FULL | Use the `.` suffixed operators (i.e., `==.`, `/=.`, `<.`, etc) |
  65. | E011-06 Implicit casting among numeric data types | WONTFIX | Beam never implicitly casts. Use `cast_` |
  66. | **E021 Character string types** | | |
  67. | E021-01 CHARACTER data type | FULL | Use `Text`. Use `beam-migrate` to specify width |
  68. | E021-02 CHARACTER VARYING data type | FULL | Use `Text`. Use `beam-migrate` to specify width. |
  69. | E021-03 Character literals | FULL | Use `val_` |
  70. | E021-04 CHARACTER\_LENGTH function | FULL | Use `charLength_` |
  71. | E021-05 OCTET\_LENGTH function | FULL | Use `octetLength_` |
  72. | E021-06 SUBSTRING function | TODO | |
  73. | E021-07 Character concatenation | FULL | Use `concat_` |
  74. | E021-08 UPPER and LOWER functions | FULL | Use `upper_` and `lower_` |
  75. | E021-09 TRIM function | PARTIAL | Use `trim_`. Full support may be provided on backends that implement it |
  76. | E021-10 Implicit casting among string types | WONTFIX | Beam never implicitly casts. Use `cast_` |
  77. | E021-11 POSITION function | FULL | Use `position_` |
  78. | E021-12 Character comparison | FULL | Use comparison operators (See E011-05) |
  79. | **E031 Identifiers** | | |
  80. | E031-01 Delimited identifiers | TODO | Find out more |
  81. | E021-02 Lower case identifiers | TODO | |
  82. | E021-03 Trailing underscore | N/A | Beam will use whatever column names you specify |
  83. | **E051 Basic query specification** | | |
  84. | E051-01 SELECT DISTINCT | FULL | Use `nub_` |
  85. | E051-02 GROUP BY clause | FULL | See `aggregate_` or read the [section on aggregates](../user-guide/queries/aggregates.md) |
  86. | E051-04 GROUP BY can contain columns not in SELECT | TODO | Unsure how this applies to beam in particular |
  87. | E051-05 Select list items can be renamed | N/A | Beam uses this feature internally, the user never needs it |
  88. | E051-06 HAVING clause | FULL | `guard_` and `filter_` are appropriately converted to `HAVING` when allowed |
  89. | E051-07 Qualified * in select list | N/A | Beam handles projections instead |
  90. | E051-08 Correlation names in FROM | TODO | Unsure how this applies to beam |
  91. | E051-09 Rename columns in the FROM clause | NONE | Beam doesn't need this |
  92. | **E061 Basic predicates and search conditions** | | |
  93. | E061-01 Comparison predicate | FULL | Use the comparison operators (see E011-05) |
  94. | E061-02 BETWEEN predicate | FULL | Use `between_` |
  95. | E061-03 IN predicate with list of values | FULL | Use `in_` |
  96. | E061-04 LIKE predicate | FULL | Use `like_` |
  97. | E061-05 LIKE predicate ESCAPE clause | TODO | Unsure how this would apply |
  98. | E061-06 NULL predicate | FULL | Use `isNothing_` and `isJust_` |
  99. | E061-07 Quantified comparison predicate | FULL | Use one of the *quantified comparison operators* (`==*.`, `/=*.`, `<*.`, `>*.`, `<=*.`, `>=*.`) |
  100. | E051-08 EXISTS predicate | FULL | Use `exists_` |
  101. | E061-09 Subqueries in comparison predicate | FULL | Use `subquery_` as usual |
  102. | E061-11 Subqueries in IN predicate | FULL | |
  103. | E061-12 Subqueries in quantified comparison predicate | FULL | |
  104. | E061-13 Correlated subqueries | FULL | Use `subquery_` |
  105. | E061-14 Search condition | FULL | Construct `QGenExprs` with type `Bool` |
  106. | **E071 Basic query expressions** | | |
  107. | E071-01 UNION DISTINCT table operator | FULL | Use `union_` |
  108. | E071-02 UNION ALL table operator | FULL | Use `unionAll_` |
  109. | E071-03 EXCEPT DISTINCT table operator | FULL | Use `except_` |
  110. | E071-05 Columns combined via operators need not have same type | WONTFIX | Beam is strongly typed |
  111. | E071-06 Table operators in subqueries | FULL | Supported for backends that support it |
  112. | **E081 Basic privileges** | NONE | Database security is not beam's focus. `beam-migrate` may expose this in the future |
  113. | **E091 Set functions** | | |
  114. | E091-01 AVG | FULL | Use `avg_` or `avgOver_` |
  115. | E091-02 COUNT | FULL | Use `countAll_`, `countAllOver_`, `count_`, or `countOver_` |
  116. | E091-03 MAX | FULL | Use `max_` or `maxOver_` |
  117. | E091-04 MIN | FULL | Use `min_` or `minOver_` |
  118. | E091-05 SUM | FULL | Use `sum_` or `sumOver_` |
  119. | E091-06 ALL quantifier | FULL | Use the `*Over_` functions with the `allInGroupExplicitly_` quantifier |
  120. | E091-07 DISTINCT quantifier | FULL | Use the `*Over_` functions with the `distinctInGroup_` quantifier |
  121. | **E101 Basic data manipulation** | | |
  122. | E101-01 INSERT statement | FULL | Use `insert` and `SqlInsert` |
  123. | E101-03 Searched UPDATE | FULL | Use `update` and `SqlUpdate` |
  124. | E101-04 Searched DELETE | FULL | Use `delete` and `SqlDelete` |
  125. | **E111 Single row SELECT statement** | FULL | Use `select` as expected |
  126. | **E121 Basic cursor support** | NONE | Use the backends explicitly |
  127. | **E131 Null value support** | PARTIAL | Use `Maybe` column types, `Nullable`, and the `just_`, `nothing_`, and `maybe_` functions |
  128. | **E141 Basic integrity constraints** | | Implemented in `beam-migrate` |
  129. | E141-01 NOT NULL constraints | FULL | Use `notNull_` |
  130. | E141-02 UNIQUE constraints of NOT NULL columns | TODO | |
  131. | E141-03 PRIMARY KEY constraints | FULL | Instantiate `Table` with the correct `PrimaryKey` |
  132. | E141-04 Basic FOREIGN KEY constraints | TODO | You can embed the `PrimaryKey` of the relation directly. |
  133. | E141-06 CHECK constraints | TODO | |
  134. | E141-07 Column defaults | FULL | Use `default_` from `beam-migrate` |
  135. | E141-08 NOT NULL inferred on PRIMARY KEY | N/A | |
  136. | E141-10 Names in a foreign key can be specified in any order | N/A | |
  137. | **E151 Transaction support** | None | Use the backend functions explicitly |
  138. | **E152 SET TRANSACTION statement** | N/A | |
  139. | **E153 Updatable queries with subqueries** | TODO | Not a common feature, but would be trivial to support |
  140. | **E161 SQL comments with double minus** | N/A | |
  141. | **E171 SQLSTATE support** | N/A | |
  142. | **E182 Host language binding** | N/A | |
  143. | **F031 Basic schema manipulation** | | |
  144. | F031-01 CREATE TABLE for persistent base tables | FULL | Use `createTable_` in `beam-migrate` |
  145. | F031-02 CREATE VIEW statement | TODO | |
  146. | F031-03 GRANT statement | TODO | |
  147. | F031-04 ALTER TABLE statement: ADD COLUMN clause | TODO | |
  148. | F031-13 DROP TABLE statement: RESTRICT clause | TODO | |
  149. | F031-16 DROP VIEW statement: RESTRICT clause | TODO | |
  150. | F031-19 REVOKE statement: RESTRICT clause | NONE | See note for E081 |
  151. | **F032 CASCADE drop behavior** | TODO | Would be in `beam-migrate` |
  152. | **F033 ALTER TABLE statement: DROP COLUMN clause** | TODO | |
  153. | **F034 Extended REVOKE statement** | NONE | |
  154. | **F041 Basic joined table** | | |
  155. | F041-01 Inner join | FULL | Use the [monadic join interface](../user-guide/queries/relationships.md) |
  156. | F041-02 INNER keyword | N/A | The `INNER` keyword is just syntactic sugar. The regular joins do what you want. |
  157. | F041-03 LEFT OUTER JOIN | FULL | Use `leftJoin_` |
  158. | F041-04 RIGHT OUTER JOIN | PARTIAL | Supported in backend syntaxes, not exposed. Can always be written using LEFT OUTER JOIN |
  159. | F041-05 Outer joins can be nested | FULL | `outerJoin_` can be nested arbitrarily |
  160. | F041-07 The inner table in outer join can be used in inner join | TODO | How does this apply to us? |
  161. | F041-08 All comparison operators in JOIN | FULL | Arbitrary `QGenExpr`s are supported. |
  162. | **F051 Basic date and time** | | |
  163. | F051-01 DATE data type | FULL | Use `Day` from `Data.Time` and `val_` |
  164. | F051-02 TIME data type | FULL | Use `TimeOfDay` from `Data.Time` and `val_` |
  165. | F051-03 TIMESTAMP datatype | FULL | Use `LocalTime` from `Data.Time` and `val_`. Precision can be specified in `beam-migrate` |
  166. | F051-04 Comparison predicate on time types | FULL | Use comparison operatiors (See E011-05) |
  167. | F051-05 Explicit cast between date-time types and string | TODO | |
  168. | F051-06 CURRENT\_DATE | TODO | |
  169. | F051-07 LOCALTIME | TODO | |
  170. | F051-08 LOCALTIMESTAMP | TODO | |
  171. | **F081 UNION and EXCEPT in views** | FULL | Views can use any query |
  172. | **F111 Isolation levels other than SERIALIZABLE** | NONE | Use backends |
  173. | **F121 Basic diagnostics mangement** | NONE | Use backends |
  174. | **F122 Extended diagnostics management** | NONE | Use backends |
  175. | **F123 All diagnostics** | NONE | Use backends |
  176. | **F131 Grouped operations** | TODO | Depends on grouped views |
  177. | **F171 Multiple schemas per user** | N/A | Depends on backend |
  178. | **F191 Referential delete actions** | TODO | |
  179. | **F181 Multiple module support** | N/A | |
  180. | **F200 TRUNCATE TABLE statement** | TODO | May be added in the future |
  181. | **F201 CAST function** | FULL | See `cast_` |
  182. | **F202 TRUNCATE TABLE: identity column restart option** | TODO | Depends on F200 |
  183. | **F221 Explicit defaults** | FULL | Use `default_` and `insertExpressions` when inserting |
  184. | **F222 INSERT statement: DEFAULT VALUES clause** | TODO | |
  185. | **F251 Domain support** | PARTIAL | Use `DomainTypeEntity` |
  186. | **F261 CASE expression** | | |
  187. | F261-01 Simple CASE | TODO | Use searched case (see F261-02) |
  188. | F261-02 Searched CASE | FULL | Use `if_`, `then_`, and `else_` |
  189. | F261-03 NULLIF | FULL | Use `nullIf_` |
  190. | F261-04 COALESCE | FULL | Use `coalesce_` |
  191. | **F262 Extended CASE expression** | WONTFIX | Beam allows any expression in a `WHEN` condition |
  192. | **F263 Comma-separater predicates in simple CASE expression** | WONTFIX | Unnecessary |
  193. | **F271 Compound character literals** | N/A | This is syntactic sugar |
  194. | **F281 LIKE enhancements** | FULL | Supported in backends that support this |
  195. | **F291 UNIQUE predicate** | FULL | Use `unique_` |
  196. | **F301 CORRESPONDING in query expressions** | N/A | Beam set functions work based off the query result type, not the column name |
  197. | **F302 INTERSECT table operator** | FULL | Use `intersect_` |
  198. | F302-01 INTERSECT DISTINCT table operator | FULL | Use `intersect_` |
  199. | F302-02 INTERSET ALL table operator | FULL | Use `intersectAll_` |
  200. | **F304 EXCEPT ALL table operator** | FULL | Use `exceptAll_` |
  201. | **F311 Schema definition statement** | TODO | Would be in `beam-migrate` |
  202. | **F312 MERGE statement** | TODO | |
  203. | **F313 Enhanced MERGE statement** | TODO | |
  204. | **F314 MERGE statement with DELETE branch** | TODO | |
  205. | **F321 User authorization** | N/A | |
  206. | **F361 Subprogram support** | N/A | |
  207. | **F381 Extended schema manipulation** | TODO | |
  208. | **F382 Alter column data type** | TODO | |
  209. | **F384 Drop identity property clause** | TODO | |
  210. | **F385 Drop column generation expression clause** | TODO | |
  211. | **F386 Set identity column generation clause** | TODO | |
  212. | **F391 Long identifiers** | FULL | Supported in backends that support it |
  213. | **F392 Unicode escapes in identifiers** | TODO | Unsure how this applies |
  214. | **F393 Unicode escapes in literals** | TODO | Unsure how this applies |
  215. | **F394 Optional normal form specification** | N/A | |
  216. | **F401 Extended joined table** | FULL | Full outer join using `outerJoin_`. Natural join is not needed. A cross join is generated automatically when there are no join conditions. |
  217. | **F402 Named column joins for LOBs, arrays, and multisets** | PARTIAL | Supported in backends that support it |
  218. | **F403 Partitioned join tables** | TODO | |
  219. | **F411 Time zone specification** | TODO | |
  220. | **F421 National character** | FULL | Supported in `beam-migrate` as a data type for `Text` |
  221. | **F431 Read-only scrollable cursors** | N/A | Use the underlying backend |
  222. | **F441 Extended set function support** | TODO | |
  223. | **F442 Mixed column references in set functions** | TODO | Unsure how this would work with beam |
  224. | **F451 Character set definition** | TODO | Likely would go in `beam-migrate` |
  225. | **F461 Named character sets** | TODO | See F451 |
  226. | **F491 Constraint management** | TODO | |
  227. | **F492 Optional table constraint enforcement** | TODO | |
  228. | **F521 Assertions** | TODO | |
  229. | **F531 Temporary tables** | TODO | |
  230. | **F481 Expanded NULL predicate** | FULL | Supported in backends that support it |
  231. | **F555 Enhanced seconds precision** | TODO | |
  232. | **F561 Full value expressions** | TODO | |
  233. | **F571 Truth value tests** | TODO | |
  234. | **F591 Derived tables** | TODO | |
  235. | **F611 Indicator data types** | TODO | |
  236. | **F641 Row and table constructors** | PARTIAL | Use `row_` (TODO) |
  237. | **F651 Catalog name qualifiers** | TODO | |
  238. | **F661 Simple tables** | TODO | |
  239. | **F671 Subqueries in CHECK constraints** | TODO | Planned with E141-06 |
  240. | **F672 Retrospective CHECK constraints** | TODO | Would require temporal DB support |
  241. | **F690 Collation support** | PARTIAL | `beam-migrate` supports some collation features |
  242. | **F692 Enhanced collation support** | TODO | |
  243. | **F693 SQL-session and client module collations** | TODO | |
  244. | **F695 Translation support** | TODO | |
  245. | **F701 Referential update actions** | TODO | |
  246. | **F711 ALTER domain** | TODO | |
  247. | **F721 Deferrable constraints** | PARTIAL | The syntax exists in `beam-migrate` |
  248. | **F731 INSERT column privileges** | N/A | |
  249. | **F741 Referential MATCH type** | PARTIAL | Exists in the syntax in `beam-migrate`, not exposed yet (TODO) |
  250. | **F751 View CHECK enhancements** | TODO | |
  251. | **F761 Session management** | TODO | |
  252. | **F762 CURRENT_CATALOG** | TODO | |
  253. | **F763 CURRENT_SCHEMA** | TODO | |
  254. | **F812 Basic flagging** | N/A | |
  255. | **F841 LIKE_REGEX predicate** | TODO | Easy |
  256. | **F842 OCCURENCES_REGEX function** | TODO | Easy |
  257. | **F843 POSITION_REGEX function** | TODO | Easy |
  258. | **F844 SUBSTRING_REGEX function** | TODO | Easy |
  259. | **F845 TRANSLATE_REGEX function** | TODO | Easy |
  260. | **F846 Octet support in regular expression operators** | TODO | |
  261. | **F847 Nonconstant regular expression** | TODO | Easy once regex support is added |
  262. | **F850 Top-level <order by clause> in <query expression>** | FULL | Use `orderBy_` as usual. Beam will do the right thing behind the scenes. |
  263. | **F851 <order by clause> in subqueries** | FULL | Works in backends that support it |
  264. | **F852 Top-level <order by clause> in views** | FULL | Views can use any query |
  265. | **F855 Nested <order by clause> in <query expression>** | UNKNOWN | |
  266. | **F856 Nested <fetch first clause> in <query expression>** | N/A | Beam automatically optimizes nested `orderBy_` calls |
  267. | **F857 Top-level <fetch first clause> in <query expression>** | FULL | `limit_` and `offset_` are correctly translated to dialect-specific pagination mechanisms |
  268. | **F858 <fetch first clause> in subqueries** | FULL | |
  269. | **F859 Top-level <fetch first clause> in subqueries** | FULL | |
  270. | **F860 dynamic <fetch first row count> in <fetch first clause>* | TODO | |
  271. | **F861 Top-level <result offset clause> in <query expression>* | FULL | See note for F587 |
  272. | **F862 <result offset clause> in subqueries** | FULL | |
  273. | **F863 Nested <result offset clause> in <query expression>** | FULL | |
  274. | **F864 Top-level <result offset clause> in views** | FULL | |
  275. | **F865 dynamic <offset row count> in <result offset clause>** | TODO | |
  276. | **F866 FETCH FIRST clause: PERCENT option** | TODO | |
  277. | **F867 FETCH FIRST clause: WITH TIES option** | TODO | |
  278. | **R010 Row pattern recognition: FROM clause** | TODO | |
  279. | **R020 Row pattern recognition: WINDOW clause** | TODO | |
  280. | **R030 Row pattern recognition: full aggregate support** | TODO | |
  281. | **S011 Distinct data types** | TODO | |
  282. | **S023 Basic structured types** | TODO | |
  283. | **S024 Enhanced structured types** | TODO | |
  284. | **S025 Final structured types** | TODO | |
  285. | **S026 Self-referencing structured types** | TODO | |
  286. | **S027 Create method by specific method name** | TODO | |
  287. | **S028 Permutable UDT options list** | TODO | |
  288. | **S041 Basic reference types** | TODO | |
  289. | **S043 Enhanced reference types** | TODO | |
  290. | **S051 Create table of type** | TODO | |
  291. | **S071 SQL paths in function and type name resolution** | N/A | Beam qualifies everything anyway |
  292. | **S081 Subtables** | PARTIAL | You can use them right now, but there's no support for their creation or management in `beam-migrate` |
  293. | **S091 Basic array support** | PARTIAL | Supported in some backends (`beam-postgres` for example) |
  294. | **S092 Arrays of user-defined types** | TODO | Depends on user-defined types |
  295. | **S094 Arrays of reference types** | TODO | |
  296. | **S095 Array constructors by query** | PARTIAL | |
  297. | **S096 Optional array bounds** | PARTIAL | Supported in `beam-postgres` |
  298. | **S097 Array element assignment** | TODO | Not yet, but should be easy enough in `beam-postgres` |
  299. | **S098 ARRAY_AGG** | PARTIAL | Supported in `beam-postgres` |
  300. | **S111 ONLY in query expressions** | TODO | |
  301. | **S151 Type predicate** | TODO | |
  302. | **S161 Subtype treatment** | TODO | |
  303. | **S162 Subtype treatment for references** | TODO | |
  304. | **S201 SQL-invoked routines on arrays** | TODO | Would be subsumed by sql-routines (T-321) |
  305. | **S202 SQL-invoked routines on multisets** | TODO | Would be subsumed by sql-routines (T-321) |
  306. | **S211 User-defined cast functions** | TODO | |
  307. | **S231 Structured type locators** | TODO | |
  308. | **S232 Array locators** | TODO | |
  309. | **S233 Multiset locators** | TODO | |
  310. | **S241 Transform functions** | TODO | |
  311. | **S242 Alter transform statement** | TODO | |
  312. | **S251 User-defined orderings** | TODO | |
  313. | **S261 Specific type method** | TODO | |
  314. | **S271 Basic multiset support** | PARTIAL | Supported in `beam-postgres` |
  315. | **S272 Multisets of user-defined types** | TODO | |
  316. | **S274 Multisets reference types** | TODO | |
  317. | **S275 Advanced multiset support** | TODO | |
  318. | **S281 Nested collection types** | TODO | |
  319. | **S291 Unique constraint on entire row** | TODO | |
  320. | **S301 Enhanced UNNEST** | TODO | |
  321. | **S401 Distinct types based on array types** | TODO | |
  322. | **S402 Distinct types based on distinct types** | TODO | |
  323. | **S403 ARRAY_MAX_CARDINALITY** | TODO | |
  324. | **S404 TRIM_ARRAY** | TODO | |
  325. | **T021 BINARY and VARBINARY data types** | FULL | |
  326. | **T022 Advanced support for BINARY and VARBINARY data types** | TODO | |
  327. | **T023 Compound binary literals** | N/A | Beam handles serialization |
  328. | **T024 Spaces in binary literals** | N/A | Beam handles serialization |
  329. | **T031 Boolean data type** | FULL | |
  330. | **T041 Basic LOB data type support** | TODO | |
  331. | **T042 Extended LOB data type support** | TODO | |
  332. | **T043 Multiplier T** | TODO | |
  333. | **T044 Multiplier P** | TODO | |
  334. | **T051 Row types** | PARTIAL | |
  335. | **T061 UCS support** | TODO | |
  336. | **T071 BIGINT data type** | FULL | |
  337. | **T101 Enhanced nullability detection** | TODO | |
  338. | **T111 Updatable joins, unions, and columns** | TODO | |
  339. | **T121 WITH (excluding recursive) in query expression** | FULL | Use `selectWith`, `selecting`, and `reuse`. See the [section](../user-guide/queries/common-table-expressions.md) in the users guide |
  340. | **T122 WITH (excluding recursive) in subquery** | TODO | |
  341. | **T131 Recursive query** | FULL | Use `selectWith` and the `MonadFix With` instance. See the [section](../user-guide/queries/common-table-expressions.md) for more details |
  342. | **T132 Recursive query in subquery** | TODO | |
  343. | **T141 SIMILAR predicate** | FULL | |
  344. | **T151 DISTINCT predicate** | FULL | |
  345. | **T152 DISTINCT predicate with negation** | TODO | |
  346. | **T171 LIKE clause in table definition** | TODO | |
  347. | **T172 AS subquery clause in table definition** | TODO | |
  348. | **T173 Extended LIKE clause in table definition** | TODO | |
  349. | **T174 Identity columns** | TODO | |
  350. | **T175 Generated columns** | TODO | |
  351. | **T176 Sequence generator support** | TODO | |
  352. | **T177 Sequence generator support: simple restart option** | TODO | |
  353. | **T178 Identity columns: simple restart option** | TODO | |
  354. | **T180 System-versioned tables** | TODO | |
  355. | **T181 Application-time period tables** | TODO | |
  356. | **T191 Referential action RESTART** | TODO | |
  357. | **T201 Comparable data types for referential constraints** | TODO | |
  358. | **T211 Basic trigger capability** | TODO | |
  359. | **T212 Enhanced trigger capability** | TODO | |
  360. | **T213 INSTEAD OF triggers** | TODO | |
  361. | **T231 Sensitive cursors** | TODO | |
  362. | **T241 START TRANSACTION statement** | WONTFIX | Use the backend library |
  363. | **T251 SET TRANSACTION option: LOCAL option** | WONTFIX | Use the backend library |
  364. | **T261 Chained transactions** | N/A | |
  365. | **T271 Savepoints** | N/A | |
  366. | **T272 Enhanced savepoint management** | N/A | |
  367. | **T281 SELECT privilege with column granularity** | N/A | |
  368. | **T285 Enhanced derived column names** | N/A | |
  369. | **T301 Functional dependencies** | TODO | |
  370. | **T312 OVERLAY function** | TODO | |
  371. | **T321 Basic SQL-invoked routines** | TODO | |
  372. | **T323 Explicit security for external routines** | TODO | |
  373. | **T324 Explicit security for SQL routines** | TODO | |
  374. | **T325 Qualified SQL parameter references** | N/A | Beam will likely use the qualified ones by default. Likely not exposed to user |
  375. | **T326 Table functions** | TODO | |
  376. | **T331 Basic roles** | N/A | |
  377. | **T332 Extended roles** | N/A | |
  378. | **T341 Overleading of SQL-invoked functions and procodures** | WONTFIX | Haskell doesn't allow overloading, and this seems complicated and unnecessary |
  379. | **T351 Bracketed comments** | N/A | |
  380. | **T431 Extended grouping capabalities** | TODO | |
  381. | **T432 Nested and concatenated GROUPING SETs** | TODO | |
  382. | **T433 Multiargument GROUPING function** | TODO | |
  383. | **T434 GROUP BY DISTINCT** | TODO | |
  384. | **T441 ABS and MOD functions** | FULL | |
  385. | **T461 Symmetric BETWEEN predicate** | FULL | Beam doesn't check this |
  386. | **T471 Result sets return value** | TODO | |
  387. | **T472 DESCRIBE CURSOR** | N/A | Use the backend library |
  388. | **T491 LATERAL derived table** | TODO | |
  389. | **T495 Combined data change and retrieval** | TODO | |
  390. | **T501 Enhanced EXISTS predicate** | TODO | |
  391. | **T502 Period predicates** | TODO | |
  392. | **T511 Transaction counts** | TODO | |
  393. | **T521 Nested arguments in CALL statement** | TODO | |
  394. | **T522 Default values for IN parameters of SQL-invoked procs** | TODO | |
  395. | **T551 Optional key words for DEFAULT syntax** | TODO | |
  396. | **T561 Holdable locators** | TODO | |
  397. | **T571 Array-returning SQL-invoked functions** | TODO | Will be supported once SQL-invoked functions are |
  398. | **T572 Multiset-returning SQL-invoked functions** | TODO | |
  399. | **T581 Regular expression substring function** | TODO | |
  400. | **T591 UNIQUE constraints of possible NULL columns** | TODO | |
  401. | **T601 Local cursor references** | N/A | |
  402. | **T611 Elementary OLAP operations** | FULL | See `withWindow_`, [window functions](../user-guide/queries/window-functions.md) |
  403. | **T612 Advanced OLAP operations** | PARTIAL | No exclusions yet. See `percentRank_`, `cumeDist_`, and `denseRank_` |
  404. | **T613 Sampling** | TODO | |
  405. | **T614 NTILE function** | FULL | `ntile_` |
  406. | **T615 LEAD and LAG function** | FULL | `lead1_`, `lag1_`, `lead_`, `lag_`, `leadWithDefault_`, `lagWithDefault_` |
  407. | **T616 Null treatment for LEAD and LAG functions** | TODO | |
  408. | **T617 FIRST_VALUE and LAST_VALUE function** | FULL | `lastValue_` and `firstValue_` respectively |
  409. | **T618 NTH_VALUE function** | FULL | `nthValue_` |
  410. | **T619 Nested window function** | TODO | |
  411. | **T620 WINDOW clause: GROUPS option** | TODO | |
  412. | **T621 Enhanced numeric functions** | FULL | All functions and aggregates in `Database.Beam.Query.Extension` |
  413. | **T641 Multiple column assignment** | TODO | |
  414. | **T651 SQL-schema statements in SQL routines** | TODO | |
  415. | **T652 SQL-dynamic statements in SQL routines** | TODO | |
  416. | **T653 SQL-schema statements in external routines** | TODO | |
  417. | **T654 SQL-dynamic statements in external routines** | TODO | |
  418. | **T655 Cyclically dependent routines** | TODO | |