@deepagents/text2sql 0.33.0 → 0.35.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@ AI-powered natural language to SQL. Ask questions in plain English, get executab
5
5
  ## Features
6
6
 
7
7
  - **Natural Language to SQL** - Convert questions to validated, executable queries
8
- - **Multi-Database Support** - PostgreSQL, SQLite, and SQL Server adapters
8
+ - **Multi-Database Support** - PostgreSQL, SQLite, SQL Server, MySQL/MariaDB, and BigQuery adapters
9
9
  - **Schema-Aware** - Automatic introspection of tables, relationships, indexes, and constraints
10
10
  - **Domain Knowledge** - Inject business terms, guardrails, and query patterns via fragments
11
11
  - **Conversational** - Multi-turn conversations with context persistence
@@ -29,10 +29,10 @@ import { InMemoryContextStore } from '@deepagents/context';
29
29
  import { Text2Sql } from '@deepagents/text2sql';
30
30
  import {
31
31
  Postgres,
32
+ columnValues,
32
33
  constraints,
33
34
  indexes,
34
35
  info,
35
- lowCardinality,
36
36
  tables,
37
37
  views,
38
38
  } from '@deepagents/text2sql/postgres';
@@ -55,7 +55,7 @@ const text2sql = new Text2Sql({
55
55
  info(),
56
56
  indexes(),
57
57
  constraints(),
58
- lowCardinality(),
58
+ columnValues(),
59
59
  ],
60
60
  }),
61
61
  store: new InMemoryContextStore(),
@@ -105,16 +105,16 @@ See [@deepagents/context](../context/README.md) for full fragment documentation.
105
105
 
106
106
  Control what schema metadata the AI receives:
107
107
 
108
- | Function | Description |
109
- | ------------------ | ---------------------------------------------- |
110
- | `tables()` | Tables, columns, and primary keys |
111
- | `views()` | Database views |
112
- | `info()` | Database version and info |
113
- | `indexes()` | Index information for performance hints |
114
- | `constraints()` | Foreign keys and other constraints |
115
- | `rowCount()` | Table sizes (tiny, small, medium, large, huge) |
116
- | `columnStats()` | Min/max/null distribution for columns |
117
- | `lowCardinality()` | Enum-like columns with distinct values |
108
+ | Function | Description |
109
+ | ---------------- | --------------------------------------------------------- |
110
+ | `tables()` | Tables, columns, and primary keys |
111
+ | `views()` | Database views |
112
+ | `info()` | Database version and info |
113
+ | `indexes()` | Index information for performance hints |
114
+ | `constraints()` | Foreign keys and other constraints |
115
+ | `rowCount()` | Table sizes (tiny, small, medium, large, huge) |
116
+ | `columnStats()` | Min/max/null distribution for columns |
117
+ | `columnValues()` | Enum-like and low-cardinality columns with sampled values |
118
118
 
119
119
  ## Conversations
120
120
 
@@ -145,13 +145,15 @@ const followUp = await text2sql.chat(
145
145
  Full documentation available at [januarylabs.github.io/deepagents](https://januarylabs.github.io/deepagents/docs/text2sql):
146
146
 
147
147
  - [Getting Started](https://januarylabs.github.io/deepagents/docs/text2sql/getting-started)
148
- - [Generate SQL](https://januarylabs.github.io/deepagents/docs/text2sql/generate-sql)
148
+ - [Generate SQL](https://januarylabs.github.io/deepagents/docs/text2sql/to-sql)
149
149
  - [Teach the System](https://januarylabs.github.io/deepagents/docs/text2sql/teach-the-system)
150
150
  - [Build Conversations](https://januarylabs.github.io/deepagents/docs/text2sql/build-conversations)
151
151
  - [Grounding](https://januarylabs.github.io/deepagents/docs/text2sql/grounding)
152
152
  - [PostgreSQL](https://januarylabs.github.io/deepagents/docs/text2sql/postgresql)
153
153
  - [SQLite](https://januarylabs.github.io/deepagents/docs/text2sql/sqlite)
154
154
  - [SQL Server](https://januarylabs.github.io/deepagents/docs/text2sql/sqlserver)
155
+ - [MySQL / MariaDB](https://januarylabs.github.io/deepagents/docs/text2sql/mysql)
156
+ - [BigQuery](https://januarylabs.github.io/deepagents/docs/text2sql/bigquery)
155
157
 
156
158
  ## Repository
157
159
 
package/dist/index.js CHANGED
@@ -5295,7 +5295,7 @@ Action: Ask user: "Top by what metric\u2014total revenue, number of orders, or m
5295
5295
  // Style preferences
5296
5296
  styleGuide({
5297
5297
  prefer: "Full table names as aliases (users AS users). Descriptive column aliases (COUNT(*) AS total_count).",
5298
- never: "Abbreviated aliases (u, oi) or positional aliases (t1, t2, a, b)."
5298
+ never: "Abbreviated aliases (u, oi) or positional aliases (t1, t2, a, b). Schema-qualified column references on aliased tables (e.g. dbo.users.id when table is aliased) \u2014 always use the alias (users.id)."
5299
5299
  }),
5300
5300
  styleGuide({
5301
5301
  prefer: "Concise, business-friendly summaries with key comparisons and helpful follow-ups."