@hdnax/sqlingo.js 0.0.5 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.repo.md +1 -2
  3. package/dist/chunk-2YNOERAO.cjs +2 -0
  4. package/dist/chunk-2YNOERAO.cjs.map +1 -0
  5. package/dist/chunk-2Z3O2CFM.cjs +19 -0
  6. package/dist/chunk-2Z3O2CFM.cjs.map +1 -0
  7. package/dist/chunk-4ZMKB6PV.cjs +2 -0
  8. package/dist/chunk-4ZMKB6PV.cjs.map +1 -0
  9. package/dist/chunk-53OWF4GG.js +2 -0
  10. package/dist/chunk-53OWF4GG.js.map +1 -0
  11. package/dist/chunk-C4CLTVOW.cjs +2 -0
  12. package/dist/chunk-C4CLTVOW.cjs.map +1 -0
  13. package/dist/chunk-DOKMTZYO.cjs +4 -0
  14. package/dist/chunk-DOKMTZYO.cjs.map +1 -0
  15. package/dist/chunk-FCGUTI7Y.js +2 -0
  16. package/dist/chunk-FCGUTI7Y.js.map +1 -0
  17. package/dist/chunk-IPCIXWCY.js +2 -0
  18. package/dist/chunk-IPCIXWCY.js.map +1 -0
  19. package/dist/chunk-KCNOE4DZ.js +19 -0
  20. package/dist/chunk-KCNOE4DZ.js.map +1 -0
  21. package/dist/chunk-NRJHX2GZ.js +2 -0
  22. package/dist/chunk-NRJHX2GZ.js.map +1 -0
  23. package/dist/chunk-O2J5RKBN.js +2 -0
  24. package/dist/chunk-O2J5RKBN.js.map +1 -0
  25. package/dist/chunk-PXUASP5I.js +2 -0
  26. package/dist/chunk-PXUASP5I.js.map +1 -0
  27. package/dist/chunk-R7C3ZHVK.cjs +2 -0
  28. package/dist/chunk-R7C3ZHVK.cjs.map +1 -0
  29. package/dist/chunk-UHWHUDLE.cjs +2 -0
  30. package/dist/chunk-UHWHUDLE.cjs.map +1 -0
  31. package/dist/chunk-WRNYJ54A.cjs +2 -0
  32. package/dist/chunk-WRNYJ54A.cjs.map +1 -0
  33. package/dist/chunk-XZQFOICX.cjs +3 -0
  34. package/dist/chunk-XZQFOICX.cjs.map +1 -0
  35. package/dist/chunk-YLOQRUXC.js +2 -0
  36. package/dist/chunk-YLOQRUXC.js.map +1 -0
  37. package/dist/chunk-YSS2WVCM.cjs +2 -0
  38. package/dist/chunk-YSS2WVCM.cjs.map +1 -0
  39. package/dist/chunk-Z5V6VOIN.js +3 -0
  40. package/dist/chunk-Z5V6VOIN.js.map +1 -0
  41. package/dist/chunk-ZBFGQPJR.js +4 -0
  42. package/dist/chunk-ZBFGQPJR.js.map +1 -0
  43. package/dist/dialects/athena.cjs +2 -0
  44. package/dist/dialects/athena.cjs.map +1 -0
  45. package/dist/dialects/athena.d.cts +66 -0
  46. package/dist/dialects/athena.d.ts +66 -0
  47. package/dist/dialects/athena.js +2 -0
  48. package/dist/dialects/athena.js.map +1 -0
  49. package/dist/dialects/bigquery.cjs +3 -0
  50. package/dist/dialects/bigquery.cjs.map +1 -0
  51. package/dist/dialects/bigquery.d.cts +651 -0
  52. package/dist/dialects/bigquery.d.ts +651 -0
  53. package/dist/dialects/bigquery.js +3 -0
  54. package/dist/dialects/bigquery.js.map +1 -0
  55. package/dist/dialects/clickhouse.cjs +2 -0
  56. package/dist/dialects/clickhouse.cjs.map +1 -0
  57. package/dist/dialects/clickhouse.d.cts +634 -0
  58. package/dist/dialects/clickhouse.d.ts +634 -0
  59. package/dist/dialects/clickhouse.js +2 -0
  60. package/dist/dialects/clickhouse.js.map +1 -0
  61. package/dist/dialects/databricks.cjs +2 -0
  62. package/dist/dialects/databricks.cjs.map +1 -0
  63. package/dist/dialects/databricks.d.cts +484 -0
  64. package/dist/dialects/databricks.d.ts +484 -0
  65. package/dist/dialects/databricks.js +2 -0
  66. package/dist/dialects/databricks.js.map +1 -0
  67. package/dist/dialects/doris.cjs +2 -0
  68. package/dist/dialects/doris.cjs.map +1 -0
  69. package/dist/dialects/doris.d.cts +484 -0
  70. package/dist/dialects/doris.d.ts +484 -0
  71. package/dist/dialects/doris.js +2 -0
  72. package/dist/dialects/doris.js.map +1 -0
  73. package/dist/dialects/dremio.cjs +2 -0
  74. package/dist/dialects/dremio.cjs.map +1 -0
  75. package/dist/dialects/dremio.d.cts +522 -0
  76. package/dist/dialects/dremio.d.ts +522 -0
  77. package/dist/dialects/dremio.js +2 -0
  78. package/dist/dialects/dremio.js.map +1 -0
  79. package/dist/dialects/drill.cjs +2 -0
  80. package/dist/dialects/drill.cjs.map +1 -0
  81. package/dist/dialects/drill.d.cts +512 -0
  82. package/dist/dialects/drill.d.ts +512 -0
  83. package/dist/dialects/drill.js +2 -0
  84. package/dist/dialects/drill.js.map +1 -0
  85. package/dist/dialects/druid.cjs +2 -0
  86. package/dist/dialects/druid.cjs.map +1 -0
  87. package/dist/dialects/druid.d.cts +17 -0
  88. package/dist/dialects/druid.d.ts +17 -0
  89. package/dist/dialects/druid.js +2 -0
  90. package/dist/dialects/druid.js.map +1 -0
  91. package/dist/dialects/duckdb.cjs +86 -0
  92. package/dist/dialects/duckdb.cjs.map +1 -0
  93. package/dist/dialects/duckdb.d.cts +756 -0
  94. package/dist/dialects/duckdb.d.ts +756 -0
  95. package/dist/dialects/duckdb.js +86 -0
  96. package/dist/dialects/duckdb.js.map +1 -0
  97. package/dist/dialects/dune.cjs +2 -0
  98. package/dist/dialects/dune.cjs.map +1 -0
  99. package/dist/dialects/dune.d.cts +21 -0
  100. package/dist/dialects/dune.d.ts +21 -0
  101. package/dist/dialects/dune.js +2 -0
  102. package/dist/dialects/dune.js.map +1 -0
  103. package/dist/dialects/exasol.cjs +2 -0
  104. package/dist/dialects/exasol.cjs.map +1 -0
  105. package/dist/dialects/exasol.d.cts +507 -0
  106. package/dist/dialects/exasol.d.ts +507 -0
  107. package/dist/dialects/exasol.js +2 -0
  108. package/dist/dialects/exasol.js.map +1 -0
  109. package/dist/dialects/fabric.cjs +2 -0
  110. package/dist/dialects/fabric.cjs.map +1 -0
  111. package/dist/dialects/fabric.d.cts +463 -0
  112. package/dist/dialects/fabric.d.ts +463 -0
  113. package/dist/dialects/fabric.js +2 -0
  114. package/dist/dialects/fabric.js.map +1 -0
  115. package/dist/dialects/hive.cjs +2 -0
  116. package/dist/dialects/hive.cjs.map +1 -0
  117. package/dist/dialects/hive.d.cts +585 -0
  118. package/dist/dialects/hive.d.ts +585 -0
  119. package/dist/dialects/hive.js +2 -0
  120. package/dist/dialects/hive.js.map +1 -0
  121. package/dist/dialects/materialize.cjs +2 -0
  122. package/dist/dialects/materialize.cjs.map +1 -0
  123. package/dist/dialects/materialize.d.cts +890 -0
  124. package/dist/dialects/materialize.d.ts +890 -0
  125. package/dist/dialects/materialize.js +2 -0
  126. package/dist/dialects/materialize.js.map +1 -0
  127. package/dist/dialects/mysql.cjs +2 -0
  128. package/dist/dialects/mysql.cjs.map +1 -0
  129. package/dist/dialects/mysql.d.cts +292 -0
  130. package/dist/dialects/mysql.d.ts +292 -0
  131. package/dist/dialects/mysql.js +2 -0
  132. package/dist/dialects/mysql.js.map +1 -0
  133. package/dist/dialects/oracle.cjs +2 -0
  134. package/dist/dialects/oracle.cjs.map +1 -0
  135. package/dist/dialects/oracle.d.cts +539 -0
  136. package/dist/dialects/oracle.d.ts +539 -0
  137. package/dist/dialects/oracle.js +2 -0
  138. package/dist/dialects/oracle.js.map +1 -0
  139. package/dist/dialects/postgres.cjs +2 -0
  140. package/dist/dialects/postgres.cjs.map +1 -0
  141. package/dist/dialects/postgres.d.cts +587 -0
  142. package/dist/dialects/postgres.d.ts +587 -0
  143. package/dist/dialects/postgres.js +2 -0
  144. package/dist/dialects/postgres.js.map +1 -0
  145. package/dist/dialects/presto.cjs +2 -0
  146. package/dist/dialects/presto.cjs.map +1 -0
  147. package/dist/dialects/presto.d.cts +173 -0
  148. package/dist/dialects/presto.d.ts +173 -0
  149. package/dist/dialects/presto.js +2 -0
  150. package/dist/dialects/presto.js.map +1 -0
  151. package/dist/dialects/prql.cjs +2 -0
  152. package/dist/dialects/prql.cjs.map +1 -0
  153. package/dist/dialects/prql.d.cts +496 -0
  154. package/dist/dialects/prql.d.ts +496 -0
  155. package/dist/dialects/prql.js +2 -0
  156. package/dist/dialects/prql.js.map +1 -0
  157. package/dist/dialects/redshift.cjs +2 -0
  158. package/dist/dialects/redshift.cjs.map +1 -0
  159. package/dist/dialects/redshift.d.cts +132 -0
  160. package/dist/dialects/redshift.d.ts +132 -0
  161. package/dist/dialects/redshift.js +2 -0
  162. package/dist/dialects/redshift.js.map +1 -0
  163. package/dist/dialects/risingwave.cjs +2 -0
  164. package/dist/dialects/risingwave.cjs.map +1 -0
  165. package/dist/dialects/risingwave.d.cts +478 -0
  166. package/dist/dialects/risingwave.d.ts +478 -0
  167. package/dist/dialects/risingwave.js +2 -0
  168. package/dist/dialects/risingwave.js.map +1 -0
  169. package/dist/dialects/singlestore.cjs +2 -0
  170. package/dist/dialects/singlestore.cjs.map +1 -0
  171. package/dist/dialects/singlestore.d.cts +73 -0
  172. package/dist/dialects/singlestore.d.ts +73 -0
  173. package/dist/dialects/singlestore.js +2 -0
  174. package/dist/dialects/singlestore.js.map +1 -0
  175. package/dist/dialects/snowflake.cjs +3 -0
  176. package/dist/dialects/snowflake.cjs.map +1 -0
  177. package/dist/dialects/snowflake.d.cts +320 -0
  178. package/dist/dialects/snowflake.d.ts +320 -0
  179. package/dist/dialects/snowflake.js +3 -0
  180. package/dist/dialects/snowflake.js.map +1 -0
  181. package/dist/dialects/solr.cjs +2 -0
  182. package/dist/dialects/solr.cjs.map +1 -0
  183. package/dist/dialects/solr.d.cts +458 -0
  184. package/dist/dialects/solr.d.ts +458 -0
  185. package/dist/dialects/solr.js +2 -0
  186. package/dist/dialects/solr.js.map +1 -0
  187. package/dist/dialects/spark.cjs +2 -0
  188. package/dist/dialects/spark.cjs.map +1 -0
  189. package/dist/dialects/spark.d.cts +484 -0
  190. package/dist/dialects/spark.d.ts +484 -0
  191. package/dist/dialects/spark.js +2 -0
  192. package/dist/dialects/spark.js.map +1 -0
  193. package/dist/dialects/spark2.cjs +2 -0
  194. package/dist/dialects/spark2.cjs.map +1 -0
  195. package/dist/dialects/spark2.d.cts +486 -0
  196. package/dist/dialects/spark2.d.ts +486 -0
  197. package/dist/dialects/spark2.js +2 -0
  198. package/dist/dialects/spark2.js.map +1 -0
  199. package/dist/dialects/sqlite.cjs +2 -0
  200. package/dist/dialects/sqlite.cjs.map +1 -0
  201. package/dist/dialects/sqlite.d.cts +510 -0
  202. package/dist/dialects/sqlite.d.ts +510 -0
  203. package/dist/dialects/sqlite.js +2 -0
  204. package/dist/dialects/sqlite.js.map +1 -0
  205. package/dist/dialects/starrocks.cjs +2 -0
  206. package/dist/dialects/starrocks.cjs.map +1 -0
  207. package/dist/dialects/starrocks.d.cts +518 -0
  208. package/dist/dialects/starrocks.d.ts +518 -0
  209. package/dist/dialects/starrocks.js +2 -0
  210. package/dist/dialects/starrocks.js.map +1 -0
  211. package/dist/dialects/tableau.cjs +2 -0
  212. package/dist/dialects/tableau.cjs.map +1 -0
  213. package/dist/dialects/tableau.d.cts +466 -0
  214. package/dist/dialects/tableau.d.ts +466 -0
  215. package/dist/dialects/tableau.js +2 -0
  216. package/dist/dialects/tableau.js.map +1 -0
  217. package/dist/dialects/teradata.cjs +2 -0
  218. package/dist/dialects/teradata.cjs.map +1 -0
  219. package/dist/dialects/teradata.d.cts +539 -0
  220. package/dist/dialects/teradata.d.ts +539 -0
  221. package/dist/dialects/teradata.js +2 -0
  222. package/dist/dialects/teradata.js.map +1 -0
  223. package/dist/dialects/trino.cjs +2 -0
  224. package/dist/dialects/trino.cjs.map +1 -0
  225. package/dist/dialects/trino.d.cts +465 -0
  226. package/dist/dialects/trino.d.ts +465 -0
  227. package/dist/dialects/trino.js +2 -0
  228. package/dist/dialects/trino.js.map +1 -0
  229. package/dist/dialects/tsql.cjs +2 -0
  230. package/dist/dialects/tsql.cjs.map +1 -0
  231. package/dist/dialects/tsql.d.cts +703 -0
  232. package/dist/dialects/tsql.d.ts +703 -0
  233. package/dist/dialects/tsql.js +2 -0
  234. package/dist/dialects/tsql.js.map +1 -0
  235. package/dist/index.cjs +5 -25
  236. package/dist/index.cjs.map +1 -1
  237. package/dist/index.d.cts +3 -14178
  238. package/dist/index.d.ts +3 -14178
  239. package/dist/index.js +5 -25
  240. package/dist/index.js.map +1 -1
  241. package/dist/tokens-VcMD09XM.d.cts +15805 -0
  242. package/dist/tokens-VcMD09XM.d.ts +15805 -0
  243. package/package.json +171 -5
