@dbml/core 10.3.0-alpha.0 → 10.3.0-alpha.1

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 (374) hide show
  1. package/lib/export/DbmlExporter.cjs +13 -13
  2. package/lib/export/DbmlExporter.mjs +88 -84
  3. package/lib/export/MysqlExporter.cjs +8 -8
  4. package/lib/export/MysqlExporter.mjs +54 -50
  5. package/lib/export/OracleExporter.cjs +7 -7
  6. package/lib/export/OracleExporter.mjs +79 -74
  7. package/lib/export/PostgresExporter.cjs +9 -9
  8. package/lib/export/PostgresExporter.mjs +82 -78
  9. package/lib/export/SqlServerExporter.cjs +11 -11
  10. package/lib/export/SqlServerExporter.mjs +64 -60
  11. package/lib/model_structure/database.cjs +1 -1
  12. package/lib/model_structure/database.mjs +56 -53
  13. package/lib/model_structure/dep.cjs +1 -1
  14. package/lib/model_structure/dep.mjs +11 -9
  15. package/lib/model_structure/enum.cjs +1 -1
  16. package/lib/model_structure/enum.mjs +15 -13
  17. package/lib/model_structure/enumValue.cjs +1 -1
  18. package/lib/model_structure/enumValue.mjs +8 -6
  19. package/lib/model_structure/field.cjs +1 -1
  20. package/lib/model_structure/field.mjs +10 -8
  21. package/lib/model_structure/schema.cjs +1 -1
  22. package/lib/model_structure/schema.mjs +25 -23
  23. package/lib/model_structure/table.cjs +1 -1
  24. package/lib/model_structure/table.mjs +43 -40
  25. package/lib/model_structure/tableGroup.cjs +1 -1
  26. package/lib/model_structure/tableGroup.mjs +11 -9
  27. package/lib/model_structure/tablePartial.cjs +1 -1
  28. package/lib/model_structure/tablePartial.mjs +8 -6
  29. package/lib/node_modules/lodash-es/_DataView.cjs +1 -0
  30. package/lib/node_modules/lodash-es/_DataView.mjs +10 -0
  31. package/lib/node_modules/lodash-es/_Hash.cjs +1 -0
  32. package/lib/node_modules/lodash-es/_Hash.mjs +20 -0
  33. package/lib/node_modules/lodash-es/_ListCache.cjs +1 -0
  34. package/lib/node_modules/lodash-es/_ListCache.mjs +20 -0
  35. package/lib/node_modules/lodash-es/_Map.cjs +1 -0
  36. package/lib/node_modules/lodash-es/_Map.mjs +10 -0
  37. package/lib/node_modules/lodash-es/_MapCache.cjs +1 -0
  38. package/lib/node_modules/lodash-es/_MapCache.mjs +20 -0
  39. package/lib/node_modules/lodash-es/_Promise.cjs +1 -0
  40. package/lib/node_modules/lodash-es/_Promise.mjs +10 -0
  41. package/lib/node_modules/lodash-es/_Set.cjs +1 -0
  42. package/lib/node_modules/lodash-es/_Set.mjs +10 -0
  43. package/lib/node_modules/lodash-es/_SetCache.cjs +1 -0
  44. package/lib/node_modules/lodash-es/_SetCache.mjs +15 -0
  45. package/lib/node_modules/lodash-es/_Stack.cjs +1 -0
  46. package/lib/node_modules/lodash-es/_Stack.mjs +18 -0
  47. package/lib/node_modules/lodash-es/_Symbol.cjs +1 -0
  48. package/lib/node_modules/lodash-es/_Symbol.mjs +9 -0
  49. package/lib/node_modules/lodash-es/_Uint8Array.cjs +1 -0
  50. package/lib/node_modules/lodash-es/_Uint8Array.mjs +9 -0
  51. package/lib/node_modules/lodash-es/_WeakMap.cjs +1 -0
  52. package/lib/node_modules/lodash-es/_WeakMap.mjs +10 -0
  53. package/lib/node_modules/lodash-es/_arrayAggregator.cjs +1 -0
  54. package/lib/node_modules/lodash-es/_arrayAggregator.mjs +13 -0
  55. package/lib/node_modules/lodash-es/_arrayEach.cjs +1 -0
  56. package/lib/node_modules/lodash-es/_arrayEach.mjs +10 -0
  57. package/lib/node_modules/lodash-es/_arrayFilter.cjs +1 -0
  58. package/lib/node_modules/lodash-es/_arrayFilter.mjs +13 -0
  59. package/lib/node_modules/lodash-es/_arrayLikeKeys.cjs +1 -0
  60. package/lib/node_modules/lodash-es/_arrayLikeKeys.mjs +19 -0
  61. package/lib/node_modules/lodash-es/_arrayMap.cjs +1 -0
  62. package/lib/node_modules/lodash-es/_arrayMap.mjs +10 -0
  63. package/lib/node_modules/lodash-es/_arrayPush.cjs +1 -0
  64. package/lib/node_modules/lodash-es/_arrayPush.mjs +10 -0
  65. package/lib/node_modules/lodash-es/_arrayReduce.cjs +1 -0
  66. package/lib/node_modules/lodash-es/_arrayReduce.mjs +11 -0
  67. package/lib/node_modules/lodash-es/_arraySome.cjs +1 -0
  68. package/lib/node_modules/lodash-es/_arraySome.mjs +10 -0
  69. package/lib/node_modules/lodash-es/_asciiToArray.cjs +1 -0
  70. package/lib/node_modules/lodash-es/_asciiToArray.mjs +9 -0
  71. package/lib/node_modules/lodash-es/_assocIndexOf.cjs +1 -0
  72. package/lib/node_modules/lodash-es/_assocIndexOf.mjs +13 -0
  73. package/lib/node_modules/lodash-es/_baseAggregator.cjs +1 -0
  74. package/lib/node_modules/lodash-es/_baseAggregator.mjs +14 -0
  75. package/lib/node_modules/lodash-es/_baseAssignValue.cjs +1 -0
  76. package/lib/node_modules/lodash-es/_baseAssignValue.mjs +17 -0
  77. package/lib/node_modules/lodash-es/_baseEach.cjs +1 -0
  78. package/lib/node_modules/lodash-es/_baseEach.mjs +10 -0
  79. package/lib/node_modules/lodash-es/_baseFlatten.cjs +1 -0
  80. package/lib/node_modules/lodash-es/_baseFlatten.mjs +18 -0
  81. package/lib/node_modules/lodash-es/_baseFor.cjs +1 -0
  82. package/lib/node_modules/lodash-es/_baseFor.mjs +9 -0
  83. package/lib/node_modules/lodash-es/_baseForOwn.cjs +1 -0
  84. package/lib/node_modules/lodash-es/_baseForOwn.mjs +13 -0
  85. package/lib/node_modules/lodash-es/_baseGet.cjs +1 -0
  86. package/lib/node_modules/lodash-es/_baseGet.mjs +15 -0
  87. package/lib/node_modules/lodash-es/_baseGetAllKeys.cjs +1 -0
  88. package/lib/node_modules/lodash-es/_baseGetAllKeys.mjs +14 -0
  89. package/lib/node_modules/lodash-es/_baseGetTag.cjs +1 -0
  90. package/lib/node_modules/lodash-es/_baseGetTag.mjs +14 -0
  91. package/lib/node_modules/lodash-es/_baseHasIn.cjs +1 -0
  92. package/lib/node_modules/lodash-es/_baseHasIn.mjs +9 -0
  93. package/lib/node_modules/lodash-es/_baseIsArguments.cjs +1 -0
  94. package/lib/node_modules/lodash-es/_baseIsArguments.mjs +13 -0
  95. package/lib/node_modules/lodash-es/_baseIsEqual.cjs +1 -0
  96. package/lib/node_modules/lodash-es/_baseIsEqual.mjs +13 -0
  97. package/lib/node_modules/lodash-es/_baseIsEqualDeep.cjs +1 -0
  98. package/lib/node_modules/lodash-es/_baseIsEqualDeep.mjs +34 -0
  99. package/lib/node_modules/lodash-es/_baseIsMatch.cjs +1 -0
  100. package/lib/node_modules/lodash-es/_baseIsMatch.mjs +30 -0
  101. package/lib/node_modules/lodash-es/_baseIsNative.cjs +1 -0
  102. package/lib/node_modules/lodash-es/_baseIsNative.mjs +15 -0
  103. package/lib/node_modules/lodash-es/_baseIsTypedArray.cjs +1 -0
  104. package/lib/node_modules/lodash-es/_baseIsTypedArray.mjs +14 -0
  105. package/lib/node_modules/lodash-es/_baseIteratee.cjs +1 -0
  106. package/lib/node_modules/lodash-es/_baseIteratee.mjs +16 -0
  107. package/lib/node_modules/lodash-es/_baseKeys.cjs +1 -0
  108. package/lib/node_modules/lodash-es/_baseKeys.mjs +16 -0
  109. package/lib/node_modules/lodash-es/_baseMatches.cjs +1 -0
  110. package/lib/node_modules/lodash-es/_baseMatches.mjs +17 -0
  111. package/lib/node_modules/lodash-es/_baseMatchesProperty.cjs +1 -0
  112. package/lib/node_modules/lodash-es/_baseMatchesProperty.mjs +21 -0
  113. package/lib/node_modules/lodash-es/_baseNth.cjs +1 -0
  114. package/lib/node_modules/lodash-es/_baseNth.mjs +13 -0
  115. package/lib/node_modules/lodash-es/_baseProperty.cjs +1 -0
  116. package/lib/node_modules/lodash-es/_baseProperty.mjs +11 -0
  117. package/lib/node_modules/lodash-es/_basePropertyDeep.cjs +1 -0
  118. package/lib/node_modules/lodash-es/_basePropertyDeep.mjs +14 -0
  119. package/lib/node_modules/lodash-es/_baseReduce.cjs +1 -0
  120. package/lib/node_modules/lodash-es/_baseReduce.mjs +11 -0
  121. package/lib/node_modules/lodash-es/_baseSlice.cjs +1 -0
  122. package/lib/node_modules/lodash-es/_baseSlice.mjs +12 -0
  123. package/lib/node_modules/lodash-es/_baseTimes.cjs +1 -0
  124. package/lib/node_modules/lodash-es/_baseTimes.mjs +10 -0
  125. package/lib/node_modules/lodash-es/_baseToString.cjs +1 -0
  126. package/lib/node_modules/lodash-es/_baseToString.mjs +19 -0
  127. package/lib/node_modules/lodash-es/_baseTrim.cjs +1 -0
  128. package/lib/node_modules/lodash-es/_baseTrim.mjs +12 -0
  129. package/lib/node_modules/lodash-es/_baseUnary.cjs +1 -0
  130. package/lib/node_modules/lodash-es/_baseUnary.mjs +11 -0
  131. package/lib/node_modules/lodash-es/_cacheHas.cjs +1 -0
  132. package/lib/node_modules/lodash-es/_cacheHas.mjs +9 -0
  133. package/lib/node_modules/lodash-es/_castFunction.cjs +1 -0
  134. package/lib/node_modules/lodash-es/_castFunction.mjs +12 -0
  135. package/lib/node_modules/lodash-es/_castPath.cjs +1 -0
  136. package/lib/node_modules/lodash-es/_castPath.mjs +15 -0
  137. package/lib/node_modules/lodash-es/_castSlice.cjs +1 -0
  138. package/lib/node_modules/lodash-es/_castSlice.mjs +13 -0
  139. package/lib/node_modules/lodash-es/_copyArray.cjs +1 -0
  140. package/lib/node_modules/lodash-es/_copyArray.mjs +11 -0
  141. package/lib/node_modules/lodash-es/_coreJsData.cjs +1 -0
  142. package/lib/node_modules/lodash-es/_coreJsData.mjs +9 -0
  143. package/lib/node_modules/lodash-es/_createAggregator.cjs +1 -0
  144. package/lib/node_modules/lodash-es/_createAggregator.mjs +18 -0
  145. package/lib/node_modules/lodash-es/_createBaseEach.cjs +1 -0
  146. package/lib/node_modules/lodash-es/_createBaseEach.mjs +17 -0
  147. package/lib/node_modules/lodash-es/_createBaseFor.cjs +1 -0
  148. package/lib/node_modules/lodash-es/_createBaseFor.mjs +15 -0
  149. package/lib/node_modules/lodash-es/_createCaseFirst.cjs +1 -0
  150. package/lib/node_modules/lodash-es/_createCaseFirst.mjs +19 -0
  151. package/lib/node_modules/lodash-es/_defineProperty.cjs +1 -0
  152. package/lib/node_modules/lodash-es/_defineProperty.mjs +14 -0
  153. package/lib/node_modules/lodash-es/_equalArrays.cjs +1 -0
  154. package/lib/node_modules/lodash-es/_equalArrays.mjs +39 -0
  155. package/lib/node_modules/lodash-es/_equalByTag.cjs +1 -0
  156. package/lib/node_modules/lodash-es/_equalByTag.mjs +39 -0
  157. package/lib/node_modules/lodash-es/_equalObjects.cjs +1 -0
  158. package/lib/node_modules/lodash-es/_equalObjects.mjs +36 -0
  159. package/lib/node_modules/lodash-es/_freeGlobal.cjs +1 -0
  160. package/lib/node_modules/lodash-es/_freeGlobal.mjs +8 -0
  161. package/lib/node_modules/lodash-es/_getAllKeys.cjs +1 -0
  162. package/lib/node_modules/lodash-es/_getAllKeys.mjs +14 -0
  163. package/lib/node_modules/lodash-es/_getMapData.cjs +1 -0
  164. package/lib/node_modules/lodash-es/_getMapData.mjs +13 -0
  165. package/lib/node_modules/lodash-es/_getMatchData.cjs +1 -0
  166. package/lib/node_modules/lodash-es/_getMatchData.mjs +21 -0
  167. package/lib/node_modules/lodash-es/_getNative.cjs +1 -0
  168. package/lib/node_modules/lodash-es/_getNative.mjs +14 -0
  169. package/lib/node_modules/lodash-es/_getRawTag.cjs +1 -0
  170. package/lib/node_modules/lodash-es/_getRawTag.mjs +18 -0
  171. package/lib/node_modules/lodash-es/_getSymbols.cjs +1 -0
  172. package/lib/node_modules/lodash-es/_getSymbols.mjs +14 -0
  173. package/lib/node_modules/lodash-es/_getTag.cjs +1 -0
  174. package/lib/node_modules/lodash-es/_getTag.mjs +25 -0
  175. package/lib/node_modules/lodash-es/_getValue.cjs +1 -0
  176. package/lib/node_modules/lodash-es/_getValue.mjs +9 -0
  177. package/lib/node_modules/lodash-es/_hasPath.cjs +1 -0
  178. package/lib/node_modules/lodash-es/_hasPath.mjs +23 -0
  179. package/lib/node_modules/lodash-es/_hasUnicode.cjs +1 -0
  180. package/lib/node_modules/lodash-es/_hasUnicode.mjs +11 -0
  181. package/lib/node_modules/lodash-es/_hashClear.cjs +1 -0
  182. package/lib/node_modules/lodash-es/_hashClear.mjs +12 -0
  183. package/lib/node_modules/lodash-es/_hashDelete.cjs +1 -0
  184. package/lib/node_modules/lodash-es/_hashDelete.mjs +10 -0
  185. package/lib/node_modules/lodash-es/_hashGet.cjs +1 -0
  186. package/lib/node_modules/lodash-es/_hashGet.mjs +17 -0
  187. package/lib/node_modules/lodash-es/_hashHas.cjs +1 -0
  188. package/lib/node_modules/lodash-es/_hashHas.mjs +13 -0
  189. package/lib/node_modules/lodash-es/_hashSet.cjs +1 -0
  190. package/lib/node_modules/lodash-es/_hashSet.mjs +13 -0
  191. package/lib/node_modules/lodash-es/_isFlattenable.cjs +1 -0
  192. package/lib/node_modules/lodash-es/_isFlattenable.mjs +14 -0
  193. package/lib/node_modules/lodash-es/_isIndex.cjs +1 -0
  194. package/lib/node_modules/lodash-es/_isIndex.mjs +12 -0
  195. package/lib/node_modules/lodash-es/_isKey.cjs +1 -0
  196. package/lib/node_modules/lodash-es/_isKey.mjs +15 -0
  197. package/lib/node_modules/lodash-es/_isKeyable.cjs +1 -0
  198. package/lib/node_modules/lodash-es/_isKeyable.mjs +10 -0
  199. package/lib/node_modules/lodash-es/_isMasked.cjs +1 -0
  200. package/lib/node_modules/lodash-es/_isMasked.mjs +15 -0
  201. package/lib/node_modules/lodash-es/_isPrototype.cjs +1 -0
  202. package/lib/node_modules/lodash-es/_isPrototype.mjs +12 -0
  203. package/lib/node_modules/lodash-es/_isStrictComparable.cjs +1 -0
  204. package/lib/node_modules/lodash-es/_isStrictComparable.mjs +12 -0
  205. package/lib/node_modules/lodash-es/_listCacheClear.cjs +1 -0
  206. package/lib/node_modules/lodash-es/_listCacheClear.mjs +9 -0
  207. package/lib/node_modules/lodash-es/_listCacheDelete.cjs +1 -0
  208. package/lib/node_modules/lodash-es/_listCacheDelete.mjs +13 -0
  209. package/lib/node_modules/lodash-es/_listCacheGet.cjs +1 -0
  210. package/lib/node_modules/lodash-es/_listCacheGet.mjs +13 -0
  211. package/lib/node_modules/lodash-es/_listCacheHas.cjs +1 -0
  212. package/lib/node_modules/lodash-es/_listCacheHas.mjs +12 -0
  213. package/lib/node_modules/lodash-es/_listCacheSet.cjs +1 -0
  214. package/lib/node_modules/lodash-es/_listCacheSet.mjs +13 -0
  215. package/lib/node_modules/lodash-es/_mapCacheClear.cjs +1 -0
  216. package/lib/node_modules/lodash-es/_mapCacheClear.mjs +18 -0
  217. package/lib/node_modules/lodash-es/_mapCacheDelete.cjs +1 -0
  218. package/lib/node_modules/lodash-es/_mapCacheDelete.mjs +13 -0
  219. package/lib/node_modules/lodash-es/_mapCacheGet.cjs +1 -0
  220. package/lib/node_modules/lodash-es/_mapCacheGet.mjs +12 -0
  221. package/lib/node_modules/lodash-es/_mapCacheHas.cjs +1 -0
  222. package/lib/node_modules/lodash-es/_mapCacheHas.mjs +12 -0
  223. package/lib/node_modules/lodash-es/_mapCacheSet.cjs +1 -0
  224. package/lib/node_modules/lodash-es/_mapCacheSet.mjs +13 -0
  225. package/lib/node_modules/lodash-es/_mapToArray.cjs +1 -0
  226. package/lib/node_modules/lodash-es/_mapToArray.mjs +12 -0
  227. package/lib/node_modules/lodash-es/_matchesStrictComparable.cjs +1 -0
  228. package/lib/node_modules/lodash-es/_matchesStrictComparable.mjs +11 -0
  229. package/lib/node_modules/lodash-es/_memoizeCapped.cjs +1 -0
  230. package/lib/node_modules/lodash-es/_memoizeCapped.mjs +15 -0
  231. package/lib/node_modules/lodash-es/_nativeCreate.cjs +1 -0
  232. package/lib/node_modules/lodash-es/_nativeCreate.mjs +9 -0
  233. package/lib/node_modules/lodash-es/_nativeKeys.cjs +1 -0
  234. package/lib/node_modules/lodash-es/_nativeKeys.mjs +9 -0
  235. package/lib/node_modules/lodash-es/_nodeUtil.cjs +1 -0
  236. package/lib/node_modules/lodash-es/_nodeUtil.mjs +13 -0
  237. package/lib/node_modules/lodash-es/_objectToString.cjs +1 -0
  238. package/lib/node_modules/lodash-es/_objectToString.mjs +11 -0
  239. package/lib/node_modules/lodash-es/_overArg.cjs +1 -0
  240. package/lib/node_modules/lodash-es/_overArg.mjs +11 -0
  241. package/lib/node_modules/lodash-es/_root.cjs +1 -0
  242. package/lib/node_modules/lodash-es/_root.mjs +9 -0
  243. package/lib/node_modules/lodash-es/_setCacheAdd.cjs +1 -0
  244. package/lib/node_modules/lodash-es/_setCacheAdd.mjs +11 -0
  245. package/lib/node_modules/lodash-es/_setCacheHas.cjs +1 -0
  246. package/lib/node_modules/lodash-es/_setCacheHas.mjs +9 -0
  247. package/lib/node_modules/lodash-es/_setToArray.cjs +1 -0
  248. package/lib/node_modules/lodash-es/_setToArray.mjs +12 -0
  249. package/lib/node_modules/lodash-es/_stackClear.cjs +1 -0
  250. package/lib/node_modules/lodash-es/_stackClear.mjs +12 -0
  251. package/lib/node_modules/lodash-es/_stackDelete.cjs +1 -0
  252. package/lib/node_modules/lodash-es/_stackDelete.mjs +10 -0
  253. package/lib/node_modules/lodash-es/_stackGet.cjs +1 -0
  254. package/lib/node_modules/lodash-es/_stackGet.mjs +9 -0
  255. package/lib/node_modules/lodash-es/_stackHas.cjs +1 -0
  256. package/lib/node_modules/lodash-es/_stackHas.mjs +9 -0
  257. package/lib/node_modules/lodash-es/_stackSet.cjs +1 -0
  258. package/lib/node_modules/lodash-es/_stackSet.mjs +20 -0
  259. package/lib/node_modules/lodash-es/_stringToArray.cjs +1 -0
  260. package/lib/node_modules/lodash-es/_stringToArray.mjs +14 -0
  261. package/lib/node_modules/lodash-es/_stringToPath.cjs +1 -0
  262. package/lib/node_modules/lodash-es/_stringToPath.mjs +14 -0
  263. package/lib/node_modules/lodash-es/_toKey.cjs +1 -0
  264. package/lib/node_modules/lodash-es/_toKey.mjs +14 -0
  265. package/lib/node_modules/lodash-es/_toSource.cjs +1 -0
  266. package/lib/node_modules/lodash-es/_toSource.mjs +19 -0
  267. package/lib/node_modules/lodash-es/_trimmedEndIndex.cjs +1 -0
  268. package/lib/node_modules/lodash-es/_trimmedEndIndex.mjs +12 -0
  269. package/lib/node_modules/lodash-es/_unicodeToArray.cjs +1 -0
  270. package/lib/node_modules/lodash-es/_unicodeToArray.mjs +21 -0
  271. package/lib/node_modules/lodash-es/capitalize.cjs +1 -0
  272. package/lib/node_modules/lodash-es/capitalize.mjs +13 -0
  273. package/lib/node_modules/lodash-es/concat.cjs +1 -0
  274. package/lib/node_modules/lodash-es/concat.mjs +18 -0
  275. package/lib/node_modules/lodash-es/eq.cjs +1 -0
  276. package/lib/node_modules/lodash-es/eq.mjs +9 -0
  277. package/lib/node_modules/lodash-es/first.cjs +1 -0
  278. package/lib/node_modules/lodash-es/first.mjs +9 -0
  279. package/lib/node_modules/lodash-es/flatten.cjs +1 -0
  280. package/lib/node_modules/lodash-es/flatten.mjs +12 -0
  281. package/lib/node_modules/lodash-es/flattenDeep.cjs +1 -0
  282. package/lib/node_modules/lodash-es/flattenDeep.mjs +12 -0
  283. package/lib/node_modules/lodash-es/flattenDepth.cjs +1 -0
  284. package/lib/node_modules/lodash-es/flattenDepth.mjs +13 -0
  285. package/lib/node_modules/lodash-es/forEach.cjs +1 -0
  286. package/lib/node_modules/lodash-es/forEach.mjs +15 -0
  287. package/lib/node_modules/lodash-es/get.cjs +1 -0
  288. package/lib/node_modules/lodash-es/get.mjs +13 -0
  289. package/lib/node_modules/lodash-es/groupBy.cjs +1 -0
  290. package/lib/node_modules/lodash-es/groupBy.mjs +12 -0
  291. package/lib/node_modules/lodash-es/hasIn.cjs +1 -0
  292. package/lib/node_modules/lodash-es/hasIn.mjs +13 -0
  293. package/lib/node_modules/lodash-es/head.cjs +1 -0
  294. package/lib/node_modules/lodash-es/head.mjs +9 -0
  295. package/lib/node_modules/lodash-es/identity.cjs +1 -0
  296. package/lib/node_modules/lodash-es/identity.mjs +9 -0
  297. package/lib/node_modules/lodash-es/isArguments.cjs +1 -0
  298. package/lib/node_modules/lodash-es/isArguments.mjs +14 -0
  299. package/lib/node_modules/lodash-es/isArray.cjs +1 -0
  300. package/lib/node_modules/lodash-es/isArray.mjs +8 -0
  301. package/lib/node_modules/lodash-es/isArrayLike.cjs +1 -0
  302. package/lib/node_modules/lodash-es/isArrayLike.mjs +13 -0
  303. package/lib/node_modules/lodash-es/isBuffer.cjs +1 -0
  304. package/lib/node_modules/lodash-es/isBuffer.mjs +10 -0
  305. package/lib/node_modules/lodash-es/isEmpty.cjs +1 -0
  306. package/lib/node_modules/lodash-es/isEmpty.mjs +25 -0
  307. package/lib/node_modules/lodash-es/isFunction.cjs +1 -0
  308. package/lib/node_modules/lodash-es/isFunction.mjs +15 -0
  309. package/lib/node_modules/lodash-es/isLength.cjs +1 -0
  310. package/lib/node_modules/lodash-es/isLength.mjs +11 -0
  311. package/lib/node_modules/lodash-es/isNil.cjs +1 -0
  312. package/lib/node_modules/lodash-es/isNil.mjs +9 -0
  313. package/lib/node_modules/lodash-es/isObject.cjs +1 -0
  314. package/lib/node_modules/lodash-es/isObject.mjs +10 -0
  315. package/lib/node_modules/lodash-es/isObjectLike.cjs +1 -0
  316. package/lib/node_modules/lodash-es/isObjectLike.mjs +9 -0
  317. package/lib/node_modules/lodash-es/isSymbol.cjs +1 -0
  318. package/lib/node_modules/lodash-es/isSymbol.mjs +13 -0
  319. package/lib/node_modules/lodash-es/isTypedArray.cjs +1 -0
  320. package/lib/node_modules/lodash-es/isTypedArray.mjs +11 -0
  321. package/lib/node_modules/lodash-es/keys.cjs +1 -0
  322. package/lib/node_modules/lodash-es/keys.mjs +14 -0
  323. package/lib/node_modules/lodash-es/last.cjs +1 -0
  324. package/lib/node_modules/lodash-es/last.mjs +10 -0
  325. package/lib/node_modules/lodash-es/lodash.cjs +1 -0
  326. package/lib/node_modules/lodash-es/lodash.mjs +46 -0
  327. package/lib/node_modules/lodash-es/memoize.cjs +1 -0
  328. package/lib/node_modules/lodash-es/memoize.mjs +19 -0
  329. package/lib/node_modules/lodash-es/nth.cjs +1 -0
  330. package/lib/node_modules/lodash-es/nth.mjs +13 -0
  331. package/lib/node_modules/lodash-es/property.cjs +1 -0
  332. package/lib/node_modules/lodash-es/property.mjs +15 -0
  333. package/lib/node_modules/lodash-es/reduce.cjs +1 -0
  334. package/lib/node_modules/lodash-es/reduce.mjs +17 -0
  335. package/lib/node_modules/lodash-es/stubArray.cjs +1 -0
  336. package/lib/node_modules/lodash-es/stubArray.mjs +9 -0
  337. package/lib/node_modules/lodash-es/stubFalse.cjs +1 -0
  338. package/lib/node_modules/lodash-es/stubFalse.mjs +9 -0
  339. package/lib/node_modules/lodash-es/toFinite.cjs +1 -0
  340. package/lib/node_modules/lodash-es/toFinite.mjs +12 -0
  341. package/lib/node_modules/lodash-es/toInteger.cjs +1 -0
  342. package/lib/node_modules/lodash-es/toInteger.mjs +13 -0
  343. package/lib/node_modules/lodash-es/toNumber.cjs +1 -0
  344. package/lib/node_modules/lodash-es/toNumber.mjs +23 -0
  345. package/lib/node_modules/lodash-es/toString.cjs +1 -0
  346. package/lib/node_modules/lodash-es/toString.mjs +12 -0
  347. package/lib/node_modules/lodash-es/upperFirst.cjs +1 -0
  348. package/lib/node_modules/lodash-es/upperFirst.mjs +9 -0
  349. package/lib/packages/dbml-core/package.json.cjs +1 -0
  350. package/lib/{package.json.mjs → packages/dbml-core/package.json.mjs} +1 -1
  351. package/lib/parse/ANTLR/ASTGeneration/helpers.cjs +1 -1
  352. package/lib/parse/ANTLR/ASTGeneration/helpers.mjs +5 -3
  353. package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.cjs +1 -1
  354. package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.mjs +149 -143
  355. package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.cjs +1 -1
  356. package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.mjs +146 -142
  357. package/lib/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.cjs +1 -1
  358. package/lib/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.mjs +184 -181
  359. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.cjs +1 -1
  360. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.mjs +149 -145
  361. package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.cjs +1 -1
  362. package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.mjs +89 -85
  363. package/lib/parse/deprecated/mssql/column_definition/actions.cjs +1 -1
  364. package/lib/parse/deprecated/mssql/column_definition/actions.mjs +9 -6
  365. package/lib/parse/deprecated/mssql/expression.cjs +1 -1
  366. package/lib/parse/deprecated/mssql/expression.mjs +26 -25
  367. package/lib/parse/deprecated/mssql/statements/actions.cjs +1 -1
  368. package/lib/parse/deprecated/mssql/statements/actions.mjs +36 -33
  369. package/lib/parse/deprecated/mssql/utils.cjs +1 -1
  370. package/lib/parse/deprecated/mssql/utils.mjs +23 -22
  371. package/lib/utils/version.cjs +1 -1
  372. package/lib/utils/version.mjs +1 -1
  373. package/package.json +2 -2
  374. package/lib/package.json.cjs +0 -1
