@superatomai/sdk-node 0.0.33-mds → 0.0.34-mds

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.
package/dist/index.mjs CHANGED
@@ -6992,12 +6992,18 @@ function extractEntityDetails(description) {
6992
6992
  function extractColumnNames(block) {
6993
6993
  const columns = [];
6994
6994
  const seen = /* @__PURE__ */ new Set();
6995
- const colPattern = /(?:^|,)\s*([^,()\[\]{}\n]+?)\s*\((?:NUMBER|TEXT|BOOLEAN|TIMESTAMP|INTEGER|FLOAT|DECIMAL|DATE|BIGINT|VARCHAR|CHAR|DOUBLE|REAL|ARRAY|OBJECT)\)/gi;
6995
+ const colPattern = /(?:^|,)\s*([^,()\[\]{}\n]+?)\s*\((?:NUMBER|TEXT|BOOLEAN|TIMESTAMP|INTEGER|FLOAT|DECIMAL|DATE|BIGINT|VARCHAR|CHAR|DOUBLE|REAL|ARRAY|OBJECT)(?:[^)]*)\)(?:\[[^\]]*\])?\{([^}]+)\}|(?:^|,)\s*([^,()\[\]{}\n]+?)\s*\((?:NUMBER|TEXT|BOOLEAN|TIMESTAMP|INTEGER|FLOAT|DECIMAL|DATE|BIGINT|VARCHAR|CHAR|DOUBLE|REAL|ARRAY|OBJECT)(?:[^)]*)\)/gi;
6996
6996
  let match;
6997
6997
  while ((match = colPattern.exec(block)) !== null) {
6998
- const col = match[1].trim();
6998
+ const col = (match[1] || match[3] || "").trim();
6999
+ const samples = match[2] || "";
6999
7000
  if (col && col.length < 60 && !col.includes("\u2022") && !seen.has(col)) {
7000
- columns.push(col);
7001
+ const sampleValues = samples.split("|").map((s) => s.trim()).filter(Boolean);
7002
+ if (sampleValues.length > 0 && sampleValues.length <= 10) {
7003
+ columns.push(`${col}{${sampleValues.join("|")}}`);
7004
+ } else {
7005
+ columns.push(col);
7006
+ }
7001
7007
  seen.add(col);
7002
7008
  }
7003
7009
  }