@@ -0,0 +1,2 @@
1
+ import{b as n}from"../chunk-FCGUTI7Y.js";import"../chunk-ZBFGQPJR.js";import{Ca as a,Cl as C,Fe as P,Ja as g,Kc as x,Le as L,Pc as N,Po as y,Vc as O,Wd as _,Wj as T,a as S,b as c,c as h,ca as u,d as i,ep as d,fp as l,op as F,p as R,r as p,sb as I,za as m}from"../chunk-KCNOE4DZ.js";var D,U,q,K,M,w,o,e=class extends(w=n.Parser,M=[p],K=[p],q=[p],U=[p],D=[p],w){static get ID_VAR_TOKENS(){return new Set([...m.ID_VAR_TOKENS,"sessionUser","currentCatalog","straightJoin"])}static get NO_PAREN_FUNCTIONS(){let s={...n.Parser.NO_PAREN_FUNCTIONS};return delete s.localtime,delete s.localtimestamp,s}static get NO_PAREN_FUNCTION_PARSERS(){return{...n.Parser.NO_PAREN_FUNCTION_PARSERS,MAP:function(){return this.parseMap()}}}static get LAMBDAS(){return{...n.Parser.LAMBDAS,farrow:function(s){return this.expression(L,{this:u(s,0),expression:this.parseAssignment()})}}}parseLambdaArg(){return this.parseField()}parseMap(){if(this.match("lParen")){let r=this.expression(T,{this:this.parseSelect()});return this.matchRParen(),r}this.match("lBracket")||this.raiseError("Expecting [");let s=this.parseCsv(()=>this.parseLambda()).map(r=>new P({this:R(r.args.this,"string",a),expression:R(r.args.expression,"string",a)}));return this.match("rBracket")||this.raiseError("Expecting ]"),this.expression(T,{this:this.expression(C,{expressions:s})})}static get TABLE_ALIAS_TOKENS(){return new Set([...n.Parser.TABLE_ALIAS_TOKENS,"straightJoin"])}};o=S(w),i(o,10,"ID_VAR_TOKENS",M,e),i(o,10,"NO_PAREN_FUNCTIONS",K,e),i(o,10,"NO_PAREN_FUNCTION_PARSERS",q,e),i(o,10,"LAMBDAS",U,e),i(o,10,"TABLE_ALIAS_TOKENS",D,e),c(o,e),h(o,3,e);var B,$,b,A,t=class extends(b=n.Generator,$=[p],B=[p],b){static get AFTER_HAVING_MODIFIER_TRANSFORMS(){let s=new Map(super.AFTER_HAVING_MODIFIER_TRANSFORMS);return["cluster","distribute","sort"].forEach(r=>s.delete(r)),s}static get ORIGINAL_TRANSFORMS(){let s=new Map([...n.Generator.TRANSFORMS,[x,()=>""],[g,y([d,l])],[N,()=>""],[I,()=>""],[O,()=>""]]);return s.delete(T),s}propertyEqSql(s){return this.binary(s,"=>")}dataTypeSql(s){if(s.isType("list"))return s.args.expressions&&0<s.args.expressions.length?`${this.expressions(s,{flat:!0})} LIST`:"LIST";if(s.isType("map")&&s.args.expressions?.length===2){let[r,V]=s.args.expressions;return`MAP[${this.sql(r)} => ${this.sql(V)}]`}return super.dataTypeSql(s)}listSql(s){let r=u(s.args.expressions||[],0);return r instanceof _?this.func("LIST",[r]):`${this.normalizeFunc("LIST")}[${this.expressions(s,{flat:!0})}]`}toMapSql(s){return s.args.this instanceof _?this.func("MAP",[s.args.this]):`${this.normalizeFunc("MAP")}[${s.args.this instanceof a?this.expressions(s.args.this):s.args.this}]`}};A=S(b),i(A,10,"AFTER_HAVING_MODIFIER_TRANSFORMS",$,t),i(A,10,"ORIGINAL_TRANSFORMS",B,t),c(A,t),h(A,3,t),t.SUPPORTS_DECODE_CASE=!1,t.TRY_SUPPORTED=!1,t.SUPPORTS_UESCAPE=!1,t.SUPPORTS_CREATE_TABLE_LIKE=!1,t.SUPPORTS_BETWEEN_FLAGS=!1;var E=class extends n{};E.DIALECT_NAME="materialize",E.Parser=e,E.Generator=t;F.register("materialize",E);export{E as Materialize};
2
+ //# sourceMappingURL=materialize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/materialize.ts"],"sourcesContent":["import type {\n DataTypeExpr, ListExpr,\n} from '../expressions';\nimport {\n AutoIncrementColumnConstraintExpr,\n CreateExpr, DataTypeExprKind, Expression, GeneratedAsIdentityColumnConstraintExpr, KwargExpr, OnConflictExpr, PrimaryKeyColumnConstraintExpr, PropertyEqExpr, SelectExpr, StructExpr, ToMapExpr,\n} from '../expressions';\nimport type {\n Generator,\n} from '../generator';\nimport {\n seqGet,\n} from '../helper';\nimport {\n Parser,\n} from '../parser';\nimport {\n cache, narrowInstanceOf,\n} from '../port_internals';\nimport {\n TokenType,\n} from '../tokens';\nimport {\n ctasWithTmpTablesToCreateTmpView, preprocess, removeUniqueConstraints,\n} from '../transforms';\nimport {\n Dialect, Dialects,\n} from './dialect';\nimport {\n Postgres,\n} from './postgres';\n\nclass MaterializeParser extends Postgres.Parser {\n @cache\n static get ID_VAR_TOKENS (): Set<TokenType> {\n return new Set([\n ...Parser.ID_VAR_TOKENS,\n TokenType.SESSION_USER,\n TokenType.CURRENT_CATALOG,\n TokenType.STRAIGHT_JOIN,\n ]);\n }\n\n // port from _Dialect metaclass logic\n @cache\n static get NO_PAREN_FUNCTIONS () {\n const noParenFunctions = {\n ...Postgres.Parser.NO_PAREN_FUNCTIONS,\n };\n delete noParenFunctions[TokenType.LOCALTIME];\n delete noParenFunctions[TokenType.LOCALTIMESTAMP];\n return noParenFunctions;\n }\n\n @cache\n static get NO_PAREN_FUNCTION_PARSERS () {\n return {\n ...Postgres.Parser.NO_PAREN_FUNCTION_PARSERS,\n MAP: function (this: Parser) {\n return (this as MaterializeParser).parseMap();\n },\n };\n }\n\n @cache\n static get LAMBDAS () {\n return {\n ...Postgres.Parser.LAMBDAS,\n [TokenType.FARROW]: function (this: Parser, expressions: Expression[]) {\n return this.expression(KwargExpr, {\n this: seqGet(expressions, 0),\n expression: (this as MaterializeParser).parseAssignment(),\n });\n },\n };\n }\n\n parseLambdaArg (): Expression | undefined {\n return this.parseField();\n }\n\n parseMap (): ToMapExpr {\n if (this.match(TokenType.L_PAREN)) {\n const toMap = this.expression(ToMapExpr, {\n this: this.parseSelect(),\n });\n this.matchRParen();\n return toMap;\n }\n\n if (!this.match(TokenType.L_BRACKET)) {\n this.raiseError('Expecting [');\n }\n\n const entries = this.parseCsv(() => (this as MaterializeParser).parseLambda()).map((e: Expression) =>\n new PropertyEqExpr({\n this: narrowInstanceOf(e.args.this, 'string', Expression),\n expression: narrowInstanceOf(e.args.expression, 'string', Expression),\n }));\n\n if (!this.match(TokenType.R_BRACKET)) {\n this.raiseError('Expecting ]');\n }\n\n return this.expression(ToMapExpr, {\n this: this.expression(StructExpr, {\n expressions: entries,\n }),\n });\n }\n\n // port from _Dialect metaclass logic\n @cache\n static get TABLE_ALIAS_TOKENS (): Set<TokenType> {\n return new Set([\n ...Postgres.Parser.TABLE_ALIAS_TOKENS,\n TokenType.STRAIGHT_JOIN,\n ]);\n }\n}\nclass MaterializeGenerator extends Postgres.Generator {\n // port from _Dialect metaclass logic\n @cache\n static get AFTER_HAVING_MODIFIER_TRANSFORMS () {\n const modifiers = new Map(super.AFTER_HAVING_MODIFIER_TRANSFORMS);\n [\n 'cluster',\n 'distribute',\n 'sort',\n ].forEach((m) => modifiers.delete(m));\n return modifiers;\n }\n\n // port from _Dialect metaclass logic\n static SUPPORTS_DECODE_CASE = false;\n // port from _Dialect metaclass logic\n static TRY_SUPPORTED = false;\n // port from _Dialect metaclass logic\n static SUPPORTS_UESCAPE = false;\n static SUPPORTS_CREATE_TABLE_LIKE = false;\n static SUPPORTS_BETWEEN_FLAGS = false;\n\n @cache\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static get ORIGINAL_TRANSFORMS (): Map<typeof Expression, (this: Generator, e: any) => string> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const transforms = new Map<typeof Expression, (this: Generator, e: any) => string>([\n ...Postgres.Generator.TRANSFORMS,\n [\n AutoIncrementColumnConstraintExpr,\n () => '',\n ],\n [\n CreateExpr,\n preprocess([\n removeUniqueConstraints,\n ctasWithTmpTablesToCreateTmpView,\n ]),\n ],\n [\n GeneratedAsIdentityColumnConstraintExpr,\n () => '',\n ],\n [\n OnConflictExpr,\n () => '',\n ],\n [\n PrimaryKeyColumnConstraintExpr,\n () => '',\n ],\n ]);\n transforms.delete(ToMapExpr);\n return transforms;\n }\n\n propertyEqSql (expression: PropertyEqExpr): string {\n return this.binary(expression, '=>');\n }\n\n dataTypeSql (expression: DataTypeExpr): string {\n if (expression.isType(DataTypeExprKind.LIST)) {\n if (expression.args.expressions && 0 < expression.args.expressions.length) {\n return `${this.expressions(expression, {\n flat: true,\n })} LIST`;\n }\n return 'LIST';\n }\n\n if (expression.isType(DataTypeExprKind.MAP) && expression.args.expressions?.length === 2) {\n const [\n key,\n value,\n ] = expression.args.expressions;\n return `MAP[${this.sql(key)} => ${this.sql(value)}]`;\n }\n\n return super.dataTypeSql(expression);\n }\n\n listSql (expression: ListExpr): string {\n const firstExpr = seqGet(expression.args.expressions || [\n ], 0);\n if (firstExpr instanceof SelectExpr) {\n return this.func('LIST', [\n firstExpr,\n ]);\n }\n\n return `${this.normalizeFunc('LIST')}[${this.expressions(expression, {\n flat: true,\n })}]`;\n }\n\n toMapSql (expression: ToMapExpr): string {\n if (expression.args.this instanceof SelectExpr) {\n return this.func('MAP', [\n expression.args.this,\n ]);\n }\n return `${this.normalizeFunc('MAP')}[${expression.args.this instanceof Expression ? this.expressions(expression.args.this) : expression.args.this}]`;\n }\n}\n\nexport class Materialize extends Postgres {\n static DIALECT_NAME = Dialects.MATERIALIZE;\n static Parser = MaterializeParser;\n static Generator = MaterializeGenerator;\n}\n\nDialect.register(Dialects.MATERIALIZE, Materialize);\n"],"mappings":"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","names":["_TABLE_ALIAS_TOKENS_dec","_LAMBDAS_dec","_NO_PAREN_FUNCTION_PARSERS_dec","_NO_PAREN_FUNCTIONS_dec","_ID_VAR_TOKENS_dec","_a","_init","MaterializeParser","Postgres","cache","Parser","noParenFunctions","expressions","KwargExpr","seqGet","toMap","ToMapExpr","entries","e","PropertyEqExpr","narrowInstanceOf","Expression","StructExpr","__decoratorStart","__decorateElement","__decoratorMetadata","__runInitializers","_ORIGINAL_TRANSFORMS_dec","_AFTER_HAVING_MODIFIER_TRANSFORMS_dec","MaterializeGenerator","modifiers","m","transforms","AutoIncrementColumnConstraintExpr","CreateExpr","preprocess","removeUniqueConstraints","ctasWithTmpTablesToCreateTmpView","GeneratedAsIdentityColumnConstraintExpr","OnConflictExpr","PrimaryKeyColumnConstraintExpr","expression","key","value","firstExpr","SelectExpr","Materialize","Dialect"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkR7C3ZHVKcjs = require('../chunk-R7C3ZHVK.cjs');require('../chunk-2Z3O2CFM.cjs');exports.MySQL = _chunkR7C3ZHVKcjs.j; exports.TIME_SPECIFIERS = _chunkR7C3ZHVKcjs.c; exports.buildStrToDate = _chunkR7C3ZHVKcjs.d; exports.dateAddSql = _chunkR7C3ZHVKcjs.g; exports.dateTruncSql = _chunkR7C3ZHVKcjs.b; exports.removeTsOrDsToDate = _chunkR7C3ZHVKcjs.i; exports.showParser = _chunkR7C3ZHVKcjs.a; exports.strToDateSql = _chunkR7C3ZHVKcjs.e; exports.tsOrDsToDateSql = _chunkR7C3ZHVKcjs.h; exports.unixToTimeSql = _chunkR7C3ZHVKcjs.f;
2
+ //# sourceMappingURL=mysql.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/huydna/projects/sqlingo.js/dist/dialects/mysql.cjs"],"names":[],"mappings":"AAAA,kIAAsD,iCAA8B,2bAAgM","file":"/home/huydna/projects/sqlingo.js/dist/dialects/mysql.cjs"}
@@ -0,0 +1,292 @@
1
+ import { c as Dialect, d as Dialects, a0 as NormalizationStrategy, a3 as ExpressionMetadata, m as Tokenizer, _ as TokenPair, l as TokenType, i as Parser, E as Expression, bg as GeneratedAsIdentityColumnConstraintExpr, cW as ComputedColumnConstraintExpr, c_ as GeneratedAsRowColumnConstraintExpr, aW as IndexColumnConstraintExpr, bp as ShowExpr, d_ as AlterIndexExpr, aX as PartitionExpr, aU as PrimaryKeyColumnConstraintExpr, aV as PrimaryKeyExpr, G as Generator, ah as NullOrderingSupported, $ as DataTypeExprKind, aj as PropertiesLocation, cS as ArrayExpr, d$ as ArrayContainsAllExpr, e0 as DPipeExpr, aL as ExtractExpr, b5 as DataTypeExpr, d9 as JsonArrayContainsExpr, at as CastExpr, e1 as AlterRenameExpr, de as AlterColumnExpr, cl as TimestampTruncExpr, cB as ConvertTimezoneExpr, ao as AtTimeZoneExpr, cL as IsAsciiExpr, cc as IgnoreNullsExpr, d5 as CurrentSchemaExpr, e2 as PartitionByRangePropertyExpr, e3 as PartitionByListPropertyExpr, e4 as PartitionListExpr, bn as PartitionRangeExpr, b0 as StrToDateExpr, aC as StrToTimeExpr, dU as DateAddExpr, ak as DateTruncExpr, aS as FuncExpr, e5 as TsOrDsToDateExpr, bd as UnixToTimeExpr } from '../tokens-VcMD09XM.cjs';
2
+
3
+ /**
4
+ * A higher-order function that returns a parser for MySQL SHOW statements.
5
+ * @param args - Arguments to pass to the internal MySQL SHOW parser.
6
+ * @param kwargs - Keyword arguments to pass to the internal MySQL SHOW parser.
7
+ * @returns A function that takes a MySQL Parser and returns a ShowExpr.
8
+ */
9
+ declare function showParser(thisArg: string, options?: {
10
+ target?: boolean | string;
11
+ full?: boolean;
12
+ global?: boolean;
13
+ }): (this: Parser) => ShowExpr;
14
+ /**
15
+ * Transpiles the DATE_TRUNC expression into MySQL-compatible SQL.
16
+ * Since MySQL lacks a native DATE_TRUNC, this uses string concatenation and conversion.
17
+ * @param self - The MySQL Generator instance.
18
+ * @param expression - The DateTruncExpr node to transpile.
19
+ * @returns The generated SQL string.
20
+ */
21
+ declare function dateTruncSql(this: Generator, expression: DateTruncExpr): string;
22
+ /**
23
+ * All specifiers for time parts (as opposed to date parts)
24
+ * Reference: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format
25
+ */
26
+ declare const TIME_SPECIFIERS: Set<string>;
27
+ /**
28
+ * Parser builder for STR_TO_DATE. Decides whether to return a StrToDateExpr or StrToTimeExpr
29
+ * based on the presence of time specifiers in the format string.
30
+ */
31
+ declare function buildStrToDate(args: [Expression, ...(string | Expression | undefined)[]]): StrToDateExpr | StrToTimeExpr;
32
+ /**
33
+ * Generator for STR_TO_DATE.
34
+ */
35
+ declare function strToDateSql(this: Generator, expression: StrToDateExpr | StrToTimeExpr | TsOrDsToDateExpr): string;
36
+ /**
37
+ * Generator for UNIX_TO_TIME. Handles optional scale for sub-second precision.
38
+ */
39
+ declare function unixToTimeSql(this: Generator, expression: UnixToTimeExpr): string;
40
+ /**
41
+ * Higher-order function to generate MySQL DATE_ADD or DATE_SUB calls.
42
+ * @param kind - Either 'ADD' or 'SUB'.
43
+ * @returns A function that generates the MySQL-specific DATE logic.
44
+ */
45
+ declare function dateAddSql(kind: string): (this: Generator, expression: DateAddExpr) => string;
46
+ /**
47
+ * Handles converting a Timestamp or DateString to a Date in MySQL.
48
+ * @param self - The MySQL Generator.
49
+ * @param expression - The TsOrDsToDateExpr node.
50
+ */
51
+ declare function tsOrDsToDateSql(this: Generator, expression: TsOrDsToDateExpr): string;
52
+ /**
53
+ * Optimization that removes redundant TsOrDsToDate wrappers when the parent
54
+ * function can handle raw types.
55
+ */
56
+ declare function removeTsOrDsToDate<T extends FuncExpr>(toSql?: (this: Generator, expression: T) => string, args?: string[]): (this: Generator, expression: T) => string;
57
+ declare class MySQLTokenizer extends Tokenizer {
58
+ static QUOTES: TokenPair[];
59
+ static COMMENTS: TokenPair[];
60
+ static IDENTIFIERS: TokenPair[];
61
+ static STRING_ESCAPES: string[];
62
+ static BIT_STRINGS: TokenPair[];
63
+ static HEX_STRINGS: TokenPair[];
64
+ /**
65
+ * Special characters that are recognized after an escape character (\) in MySQL.
66
+ * Reference: https://dev.mysql.com/doc/refman/8.4/en/string-literals.html
67
+ */
68
+ ESCAPE_FOLLOW_CHARS: string[];
69
+ NESTED_COMMENTS: boolean;
70
+ static get ORIGINAL_KEYWORDS(): Record<string, TokenType>;
71
+ static get COMMANDS(): Set<TokenType>;
72
+ }
73
+ declare class MySQLParser extends Parser {
74
+ static get ID_VAR_TOKENS(): Set<TokenType>;
75
+ static get FUNC_TOKENS(): Set<TokenType>;
76
+ static get CONJUNCTION(): Partial<Record<TokenType, typeof Expression>>;
77
+ static get DISJUNCTION(): Partial<Record<TokenType, typeof Expression>>;
78
+ static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
79
+ static get RANGE_PARSERS(): Partial<Record<TokenType, (this: Parser, this_: Expression) => Expression | undefined>>;
80
+ static get FUNCTIONS(): typeof Parser.FUNCTIONS;
81
+ static get FUNCTION_PARSERS(): Partial<Record<string, (this: Parser) => Expression | undefined>>;
82
+ static get STATEMENT_PARSERS(): Partial<Record<TokenType, (this: Parser) => Expression | undefined>>;
83
+ static SHOW_PARSERS: typeof Parser.SHOW_PARSERS;
84
+ static get PROPERTY_PARSERS(): Record<string, (this: Parser, ...args: unknown[]) => Expression | Expression[] | undefined>;
85
+ static get SET_PARSERS(): Record<string, (this: Parser) => Expression | undefined>;
86
+ static get CONSTRAINT_PARSERS(): Partial<Record<string, (this: Parser, ...args: unknown[]) => Expression | Expression[] | undefined>>;
87
+ static get ALTER_PARSERS(): Partial<Record<string, (this: Parser) => Expression | Expression[] | undefined>>;
88
+ static get ALTER_ALTER_PARSERS(): Partial<Record<string, (this: Parser) => Expression>>;
89
+ static get SCHEMA_UNNAMED_CONSTRAINTS(): Set<string>;
90
+ static get PROFILE_TYPES(): {
91
+ ALL: never[];
92
+ CPU: never[];
93
+ IPC: never[];
94
+ MEMORY: never[];
95
+ SOURCE: never[];
96
+ SWAPS: never[];
97
+ BLOCK: string[];
98
+ CONTEXT: string[];
99
+ PAGE: string[];
100
+ };
101
+ static get TYPE_TOKENS(): Set<TokenType>;
102
+ static get ENUM_TYPE_TOKENS(): Set<TokenType>;
103
+ /**
104
+ * Modifiers that can appear in a MySQL SELECT statement.
105
+ */
106
+ static get OPERATION_MODIFIERS(): Set<string>;
107
+ static LOG_DEFAULTS_TO_LN: boolean;
108
+ static STRING_ALIASES: boolean;
109
+ static VALUES_FOLLOWED_BY_PAREN: boolean;
110
+ static SUPPORTS_PARTITION_SELECTION: boolean;
111
+ /**
112
+ * Handles MySQL's GENERATED ALWAYS AS logic, including VIRTUAL vs STORED persistence.
113
+ */
114
+ parseGeneratedAsIdentity(): GeneratedAsIdentityColumnConstraintExpr | ComputedColumnConstraintExpr | GeneratedAsRowColumnConstraintExpr;
115
+ /**
116
+ * Parses MySQL-specific primary key parts which allow column prefixes (e.g. KEY(col(10))).
117
+ */
118
+ parsePrimaryKeyPart(): Expression | undefined;
119
+ /**
120
+ * Parses MySQL index constraints, including support for KEY_BLOCK_SIZE,
121
+ * custom parsers, and visibility toggles.
122
+ */
123
+ protected parseIndexConstraint(kind?: string): IndexColumnConstraintExpr;
124
+ /**
125
+ * Core internal parser for the varied MySQL SHOW statement variants.
126
+ */
127
+ parseShowMysql(thisArg: string, options?: {
128
+ target?: boolean | string;
129
+ full?: boolean;
130
+ global?: boolean;
131
+ }): ShowExpr;
132
+ protected parseOldstyleLimit(): [Expression | undefined, Expression | undefined];
133
+ protected parseSetItemCharset(kind: string): Expression;
134
+ protected parseSetItemNames(): Expression;
135
+ /**
136
+ * Overrides core type parsing to handle MySQL's unique 'BINARY' modifier
137
+ * which can act as a cast without parentheses.
138
+ */
139
+ parseType(options?: {
140
+ parseInterval?: boolean;
141
+ fallbackToIdentifier?: boolean;
142
+ }): Expression | undefined;
143
+ protected parseAlterTableAlterIndex(): AlterIndexExpr;
144
+ /**
145
+ * Parses MySQL partitioning properties for RANGE and LIST schemes.
146
+ */
147
+ protected parsePartitionProperty(): Expression | Expression[] | undefined;
148
+ protected parsePartitionRangeValue(): Expression | undefined;
149
+ protected parsePartitionListValue(): PartitionExpr;
150
+ parsePrimaryKey(options?: {
151
+ wrappedOptional?: boolean;
152
+ inProps?: boolean;
153
+ namedPrimaryKey?: boolean;
154
+ }): PrimaryKeyColumnConstraintExpr | PrimaryKeyExpr;
155
+ }
156
+ declare class MySQLGenerator extends Generator {
157
+ static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
158
+ static SUPPORTS_DECODE_CASE: boolean;
159
+ static readonly SELECT_KINDS: string[];
160
+ static TRY_SUPPORTED: boolean;
161
+ static SUPPORTS_UESCAPE: boolean;
162
+ static INTERVAL_ALLOWS_PLURAL_FORM: boolean;
163
+ static LOCKING_READS_SUPPORTED: boolean;
164
+ static get NULL_ORDERING_SUPPORTED(): NullOrderingSupported;
165
+ static JOIN_HINTS: boolean;
166
+ static TABLE_HINTS: boolean;
167
+ static DUPLICATE_KEY_UPDATE_WITH_SET: boolean;
168
+ static QUERY_HINT_SEP: string;
169
+ static VALUES_AS_TABLE: boolean;
170
+ static NVL2_SUPPORTED: boolean;
171
+ static LAST_DAY_SUPPORTS_DATE_PART: boolean;
172
+ static JSON_TYPE_REQUIRED_FOR_EXTRACTION: boolean;
173
+ static JSON_PATH_BRACKETED_KEY_SUPPORTED: boolean;
174
+ static JSON_KEY_VALUE_PAIR_SEP: string;
175
+ static SUPPORTS_TO_NUMBER: boolean;
176
+ static PARSE_JSON_NAME: string | undefined;
177
+ static PAD_FILL_PATTERN_IS_REQUIRED: boolean;
178
+ static WRAP_DERIVED_VALUES: boolean;
179
+ static VARCHAR_REQUIRES_SIZE: boolean;
180
+ static SUPPORTS_MEDIAN: boolean;
181
+ static UPDATE_STATEMENT_SUPPORTS_FROM: boolean;
182
+ static SUPPORTS_CONVERT_TIMEZONE: boolean;
183
+ static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
184
+ /**
185
+ * Maps unsigned types to their standard MySQL counterparts.
186
+ * MySQL adds the 'UNSIGNED' attribute during generation based on the DataTypeExpr.
187
+ */
188
+ static get UNSIGNED_TYPE_MAPPING(): Map<DataTypeExprKind, string>;
189
+ /**
190
+ * Standardizes various timestamp types to MySQL's DATETIME or TIMESTAMP.
191
+ */
192
+ static get TIMESTAMP_TYPE_MAPPING(): Map<DataTypeExprKind, string>;
193
+ static get TYPE_MAPPING(): Map<DataTypeExprKind | string, string>;
194
+ static get PROPERTIES_LOCATION(): Map<typeof Expression, PropertiesLocation>;
195
+ static LIMIT_FETCH: string;
196
+ static LIMIT_ONLY_LITERALS: boolean;
197
+ /**
198
+ * MySQL CAST targets for character-based types.
199
+ */
200
+ static get CHAR_CAST_MAPPING(): {};
201
+ /**
202
+ * MySQL CAST targets for integer-based types.
203
+ */
204
+ static get SIGNED_CAST_MAPPING(): {};
205
+ /**
206
+ * MySQL is restricted in which types it can use as a CAST target.
207
+ * Reference: https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast
208
+ */
209
+ static get CAST_MAPPING(): Record<string, string>;
210
+ /**
211
+ * Types that require specific function-like syntax for timestamp manipulation.
212
+ */
213
+ static get TIMESTAMP_FUNC_TYPES(): Set<string>;
214
+ /**
215
+ * Comprehensive list of MySQL reserved keywords for identifier quoting.
216
+ * Reference: https://dev.mysql.com/doc/refman/8.0/en/keywords.html
217
+ */
218
+ static get RESERVED_KEYWORDS(): Set<string>;
219
+ computedColumnConstraintSql(expression: ComputedColumnConstraintExpr): string;
220
+ arraySql(expression: ArrayExpr): string;
221
+ arrayContainsAllSql(expression: ArrayContainsAllExpr): string;
222
+ dpipeSql(expression: DPipeExpr): string;
223
+ extractSql(expression: ExtractExpr): string;
224
+ dataTypeSql(expression: DataTypeExpr): string;
225
+ jsonArrayContainsSql(expression: JsonArrayContainsExpr): string;
226
+ castSql(expression: CastExpr, _options?: {
227
+ safePrefix?: string;
228
+ }): string;
229
+ showSql(expression: ShowExpr): string;
230
+ /**
231
+ * MySQL doesn't use the TO keyword in ALTER ... RENAME.
232
+ */
233
+ alterRenameSql(expression: AlterRenameExpr, _options?: {
234
+ includeTo?: boolean;
235
+ }): string;
236
+ /**
237
+ * MySQL uses MODIFY COLUMN for changing column data types.
238
+ */
239
+ alterColumnSql(expression: AlterColumnExpr): string;
240
+ protected prefixedSql(prefix: string, expression: Expression, arg: string): string;
241
+ protected oldStyleLimitSql(expression: ShowExpr): string;
242
+ /**
243
+ * Simulates TIMESTAMP_TRUNC using TIMESTAMPDIFF and DATE_ADD math.
244
+ */
245
+ timestampTruncSql(expression: TimestampTruncExpr): string;
246
+ convertTimezoneSql(expression: ConvertTimezoneExpr): string;
247
+ attimezoneSql(expression: AtTimeZoneExpr): string;
248
+ isasciiSql(expression: IsAsciiExpr): string;
249
+ ignoreNullsSql(expression: IgnoreNullsExpr): string;
250
+ currentSchemaSql(_expression: CurrentSchemaExpr): string;
251
+ partitionSql(expression: PartitionExpr): string;
252
+ partitionByRangeOrListSql(expression: PartitionByRangePropertyExpr | PartitionByListPropertyExpr, kind: string): string;
253
+ partitionByRangePropertySql(expression: PartitionByRangePropertyExpr): string;
254
+ partitionByListPropertySql(expression: PartitionByListPropertyExpr): string;
255
+ partitionListSql(expression: PartitionListExpr): string;
256
+ partitionRangeSql(expression: PartitionRangeExpr): string;
257
+ }
258
+ declare class MySQL extends Dialect {
259
+ static DIALECT_NAME: Dialects;
260
+ static PROMOTE_TO_INFERRED_DATETIME_TYPE: boolean;
261
+ static IDENTIFIERS_CAN_START_WITH_DIGIT: boolean;
262
+ /**
263
+ * We default to treating all identifiers as case-sensitive, since it matches MySQL's
264
+ * behavior on Linux systems. For MacOS and Windows systems, one can override this
265
+ * setting by specifying `dialect="mysql, normalization_strategy = lowercase"`.
266
+ * * Reference: https://dev.mysql.com/doc/refman/8.2/en/identifier-case-sensitivity.html
267
+ */
268
+ static get NORMALIZATION_STRATEGY(): NormalizationStrategy;
269
+ static TIME_FORMAT: string;
270
+ static DPIPE_IS_STRING_CONCAT: boolean;
271
+ static SUPPORTS_USER_DEFINED_TYPES: boolean;
272
+ static SUPPORTS_SEMI_ANTI_JOIN: boolean;
273
+ static SAFE_DIVISION: boolean;
274
+ static SAFE_TO_ELIMINATE_DOUBLE_NEGATION: boolean;
275
+ static LEAST_GREATEST_IGNORES_NULLS: boolean;
276
+ static get EXPRESSION_METADATA(): ExpressionMetadata;
277
+ /**
278
+ * MySQL-specific time format mapping.
279
+ * Reference: https://prestodb.io/docs/current/functions/datetime.html#mysql-date-functions
280
+ */
281
+ static get TIME_MAPPING(): Record<string, string>;
282
+ /**
283
+ * Valid interval units supported by MySQL.
284
+ * Includes standard units plus MySQL-specific compound units.
285
+ */
286
+ static get VALID_INTERVAL_UNITS(): Set<string>;
287
+ static Tokenizer: typeof MySQLTokenizer;
288
+ static Parser: typeof MySQLParser;
289
+ static Generator: typeof MySQLGenerator;
290
+ }
291
+
292
+ export { MySQL, TIME_SPECIFIERS, buildStrToDate, dateAddSql, dateTruncSql, removeTsOrDsToDate, showParser, strToDateSql, tsOrDsToDateSql, unixToTimeSql };
@@ -0,0 +1,292 @@
1
+ import { c as Dialect, d as Dialects, a0 as NormalizationStrategy, a3 as ExpressionMetadata, m as Tokenizer, _ as TokenPair, l as TokenType, i as Parser, E as Expression, bg as GeneratedAsIdentityColumnConstraintExpr, cW as ComputedColumnConstraintExpr, c_ as GeneratedAsRowColumnConstraintExpr, aW as IndexColumnConstraintExpr, bp as ShowExpr, d_ as AlterIndexExpr, aX as PartitionExpr, aU as PrimaryKeyColumnConstraintExpr, aV as PrimaryKeyExpr, G as Generator, ah as NullOrderingSupported, $ as DataTypeExprKind, aj as PropertiesLocation, cS as ArrayExpr, d$ as ArrayContainsAllExpr, e0 as DPipeExpr, aL as ExtractExpr, b5 as DataTypeExpr, d9 as JsonArrayContainsExpr, at as CastExpr, e1 as AlterRenameExpr, de as AlterColumnExpr, cl as TimestampTruncExpr, cB as ConvertTimezoneExpr, ao as AtTimeZoneExpr, cL as IsAsciiExpr, cc as IgnoreNullsExpr, d5 as CurrentSchemaExpr, e2 as PartitionByRangePropertyExpr, e3 as PartitionByListPropertyExpr, e4 as PartitionListExpr, bn as PartitionRangeExpr, b0 as StrToDateExpr, aC as StrToTimeExpr, dU as DateAddExpr, ak as DateTruncExpr, aS as FuncExpr, e5 as TsOrDsToDateExpr, bd as UnixToTimeExpr } from '../tokens-VcMD09XM.js';
2
+
3
+ /**
4
+ * A higher-order function that returns a parser for MySQL SHOW statements.
5
+ * @param args - Arguments to pass to the internal MySQL SHOW parser.
6
+ * @param kwargs - Keyword arguments to pass to the internal MySQL SHOW parser.
7
+ * @returns A function that takes a MySQL Parser and returns a ShowExpr.
8
+ */
9
+ declare function showParser(thisArg: string, options?: {
10
+ target?: boolean | string;
11
+ full?: boolean;
12
+ global?: boolean;
13
+ }): (this: Parser) => ShowExpr;
14
+ /**
15
+ * Transpiles the DATE_TRUNC expression into MySQL-compatible SQL.
16
+ * Since MySQL lacks a native DATE_TRUNC, this uses string concatenation and conversion.
17
+ * @param self - The MySQL Generator instance.
18
+ * @param expression - The DateTruncExpr node to transpile.
19
+ * @returns The generated SQL string.
20
+ */
21
+ declare function dateTruncSql(this: Generator, expression: DateTruncExpr): string;
22
+ /**
23
+ * All specifiers for time parts (as opposed to date parts)
24
+ * Reference: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format
25
+ */
26
+ declare const TIME_SPECIFIERS: Set<string>;
27
+ /**
28
+ * Parser builder for STR_TO_DATE. Decides whether to return a StrToDateExpr or StrToTimeExpr
29
+ * based on the presence of time specifiers in the format string.
30
+ */
31
+ declare function buildStrToDate(args: [Expression, ...(string | Expression | undefined)[]]): StrToDateExpr | StrToTimeExpr;
32
+ /**
33
+ * Generator for STR_TO_DATE.
34
+ */
35
+ declare function strToDateSql(this: Generator, expression: StrToDateExpr | StrToTimeExpr | TsOrDsToDateExpr): string;
36
+ /**
37
+ * Generator for UNIX_TO_TIME. Handles optional scale for sub-second precision.
38
+ */
39
+ declare function unixToTimeSql(this: Generator, expression: UnixToTimeExpr): string;
40
+ /**
41
+ * Higher-order function to generate MySQL DATE_ADD or DATE_SUB calls.
42
+ * @param kind - Either 'ADD' or 'SUB'.
43
+ * @returns A function that generates the MySQL-specific DATE logic.
44
+ */
45
+ declare function dateAddSql(kind: string): (this: Generator, expression: DateAddExpr) => string;
46
+ /**
47
+ * Handles converting a Timestamp or DateString to a Date in MySQL.
48
+ * @param self - The MySQL Generator.
49
+ * @param expression - The TsOrDsToDateExpr node.
50
+ */
51
+ declare function tsOrDsToDateSql(this: Generator, expression: TsOrDsToDateExpr): string;
52
+ /**
53
+ * Optimization that removes redundant TsOrDsToDate wrappers when the parent
54
+ * function can handle raw types.
55
+ */
56
+ declare function removeTsOrDsToDate<T extends FuncExpr>(toSql?: (this: Generator, expression: T) => string, args?: string[]): (this: Generator, expression: T) => string;
57
+ declare class MySQLTokenizer extends Tokenizer {
58
+ static QUOTES: TokenPair[];
59
+ static COMMENTS: TokenPair[];
60
+ static IDENTIFIERS: TokenPair[];
61
+ static STRING_ESCAPES: string[];
62
+ static BIT_STRINGS: TokenPair[];
63
+ static HEX_STRINGS: TokenPair[];
64
+ /**
65
+ * Special characters that are recognized after an escape character (\) in MySQL.
66
+ * Reference: https://dev.mysql.com/doc/refman/8.4/en/string-literals.html
67
+ */
68
+ ESCAPE_FOLLOW_CHARS: string[];
69
+ NESTED_COMMENTS: boolean;
70
+ static get ORIGINAL_KEYWORDS(): Record<string, TokenType>;
71
+ static get COMMANDS(): Set<TokenType>;
72
+ }
73
+ declare class MySQLParser extends Parser {
74
+ static get ID_VAR_TOKENS(): Set<TokenType>;
75
+ static get FUNC_TOKENS(): Set<TokenType>;
76
+ static get CONJUNCTION(): Partial<Record<TokenType, typeof Expression>>;
77
+ static get DISJUNCTION(): Partial<Record<TokenType, typeof Expression>>;
78
+ static get TABLE_ALIAS_TOKENS(): Set<TokenType>;
79
+ static get RANGE_PARSERS(): Partial<Record<TokenType, (this: Parser, this_: Expression) => Expression | undefined>>;
80
+ static get FUNCTIONS(): typeof Parser.FUNCTIONS;
81
+ static get FUNCTION_PARSERS(): Partial<Record<string, (this: Parser) => Expression | undefined>>;
82
+ static get STATEMENT_PARSERS(): Partial<Record<TokenType, (this: Parser) => Expression | undefined>>;
83
+ static SHOW_PARSERS: typeof Parser.SHOW_PARSERS;
84
+ static get PROPERTY_PARSERS(): Record<string, (this: Parser, ...args: unknown[]) => Expression | Expression[] | undefined>;
85
+ static get SET_PARSERS(): Record<string, (this: Parser) => Expression | undefined>;
86
+ static get CONSTRAINT_PARSERS(): Partial<Record<string, (this: Parser, ...args: unknown[]) => Expression | Expression[] | undefined>>;
87
+ static get ALTER_PARSERS(): Partial<Record<string, (this: Parser) => Expression | Expression[] | undefined>>;
88
+ static get ALTER_ALTER_PARSERS(): Partial<Record<string, (this: Parser) => Expression>>;
89
+ static get SCHEMA_UNNAMED_CONSTRAINTS(): Set<string>;
90
+ static get PROFILE_TYPES(): {
91
+ ALL: never[];
92
+ CPU: never[];
93
+ IPC: never[];
94
+ MEMORY: never[];
95
+ SOURCE: never[];
96
+ SWAPS: never[];
97
+ BLOCK: string[];
98
+ CONTEXT: string[];
99
+ PAGE: string[];
100
+ };
101
+ static get TYPE_TOKENS(): Set<TokenType>;
102
+ static get ENUM_TYPE_TOKENS(): Set<TokenType>;
103
+ /**
104
+ * Modifiers that can appear in a MySQL SELECT statement.
105
+ */
106
+ static get OPERATION_MODIFIERS(): Set<string>;
107
+ static LOG_DEFAULTS_TO_LN: boolean;
108
+ static STRING_ALIASES: boolean;
109
+ static VALUES_FOLLOWED_BY_PAREN: boolean;
110
+ static SUPPORTS_PARTITION_SELECTION: boolean;
111
+ /**
112
+ * Handles MySQL's GENERATED ALWAYS AS logic, including VIRTUAL vs STORED persistence.
113
+ */
114
+ parseGeneratedAsIdentity(): GeneratedAsIdentityColumnConstraintExpr | ComputedColumnConstraintExpr | GeneratedAsRowColumnConstraintExpr;
115
+ /**
116
+ * Parses MySQL-specific primary key parts which allow column prefixes (e.g. KEY(col(10))).
117
+ */
118
+ parsePrimaryKeyPart(): Expression | undefined;
119
+ /**
120
+ * Parses MySQL index constraints, including support for KEY_BLOCK_SIZE,
121
+ * custom parsers, and visibility toggles.
122
+ */
123
+ protected parseIndexConstraint(kind?: string): IndexColumnConstraintExpr;
124
+ /**
125
+ * Core internal parser for the varied MySQL SHOW statement variants.
126
+ */
127
+ parseShowMysql(thisArg: string, options?: {
128
+ target?: boolean | string;
129
+ full?: boolean;
130
+ global?: boolean;
131
+ }): ShowExpr;
132
+ protected parseOldstyleLimit(): [Expression | undefined, Expression | undefined];
133
+ protected parseSetItemCharset(kind: string): Expression;
134
+ protected parseSetItemNames(): Expression;
135
+ /**
136
+ * Overrides core type parsing to handle MySQL's unique 'BINARY' modifier
137
+ * which can act as a cast without parentheses.
138
+ */
139
+ parseType(options?: {
140
+ parseInterval?: boolean;
141
+ fallbackToIdentifier?: boolean;
142
+ }): Expression | undefined;
143
+ protected parseAlterTableAlterIndex(): AlterIndexExpr;
144
+ /**
145
+ * Parses MySQL partitioning properties for RANGE and LIST schemes.
146
+ */
147
+ protected parsePartitionProperty(): Expression | Expression[] | undefined;
148
+ protected parsePartitionRangeValue(): Expression | undefined;
149
+ protected parsePartitionListValue(): PartitionExpr;
150
+ parsePrimaryKey(options?: {
151
+ wrappedOptional?: boolean;
152
+ inProps?: boolean;
153
+ namedPrimaryKey?: boolean;
154
+ }): PrimaryKeyColumnConstraintExpr | PrimaryKeyExpr;
155
+ }
156
+ declare class MySQLGenerator extends Generator {
157
+ static get AFTER_HAVING_MODIFIER_TRANSFORMS(): Map<string, (this: Generator, e: Expression) => string>;
158
+ static SUPPORTS_DECODE_CASE: boolean;
159
+ static readonly SELECT_KINDS: string[];
160
+ static TRY_SUPPORTED: boolean;
161
+ static SUPPORTS_UESCAPE: boolean;
162
+ static INTERVAL_ALLOWS_PLURAL_FORM: boolean;
163
+ static LOCKING_READS_SUPPORTED: boolean;
164
+ static get NULL_ORDERING_SUPPORTED(): NullOrderingSupported;
165
+ static JOIN_HINTS: boolean;
166
+ static TABLE_HINTS: boolean;
167
+ static DUPLICATE_KEY_UPDATE_WITH_SET: boolean;
168
+ static QUERY_HINT_SEP: string;
169
+ static VALUES_AS_TABLE: boolean;
170
+ static NVL2_SUPPORTED: boolean;
171
+ static LAST_DAY_SUPPORTS_DATE_PART: boolean;
172
+ static JSON_TYPE_REQUIRED_FOR_EXTRACTION: boolean;
173
+ static JSON_PATH_BRACKETED_KEY_SUPPORTED: boolean;
174
+ static JSON_KEY_VALUE_PAIR_SEP: string;
175
+ static SUPPORTS_TO_NUMBER: boolean;
176
+ static PARSE_JSON_NAME: string | undefined;
177
+ static PAD_FILL_PATTERN_IS_REQUIRED: boolean;
178
+ static WRAP_DERIVED_VALUES: boolean;
179
+ static VARCHAR_REQUIRES_SIZE: boolean;
180
+ static SUPPORTS_MEDIAN: boolean;
181
+ static UPDATE_STATEMENT_SUPPORTS_FROM: boolean;
182
+ static SUPPORTS_CONVERT_TIMEZONE: boolean;
183
+ static get ORIGINAL_TRANSFORMS(): Map<typeof Expression, (this: Generator, e: any) => string>;
184
+ /**
185
+ * Maps unsigned types to their standard MySQL counterparts.
186
+ * MySQL adds the 'UNSIGNED' attribute during generation based on the DataTypeExpr.
187
+ */
188
+ static get UNSIGNED_TYPE_MAPPING(): Map<DataTypeExprKind, string>;
189
+ /**
190
+ * Standardizes various timestamp types to MySQL's DATETIME or TIMESTAMP.
191
+ */
192
+ static get TIMESTAMP_TYPE_MAPPING(): Map<DataTypeExprKind, string>;
193
+ static get TYPE_MAPPING(): Map<DataTypeExprKind | string, string>;
194
+ static get PROPERTIES_LOCATION(): Map<typeof Expression, PropertiesLocation>;
195
+ static LIMIT_FETCH: string;
196
+ static LIMIT_ONLY_LITERALS: boolean;
197
+ /**
198
+ * MySQL CAST targets for character-based types.
199
+ */
200
+ static get CHAR_CAST_MAPPING(): {};
201
+ /**
202
+ * MySQL CAST targets for integer-based types.
203
+ */
204
+ static get SIGNED_CAST_MAPPING(): {};
205
+ /**
206
+ * MySQL is restricted in which types it can use as a CAST target.
207
+ * Reference: https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast
208
+ */
209
+ static get CAST_MAPPING(): Record<string, string>;
210
+ /**
211
+ * Types that require specific function-like syntax for timestamp manipulation.
212
+ */
213
+ static get TIMESTAMP_FUNC_TYPES(): Set<string>;
214
+ /**
215
+ * Comprehensive list of MySQL reserved keywords for identifier quoting.
216
+ * Reference: https://dev.mysql.com/doc/refman/8.0/en/keywords.html
217
+ */
218
+ static get RESERVED_KEYWORDS(): Set<string>;
219
+ computedColumnConstraintSql(expression: ComputedColumnConstraintExpr): string;
220
+ arraySql(expression: ArrayExpr): string;
221
+ arrayContainsAllSql(expression: ArrayContainsAllExpr): string;
222
+ dpipeSql(expression: DPipeExpr): string;
223
+ extractSql(expression: ExtractExpr): string;
224
+ dataTypeSql(expression: DataTypeExpr): string;
225
+ jsonArrayContainsSql(expression: JsonArrayContainsExpr): string;
226
+ castSql(expression: CastExpr, _options?: {
227
+ safePrefix?: string;
228
+ }): string;
229
+ showSql(expression: ShowExpr): string;
230
+ /**
231
+ * MySQL doesn't use the TO keyword in ALTER ... RENAME.
232
+ */
233
+ alterRenameSql(expression: AlterRenameExpr, _options?: {
234
+ includeTo?: boolean;
235
+ }): string;
236
+ /**
237
+ * MySQL uses MODIFY COLUMN for changing column data types.
238
+ */
239
+ alterColumnSql(expression: AlterColumnExpr): string;
240
+ protected prefixedSql(prefix: string, expression: Expression, arg: string): string;
241
+ protected oldStyleLimitSql(expression: ShowExpr): string;
242
+ /**
243
+ * Simulates TIMESTAMP_TRUNC using TIMESTAMPDIFF and DATE_ADD math.
244
+ */
245
+ timestampTruncSql(expression: TimestampTruncExpr): string;
246
+ convertTimezoneSql(expression: ConvertTimezoneExpr): string;
247
+ attimezoneSql(expression: AtTimeZoneExpr): string;
248
+ isasciiSql(expression: IsAsciiExpr): string;
249
+ ignoreNullsSql(expression: IgnoreNullsExpr): string;
250
+ currentSchemaSql(_expression: CurrentSchemaExpr): string;
251
+ partitionSql(expression: PartitionExpr): string;
252
+ partitionByRangeOrListSql(expression: PartitionByRangePropertyExpr | PartitionByListPropertyExpr, kind: string): string;
253
+ partitionByRangePropertySql(expression: PartitionByRangePropertyExpr): string;
254
+ partitionByListPropertySql(expression: PartitionByListPropertyExpr): string;
255
+ partitionListSql(expression: PartitionListExpr): string;
256
+ partitionRangeSql(expression: PartitionRangeExpr): string;
257
+ }
258
+ declare class MySQL extends Dialect {
259
+ static DIALECT_NAME: Dialects;
260
+ static PROMOTE_TO_INFERRED_DATETIME_TYPE: boolean;
261
+ static IDENTIFIERS_CAN_START_WITH_DIGIT: boolean;
262
+ /**
263
+ * We default to treating all identifiers as case-sensitive, since it matches MySQL's
264
+ * behavior on Linux systems. For MacOS and Windows systems, one can override this
265
+ * setting by specifying `dialect="mysql, normalization_strategy = lowercase"`.
266
+ * * Reference: https://dev.mysql.com/doc/refman/8.2/en/identifier-case-sensitivity.html
267
+ */
268
+ static get NORMALIZATION_STRATEGY(): NormalizationStrategy;
269
+ static TIME_FORMAT: string;
270
+ static DPIPE_IS_STRING_CONCAT: boolean;
271
+ static SUPPORTS_USER_DEFINED_TYPES: boolean;
272
+ static SUPPORTS_SEMI_ANTI_JOIN: boolean;
273
+ static SAFE_DIVISION: boolean;
274
+ static SAFE_TO_ELIMINATE_DOUBLE_NEGATION: boolean;
275
+ static LEAST_GREATEST_IGNORES_NULLS: boolean;
276
+ static get EXPRESSION_METADATA(): ExpressionMetadata;
277
+ /**
278
+ * MySQL-specific time format mapping.
279
+ * Reference: https://prestodb.io/docs/current/functions/datetime.html#mysql-date-functions
280
+ */
281
+ static get TIME_MAPPING(): Record<string, string>;
282
+ /**
283
+ * Valid interval units supported by MySQL.
284
+ * Includes standard units plus MySQL-specific compound units.
285
+ */
286
+ static get VALID_INTERVAL_UNITS(): Set<string>;
287
+ static Tokenizer: typeof MySQLTokenizer;
288
+ static Parser: typeof MySQLParser;
289
+ static Generator: typeof MySQLGenerator;
290
+ }
291
+
292
+ export { MySQL, TIME_SPECIFIERS, buildStrToDate, dateAddSql, dateTruncSql, removeTsOrDsToDate, showParser, strToDateSql, tsOrDsToDateSql, unixToTimeSql };
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e,f,g,h,i,j}from"../chunk-O2J5RKBN.js";import"../chunk-KCNOE4DZ.js";export{j as MySQL,c as TIME_SPECIFIERS,d as buildStrToDate,g as dateAddSql,b as dateTruncSql,i as removeTsOrDsToDate,a as showParser,e as strToDateSql,h as tsOrDsToDateSql,f as unixToTimeSql};
2
+ //# sourceMappingURL=mysql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}