@@ -1,14 +1,17 @@
1
- import e from "../../parsers/oraclesql/OracleSqlParserVisitor.mjs";
2
- import t from "../../parsers/oraclesql/OracleSqlParser.mjs";
3
- import { Endpoint as n, Field as r, Index as i, Ref as a, Table as o, TableRecord as s } from "../AST.mjs";
4
- import { CONSTRAINT_TYPE as c, DATA_TYPE as l } from "../constants.mjs";
5
- import { getOriginalText as u } from "../helpers.mjs";
6
- import { CompilerError as d } from "../../../error.mjs";
7
- import { flatten as f, last as p } from "lodash-es";
8
- import { CARDINALITY_MANY as m, CARDINALITY_MAYBE as h, normalizeQualifiedName as g } from "@dbml/parse";
9
- import { ParseTreeListener as _, ParseTreeWalker as v } from "antlr4";
1
+ import e from "../../../../node_modules/lodash-es/flatten.mjs";
2
+ import t from "../../../../node_modules/lodash-es/last.mjs";
3
+ import { init_lodash as n } from "../../../../node_modules/lodash-es/lodash.mjs";
4
+ import r from "../../parsers/oraclesql/OracleSqlParserVisitor.mjs";
5
+ import i from "../../parsers/oraclesql/OracleSqlParser.mjs";
6
+ import { Endpoint as a, Field as o, Index as s, Ref as c, Table as l, TableRecord as u } from "../AST.mjs";
7
+ import { CONSTRAINT_TYPE as d, DATA_TYPE as f } from "../constants.mjs";
8
+ import { getOriginalText as p } from "../helpers.mjs";
9
+ import { CompilerError as m } from "../../../error.mjs";
10
+ import { CARDINALITY_MANY as h, CARDINALITY_MAYBE as g, normalizeQualifiedName as _ } from "@dbml/parse";
11
+ import { ParseTreeListener as v, ParseTreeWalker as y } from "antlr4";
10
12
  //#region src/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.js
11
- var y = {
13
+ n();
14
+ var b = {
12
15
  FIELD: "table_field",
13
16
  INDEX: "table_index",
14
17
  FK: "table_fk",
@@ -16,7 +19,7 @@ var y = {
16
19
  PK: "table_pk",
17
20
  DEFAULT: "table_default",
18
21
  CHECK: "table_check"
19
- }, b = {
22
+ }, x = {
20
23
  NOT_NULL: "col_not_null",
21
24
  NULLABLE: "col_nullable",
22
25
  UNIQUE: "col_unique",
@@ -26,30 +29,30 @@ var y = {
26
29
  INLINE_REF: "col_inline_ref",
27
30
  NOTE: "col_note",
28
31
  CHECK: "col_check"
29
- }, x = (e, t, n) => {
32
+ }, S = (e, t, n) => {
30
33
  let r = t ?? null;
31
34
  return e.find((e) => (e.schemaName ?? null) === r && e.name === n);
32
- }, S = (e, t) => e.fields.find((e) => e.name === t), C = (e) => ({
33
- value: e.type === c.COLUMN ? e.rawValue : e.value,
34
- type: e.type === c.COLUMN ? l.EXPRESSION : e.type
35
- }), w = (e) => {
35
+ }, C = (e, t) => e.fields.find((e) => e.name === t), w = (e) => ({
36
+ value: e.type === d.COLUMN ? e.rawValue : e.value,
37
+ type: e.type === d.COLUMN ? f.EXPRESSION : e.type
38
+ }), T = (e) => {
36
39
  let t;
37
40
  switch (e.type) {
38
- case c.COLUMN:
39
- t = c.COLUMN;
41
+ case d.COLUMN:
42
+ t = d.COLUMN;
40
43
  break;
41
- case l.STRING:
42
- t = c.STRING;
44
+ case f.STRING:
45
+ t = d.STRING;
43
46
  break;
44
47
  default:
45
- t = c.EXPRESSION;
48
+ t = d.EXPRESSION;
46
49
  break;
47
50
  }
48
51
  return {
49
52
  value: e.value.toString(),
50
53
  type: t
51
54
  };
52
- }, T = (e, t) => d.create([{
55
+ }, E = (e, t) => m.create([{
53
56
  message: t,
54
57
  location: {
55
58
  start: {
@@ -58,10 +61,10 @@ var y = {
58
61
  },
59
62
  end: {
60
63
  line: e.stop.line,
61
- column: e.stop.column + u(e).length + 1
64
+ column: e.stop.column + p(e).length + 1
62
65
  }
63
66
  }
64
- }]), E = (e, t = "\"") => e.startsWith(t) ? e.slice(1, -1).replaceAll(`${t}${t}`, t) : e, D = class extends e {
67
+ }]), D = (e, t = "\"") => e.startsWith(t) ? e.slice(1, -1).replaceAll(`${t}${t}`, t) : e, O = class extends r {
65
68
  constructor() {
66
69
  super(), this.data = {
67
70
  schemas: [],
@@ -78,7 +81,7 @@ var y = {
78
81
  visitCreate_view(e) {
79
82
  let t = e.id_expression ? e.id_expression() : null;
80
83
  if (!t) return;
81
- let n = t.getText().replace(/"/g, ""), r = e.schema_name ? e.schema_name() : null, i = r ? r.getText().replace(/"/g, "") : void 0, a = u(e);
84
+ let n = t.getText().replace(/"/g, ""), r = e.schema_name ? e.schema_name() : null, i = r ? r.getText().replace(/"/g, "") : void 0, a = p(e);
82
85
  this.data.tables.push({
83
86
  name: n,
84
87
  schemaName: i,
@@ -91,12 +94,12 @@ var y = {
91
94
  query: a,
92
95
  kind: "view"
93
96
  }
94
- }), O(this, e.select_only_statement(), n, i);
97
+ }), k(this, e.select_only_statement(), n, i);
95
98
  }
96
99
  visitCreate_materialized_view(e) {
97
100
  let t = (e.getText ? e.getText() : "").match(/MATERIALIZEDVIEW(?:IFNOTEXISTS)?(?:"([^"]+)"\.)?"?([^("\s]+)"?/i);
98
101
  if (!t) return;
99
- let n = t[1] || void 0, r = t[2], i = u(e);
102
+ let n = t[1] || void 0, r = t[2], i = p(e);
100
103
  this.data.tables.push({
101
104
  name: r,
102
105
  schemaName: n,
@@ -110,7 +113,7 @@ var y = {
110
113
  kind: "materialized_view",
111
114
  materialized: !0
112
115
  }
113
- }), O(this, e.select_only_statement(), r, n);
116
+ }), k(this, e.select_only_statement(), r, n);
114
117
  }
115
118
  visitSql_script(e) {
116
119
  return e.unit_statement()?.forEach((e) => e.accept(this)), this.data;
@@ -121,24 +124,24 @@ var y = {
121
124
  visitData_manipulation_language_statements(e) {
122
125
  e.insert_statement() && e.insert_statement().accept(this);
123
126
  }
124
- visitCreate_table(e) {
125
- let t = e.table_name().accept(this), n = e.schema_name() ? e.schema_name().accept(this) : void 0;
126
- if (e.relational_table()) {
127
- let [r, i, a, s] = e.relational_table().accept(this).reduce((e, t) => (t.type === y.FIELD ? e[0].push(t.value) : [
128
- y.INDEX,
129
- y.UNIQUE,
130
- y.PK
131
- ].includes(t.type) ? e[1].push(t.value) : t.type === y.FK ? e[2].push(t.value) : t.type === y.CHECK && e[3].push(...t.value.checks), e), [
127
+ visitCreate_table(t) {
128
+ let n = t.table_name().accept(this), r = t.schema_name() ? t.schema_name().accept(this) : void 0;
129
+ if (t.relational_table()) {
130
+ let [i, a, o, s] = t.relational_table().accept(this).reduce((e, t) => (t.type === b.FIELD ? e[0].push(t.value) : [
131
+ b.INDEX,
132
+ b.UNIQUE,
133
+ b.PK
134
+ ].includes(t.type) ? e[1].push(t.value) : t.type === b.FK ? e[2].push(t.value) : t.type === b.CHECK && e[3].push(...t.value.checks), e), [
132
135
  [],
133
136
  [],
134
137
  [],
135
138
  []
136
139
  ]);
137
- this.data.refs.push(...f(r.map((e) => e.inline_refs.map((r) => (r.endpoints[0].tableName = t, r.endpoints[0].schemaName = n, r.endpoints[0].fieldNames = [e.field.name], r))))), this.data.refs.push(...a.map((e) => (e.endpoints[0].tableName = t, e.endpoints[0].schemaName = n, e))), this.data.tables.push(new o({
138
- name: t,
139
- schemaName: n,
140
- fields: r.map((e) => e.field),
141
- indexes: i,
140
+ this.data.refs.push(...e(i.map((e) => e.inline_refs.map((t) => (t.endpoints[0].tableName = n, t.endpoints[0].schemaName = r, t.endpoints[0].fieldNames = [e.field.name], t))))), this.data.refs.push(...o.map((e) => (e.endpoints[0].tableName = n, e.endpoints[0].schemaName = r, e))), this.data.tables.push(new l({
141
+ name: n,
142
+ schemaName: r,
143
+ fields: i.map((e) => e.field),
144
+ indexes: a,
142
145
  checks: s
143
146
  }));
144
147
  }
@@ -150,18 +153,18 @@ var y = {
150
153
  return e.column_definition() ? e.column_definition().accept(this) : e.out_of_line_constraint() ? e.out_of_line_constraint().accept(this) : e.out_of_line_ref_constraint() ? e.out_of_line_ref_constraint().accept(this) : null;
151
154
  }
152
155
  visitColumn_definition(e) {
153
- let t = p(e.column_name().accept(this)), n = e.datatype()?.accept(this) || e.type_name()?.accept(this);
154
- if (!n) throw T(e, "Importing a column definition without a type is not supported");
156
+ let n = t(e.column_name().accept(this)), r = e.datatype()?.accept(this) || e.type_name()?.accept(this);
157
+ if (!r) throw E(e, "Importing a column definition without a type is not supported");
155
158
  let i = (e.inline_constraint() || []).map((e) => e.accept(this)).filter(Boolean);
156
159
  if (e.DEFAULT()) {
157
160
  let t = e.expression().accept(this);
158
161
  i.push({
159
- type: b.DEFAULT,
160
- value: { dbdefault: C(t) }
162
+ type: x.DEFAULT,
163
+ value: { dbdefault: w(t) }
161
164
  });
162
165
  }
163
166
  e.identity_clause() && i.push({
164
- type: b.INCREMENT,
167
+ type: x.INCREMENT,
165
168
  value: { increment: !0 }
166
169
  });
167
170
  let a = {
@@ -170,68 +173,68 @@ var y = {
170
173
  };
171
174
  i.forEach((e) => {
172
175
  switch (e.type) {
173
- case b.DEFAULT:
176
+ case x.DEFAULT:
174
177
  a.dbdefault = e.value.dbdefault;
175
178
  break;
176
- case b.NOT_NULL:
179
+ case x.NOT_NULL:
177
180
  a.not_null = !0;
178
181
  break;
179
- case b.NULLABLE:
182
+ case x.NULLABLE:
180
183
  a.not_null = !1;
181
184
  break;
182
- case b.PK:
185
+ case x.PK:
183
186
  a.pk = !0;
184
187
  break;
185
- case b.UNIQUE:
188
+ case x.UNIQUE:
186
189
  a.unique = !0;
187
190
  break;
188
- case b.CHECK:
191
+ case x.CHECK:
189
192
  a.checks.push(...e.value.checks);
190
193
  break;
191
- case b.INCREMENT:
194
+ case x.INCREMENT:
192
195
  a.increment = !0;
193
196
  break;
194
- case b.FK:
197
+ case x.FK:
195
198
  a.inline_refs.push(...e.value.inline_refs);
196
199
  break;
197
200
  default:
198
201
  }
199
202
  });
200
- let o = new r({
201
- name: t,
202
- type: n,
203
+ let s = new o({
204
+ name: n,
205
+ type: r,
203
206
  ...a
204
207
  });
205
208
  return {
206
- type: y.FIELD,
209
+ type: b.FIELD,
207
210
  value: {
208
- field: o,
211
+ field: s,
209
212
  inline_refs: a.inline_refs || []
210
213
  }
211
214
  };
212
215
  }
213
216
  visitInline_constraint(e) {
214
217
  if (e.NULL_() && e.NOT()) return {
215
- type: b.NOT_NULL,
218
+ type: x.NOT_NULL,
216
219
  value: { not_null: !0 }
217
220
  };
218
221
  if (e.NULL_()) return {
219
- type: b.NULLABLE,
222
+ type: x.NULLABLE,
220
223
  value: { not_null: !1 }
221
224
  };
222
225
  if (e.UNIQUE()) return {
223
- type: b.UNIQUE,
226
+ type: x.UNIQUE,
224
227
  value: { unique: !0 }
225
228
  };
226
229
  if (e.PRIMARY()) return {
227
- type: b.PK,
230
+ type: x.PK,
228
231
  value: { pk: !0 }
229
232
  };
230
233
  let t = e.constraint_name()?.accept(this);
231
234
  if (e.references_clause()) {
232
235
  let n = e.references_clause().accept(this);
233
236
  return n.name = t, {
234
- type: b.FK,
237
+ type: x.FK,
235
238
  value: { inline_refs: [n] }
236
239
  };
237
240
  }
@@ -245,28 +248,28 @@ var y = {
245
248
  }
246
249
  visitOut_of_line_constraint(e) {
247
250
  if (e.UNIQUE()) {
248
- let t = e.column_name().map((e) => ({
249
- value: p(e.accept(this)),
250
- type: c.COLUMN
251
+ let n = e.column_name().map((e) => ({
252
+ value: t(e.accept(this)),
253
+ type: d.COLUMN
251
254
  }));
252
255
  return {
253
- type: y.UNIQUE,
254
- value: new i({
255
- columns: t,
256
+ type: b.UNIQUE,
257
+ value: new s({
258
+ columns: n,
256
259
  unique: !0,
257
260
  name: e.constraint_name()?.accept(this)
258
261
  })
259
262
  };
260
263
  }
261
264
  if (e.PRIMARY()) {
262
- let t = e.column_name().map((e) => ({
263
- value: p(e.accept(this)),
264
- type: c.COLUMN
265
+ let n = e.column_name().map((e) => ({
266
+ value: t(e.accept(this)),
267
+ type: d.COLUMN
265
268
  }));
266
269
  return {
267
- type: y.PK,
268
- value: new i({
269
- columns: t,
270
+ type: b.PK,
271
+ value: new s({
272
+ columns: n,
270
273
  pk: !0,
271
274
  name: e.constraint_name()?.accept(this)
272
275
  })
@@ -277,9 +280,9 @@ var y = {
277
280
  return t.value.name = e.constraint_name()?.accept(this), t;
278
281
  }
279
282
  if (e.condition()) {
280
- let t = u(e.condition());
283
+ let t = p(e.condition());
281
284
  return {
282
- type: y.CHECK,
285
+ type: b.CHECK,
283
286
  value: { checks: [{
284
287
  name: e.constraint_name()?.accept(this),
285
288
  expression: t
@@ -291,39 +294,39 @@ var y = {
291
294
  visitOut_of_line_ref_constraint(e) {
292
295
  let t = e.constraint_name()?.accept(this), n = e.regular_id().map((e) => e.accept(this)), r = e.references_clause().accept(this);
293
296
  return r.endpoints[0].fieldNames = n, t && (r.name = t), {
294
- type: y.FK,
297
+ type: b.FK,
295
298
  value: r
296
299
  };
297
300
  }
298
301
  visitForeign_key_clause(e) {
299
- let t = e.paren_column_list().accept(this).map((e) => p(e)), n = e.references_clause().accept(this);
300
- return n.endpoints[0].fieldNames = t, e.on_delete_clause() && (n.onDelete = e.on_delete_clause().accept(this)), {
301
- type: y.FK,
302
- value: n
302
+ let n = e.paren_column_list().accept(this).map((e) => t(e)), r = e.references_clause().accept(this);
303
+ return r.endpoints[0].fieldNames = n, e.on_delete_clause() && (r.onDelete = e.on_delete_clause().accept(this)), {
304
+ type: b.FK,
305
+ value: r
303
306
  };
304
307
  }
305
308
  visitReferences_clause(e) {
306
- if (!e.paren_column_list()) throw T(e.tableview_name(), "Importing a foreign key with implicit referenced columns is not supported");
307
- let t = e.tableview_name().accept(this), r = p(t), i = t.length > 1 ? t[t.length - 2] : void 0, o = e.paren_column_list().accept(this).map((e) => p(e));
308
- return new a({ endpoints: [new n({
309
+ if (!e.paren_column_list()) throw E(e.tableview_name(), "Importing a foreign key with implicit referenced columns is not supported");
310
+ let n = e.tableview_name().accept(this), r = t(n), i = n.length > 1 ? n[n.length - 2] : void 0, o = e.paren_column_list().accept(this).map((e) => t(e));
311
+ return new c({ endpoints: [new a({
309
312
  tableName: null,
310
313
  schemaName: null,
311
314
  fieldNames: [],
312
- relation: m
313
- }), new n({
315
+ relation: h
316
+ }), new a({
314
317
  tableName: r,
315
318
  schemaName: i,
316
319
  fieldNames: o,
317
- relation: h
320
+ relation: g
318
321
  })] });
319
322
  }
320
323
  visitOn_delete_clause(e) {
321
324
  return e.CASCADE() ? "cascade" : e.SET() && e.NULL_() ? "set null" : null;
322
325
  }
323
326
  visitCheck_constraint(e) {
324
- let t = u(e.condition());
327
+ let t = p(e.condition());
325
328
  return {
326
- type: e.isColumn ? b.CHECK : y.CHECK,
329
+ type: e.isColumn ? x.CHECK : b.CHECK,
327
330
  value: { checks: [{ expression: t }] }
328
331
  };
329
332
  }
@@ -344,70 +347,70 @@ var y = {
344
347
  return [e.identifier().accept(this)].concat(e.id_expression().map((e) => e.accept(this)));
345
348
  }
346
349
  visitIdentifier(e) {
347
- return E(u(e));
350
+ return D(p(e));
348
351
  }
349
352
  visitType_name(e) {
350
- let t = e.id_expression().map((e) => e.accept(this));
353
+ let n = e.id_expression().map((e) => e.accept(this));
351
354
  return {
352
- type_name: p(t),
353
- schemaName: t.length > 1 ? t[t.length - 2] : void 0
355
+ type_name: t(n),
356
+ schemaName: n.length > 1 ? n[n.length - 2] : void 0
354
357
  };
355
358
  }
356
359
  visitDatatype(e) {
357
- return { type_name: E(u(e)) };
360
+ return { type_name: D(p(e)) };
358
361
  }
359
362
  visitComment_on_table(e) {
360
- let t = e.tableview_name().accept(this), n = p(t), r = t.length > 1 ? t[t.length - 2] : void 0, i = x(this.data.tables, r, n);
361
- if (!i) throw T(e.tableview_name(), `Table "${n}" not found`);
362
- i.note = { value: e.quoted_string().accept(this) };
363
+ let n = e.tableview_name().accept(this), r = t(n), i = n.length > 1 ? n[n.length - 2] : void 0, a = S(this.data.tables, i, r);
364
+ if (!a) throw E(e.tableview_name(), `Table "${r}" not found`);
365
+ a.note = { value: e.quoted_string().accept(this) };
363
366
  }
364
367
  visitComment_on_column(e) {
365
- let t = e.column_name().accept(this), n = p(t);
366
- t.pop();
367
- let r = p(t);
368
- t.pop();
369
- let i = p(t), a = x(this.data.tables, i, r);
370
- if (!a) throw T(e.column_name(), `Table "${r}" not found`);
371
- let o = S(a, n);
372
- if (!o) throw T(e.column_name(), `Column "${n}" not found in table "${r}"`);
373
- o.note = { value: e.quoted_string().accept(this) };
368
+ let n = e.column_name().accept(this), r = t(n);
369
+ n.pop();
370
+ let i = t(n);
371
+ n.pop();
372
+ let a = t(n), o = S(this.data.tables, a, i);
373
+ if (!o) throw E(e.column_name(), `Table "${i}" not found`);
374
+ let s = C(o, r);
375
+ if (!s) throw E(e.column_name(), `Column "${r}" not found in table "${i}"`);
376
+ s.note = { value: e.quoted_string().accept(this) };
374
377
  }
375
378
  visitAlter_table(e) {
376
- let t = e.tableview_name().accept(this), n = p(t), r = t.length > 1 ? t[t.length - 2] : void 0, i = x(this.data.tables, r, n);
377
- if (!i) throw T(e.tableview_name(), `Table "${n}" not found`);
378
- function a(e, t) {
379
+ let n = e.tableview_name().accept(this), r = t(n), i = n.length > 1 ? n[n.length - 2] : void 0, a = S(this.data.tables, i, r);
380
+ if (!a) throw E(e.tableview_name(), `Table "${r}" not found`);
381
+ function o(e, t) {
379
382
  switch (t.type) {
380
- case y.FK:
381
383
  case b.FK:
382
- t.value.endpoints[0].tableName = n, t.value.endpoints[0].schemaName = r, this.data.refs.push(t.value);
383
- break;
384
- case y.CHECK:
385
- i.checks ||= [], i.checks.push(...t.value.checks);
384
+ case x.FK:
385
+ t.value.endpoints[0].tableName = r, t.value.endpoints[0].schemaName = i, this.data.refs.push(t.value);
386
386
  break;
387
387
  case b.CHECK:
388
- e.checks || (i.checks = []), e.checks.push(...t.value.checks);
388
+ a.checks ||= [], a.checks.push(...t.value.checks);
389
389
  break;
390
- case b.PK:
390
+ case x.CHECK:
391
+ e.checks || (a.checks = []), e.checks.push(...t.value.checks);
392
+ break;
393
+ case x.PK:
391
394
  e.pk = !0, e.unique = void 0;
392
395
  break;
393
- case b.UNIQUE:
396
+ case x.UNIQUE:
394
397
  e.unique = !0;
395
398
  break;
396
- case y.UNIQUE:
397
- case y.INDEX:
398
- case y.PK:
399
- i.indexes ||= [], i.indexes.push(t.value);
399
+ case b.UNIQUE:
400
+ case b.INDEX:
401
+ case b.PK:
402
+ a.indexes ||= [], a.indexes.push(t.value);
400
403
  break;
401
- case b.DEFAULT:
404
+ case x.DEFAULT:
402
405
  e.dbdefault = t.value.dbdefault;
403
406
  break;
404
- case b.NOT_NULL:
407
+ case x.NOT_NULL:
405
408
  e.not_null = !0;
406
409
  break;
407
- case b.NULLABLE:
410
+ case x.NULLABLE:
408
411
  e.not_null = !1;
409
412
  break;
410
- case b.INCREMENT:
413
+ case x.INCREMENT:
411
414
  e.increment = !0;
412
415
  break;
413
416
  default:
@@ -417,9 +420,9 @@ var y = {
417
420
  column: null,
418
421
  constraints: e.constraint_clauses().accept(this)
419
422
  }] : e.column_clauses().accept(this)).forEach((t) => {
420
- let r = t.column === null ? null : S(i, t.column);
421
- if (t.column !== null && !r) throw T(e.tableview_name(), `Column "${t.column}" not found on Table "${n}"`);
422
- t.constraints.forEach((e) => a.bind(this)(r, e));
423
+ let n = t.column === null ? null : C(a, t.column);
424
+ if (t.column !== null && !n) throw E(e.tableview_name(), `Column "${t.column}" not found on Table "${r}"`);
425
+ t.constraints.forEach((e) => o.bind(this)(n, e));
423
426
  });
424
427
  }
425
428
  visitColumn_clauses(e) {
@@ -436,17 +439,17 @@ var y = {
436
439
  return e.modify_col_properties().map((e) => e.accept(this));
437
440
  }
438
441
  visitModify_col_properties(e) {
439
- let t = [], n = p(e.column_name().accept(this));
442
+ let n = [], r = t(e.column_name().accept(this));
440
443
  if (e.DEFAULT()) {
441
- let n = e.expression().accept(this);
442
- t.push({
443
- type: b.DEFAULT,
444
- value: { dbdefault: C(n) }
444
+ let t = e.expression().accept(this);
445
+ n.push({
446
+ type: x.DEFAULT,
447
+ value: { dbdefault: w(t) }
445
448
  });
446
- } else e.inline_constraint() && t.push(...e.inline_constraint().map((e) => e.accept(this)));
449
+ } else e.inline_constraint() && n.push(...e.inline_constraint().map((e) => e.accept(this)));
447
450
  return {
448
- column: n,
449
- constraints: t
451
+ column: r,
452
+ constraints: n
450
453
  };
451
454
  }
452
455
  visitConstraint_clauses(e) {
@@ -454,13 +457,13 @@ var y = {
454
457
  }
455
458
  visitCreate_index(e) {
456
459
  if (!e.table_index_clause()) return;
457
- let t = !!e.UNIQUE(), n = !!e.BITMAP(), r = e.index_name().accept(this), { names: a, columns: o } = e.table_index_clause().accept(this), s = p(a), c = a.length > 1 ? a[a.length - 2] : void 0, l = x(this.data.tables, c, s);
458
- if (!l) throw T(e.table_index_clause(), `Table ${s} not found`);
459
- l.indexes ||= [], l.indexes.push(new i({
460
- name: r,
460
+ let n = !!e.UNIQUE(), r = !!e.BITMAP(), i = e.index_name().accept(this), { names: a, columns: o } = e.table_index_clause().accept(this), c = t(a), l = a.length > 1 ? a[a.length - 2] : void 0, u = S(this.data.tables, l, c);
461
+ if (!u) throw E(e.table_index_clause(), `Table ${c} not found`);
462
+ u.indexes ||= [], u.indexes.push(new s({
463
+ name: i,
461
464
  columns: o,
462
- unique: t,
463
- type: n ? "bitmap" : void 0
465
+ unique: n,
466
+ type: r ? "bitmap" : void 0
464
467
  }));
465
468
  }
466
469
  visitTable_index_clause(e) {
@@ -470,22 +473,22 @@ var y = {
470
473
  };
471
474
  }
472
475
  visitConstraint_name(e) {
473
- return E(u(e));
476
+ return D(p(e));
474
477
  }
475
478
  visitIndex_name(e) {
476
479
  return e.identifier().accept(this);
477
480
  }
478
481
  visitIndex_expr(e) {
479
482
  if (e.expression()) {
480
- let t = w(e.expression().accept(this));
483
+ let t = T(e.expression().accept(this));
481
484
  return {
482
485
  value: t.value,
483
486
  type: t.type
484
487
  };
485
488
  }
486
489
  return {
487
- value: p(e.column_name().accept(this)),
488
- type: c.COLUMN
490
+ value: t(e.column_name().accept(this)),
491
+ type: d.COLUMN
489
492
  };
490
493
  }
491
494
  visitInsert_statement(e) {
@@ -494,7 +497,7 @@ var y = {
494
497
  visitSingle_table_insert(e) {
495
498
  let t = e.insert_into_clause().accept(this), n = e.values_clause().accept(this);
496
499
  if (t && n) {
497
- let { tableName: e, schemaName: r, columns: i } = t, { values: a } = n, o = new s({
500
+ let { tableName: e, schemaName: r, columns: i } = t, { values: a } = n, o = new u({
498
501
  schemaName: r,
499
502
  tableName: e,
500
503
  columns: i,
@@ -515,7 +518,7 @@ var y = {
515
518
  values: a
516
519
  });
517
520
  }), n.forEach((e) => {
518
- let t = new s({
521
+ let t = new u({
519
522
  schemaName: e.schemaName,
520
523
  tableName: e.tableName,
521
524
  columns: e.columns,
@@ -538,11 +541,11 @@ var y = {
538
541
  return null;
539
542
  }
540
543
  visitInsert_into_clause(e) {
541
- let t = e.general_table_ref().accept(this), n = p(t), r = t.length > 1 ? t[t.length - 2] : void 0;
544
+ let n = e.general_table_ref().accept(this), r = t(n), i = n.length > 1 ? n[n.length - 2] : void 0;
542
545
  return {
543
- tableName: n,
544
- schemaName: r,
545
- columns: e.paren_column_list() ? e.paren_column_list().accept(this).map((e) => p(e)) : x(this.data.tables, r, n)?.fields.map((e) => e.name)
546
+ tableName: r,
547
+ schemaName: i,
548
+ columns: e.paren_column_list() ? e.paren_column_list().accept(this).map((e) => t(e)) : S(this.data.tables, i, r)?.fields.map((e) => e.name)
546
549
  };
547
550
  }
548
551
  visitGeneral_table_ref(e) {
@@ -556,64 +559,64 @@ var y = {
556
559
  }
557
560
  visitValues_clause(e) {
558
561
  return { values: [e.expressions_().accept(this).map((e) => ({
559
- value: e.type === c.COLUMN ? e.rawValue : e.value,
560
- type: e.type === c.COLUMN ? l.EXPRESSION : e.type
562
+ value: e.type === d.COLUMN ? e.rawValue : e.value,
563
+ type: e.type === d.COLUMN ? f.EXPRESSION : e.type
561
564
  }))] };
562
565
  }
563
566
  visitExpressions_(e) {
564
567
  return e.expression().map((e) => e.accept(this));
565
568
  }
566
569
  visitId_expression(e) {
567
- return E(u(e));
570
+ return D(p(e));
568
571
  }
569
572
  visitExpression(e) {
570
- let t = u(e);
573
+ let t = p(e);
571
574
  return e.CHAR_STRING() ? {
572
- type: l.STRING,
573
- value: E(t, "'")
575
+ type: f.STRING,
576
+ value: D(t, "'")
574
577
  } : e.TRUE() ? {
575
- type: l.BOOLEAN,
578
+ type: f.BOOLEAN,
576
579
  value: !0
577
580
  } : e.FALSE() ? {
578
- type: l.BOOLEAN,
581
+ type: f.BOOLEAN,
579
582
  value: !1
580
583
  } : e.NULL_() ? {
581
- type: l.BOOLEAN,
584
+ type: f.BOOLEAN,
582
585
  value: null
583
586
  } : e.APPROXIMATE_NUM_LIT() || e.UNSIGNED_INTEGER() ? {
584
- type: l.NUMBER,
587
+ type: f.NUMBER,
585
588
  value: parseFloat(t)
586
589
  } : e.column_name() ? {
587
- type: c.COLUMN,
588
- rawValue: E(t),
589
- value: E(u(e.column_name()))
590
+ type: d.COLUMN,
591
+ rawValue: D(t),
592
+ value: D(p(e.column_name()))
590
593
  } : {
591
- type: c.EXPRESSION,
594
+ type: d.EXPRESSION,
592
595
  value: t
593
596
  };
594
597
  }
595
598
  visitQuoted_string(e) {
596
- return E(u(e), "'");
599
+ return D(p(e), "'");
597
600
  }
598
601
  visitRegular_id(e) {
599
- return E(u(e), "\"");
602
+ return D(p(e), "\"");
600
603
  }
601
604
  };
602
- function O(e, n, r, i) {
605
+ function k(e, n, r, a) {
603
606
  if (!n) return;
604
- let a = /* @__PURE__ */ new Set(), o = g(i ?? "", r), s = new _();
605
- s.enterEveryRule = (n) => {
606
- if (!(n instanceof t.Tableview_nameContext)) return;
607
- let s = n.accept(e), c = Array.isArray(s) ? p(s) : s, l = Array.isArray(s) && s.length > 1 ? s[s.length - 2] : void 0, u = g(l ?? "", c);
608
- u !== o && (a.has(u) || x(e.data.tables, l, c) && (a.add(u), e.data.deps.push({
607
+ let o = /* @__PURE__ */ new Set(), s = _(a ?? "", r), c = new v();
608
+ c.enterEveryRule = (n) => {
609
+ if (!(n instanceof i.Tableview_nameContext)) return;
610
+ let c = n.accept(e), l = Array.isArray(c) ? t(c) : c, u = Array.isArray(c) && c.length > 1 ? c[c.length - 2] : void 0, d = _(u ?? "", l);
611
+ d !== s && (o.has(d) || S(e.data.tables, u, l) && (o.add(d), e.data.deps.push({
609
612
  edges: [{
610
613
  upstream: {
611
- schemaName: l,
612
- tableName: c,
614
+ schemaName: u,
615
+ tableName: l,
613
616
  fieldNames: []
614
617
  },
615
618
  downstream: {
616
- schemaName: i,
619
+ schemaName: a,
617
620
  tableName: r,
618
621
  fieldNames: []
619
622
  }
@@ -621,7 +624,7 @@ function O(e, n, r, i) {
621
624
  note: null,
622
625
  custom: {}
623
626
  })));
624
- }, v.DEFAULT.walk(s, n);
627
+ }, y.DEFAULT.walk(c, n);
625
628
  }
626
629
  //#endregion
627
- export { D as default };
630
+ export { O as default };