Metadata-Version: 2.4
Name: ibmdb2-sqlglot-plugin
Version: 0.0.2
Summary: IBM DB2 dialect plugin for sqlglot
Author: 
License: Apache-2.0
Project-URL: Homepage, https://github.com/Salfiii/ibmdb2-sqlglot-plugin
Project-URL: Repository, https://github.com/Salfiii/ibmdb2-sqlglot-plugin
Keywords: sql,sqlglot,ibm,db2,dialect,parser,transpiler
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqlglot<31,>=28.6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ibm-db<4,>=3.2.6; extra == "dev"
Requires-Dist: ruff>=0.9.0; extra == "dev"
Dynamic: license-file

# ibmdb2-sqlglot-plugin

IBM DB2 dialect plugin for [sqlglot](https://github.com/tobymao/sqlglot) — bidirectional transpilation between IBM DB2 and any SQL dialect.

## Installation

```bash
pip install ibmdb2-sqlglot-plugin
```

## Usage

After installing the package, the `ibmdb2` dialect is available in sqlglot automatically — no extra imports needed:

```python
import sqlglot

# Any dialect → IBM DB2
result = sqlglot.transpile("SELECT * FROM users WHERE id = 1", read="mysql", write="ibmdb2")[0]
# → SELECT * FROM `users` WHERE id = 1

# IBM DB2 → any dialect
result = sqlglot.transpile("$t = (SELECT id FROM users); SELECT * FROM $t AS t", read="ibmdb2", write="postgres")[0]
# → WITH t AS (SELECT id FROM users) SELECT * FROM t AS t
```

## What the plugin does
@TODO
---

## Development

```bash
## pip install uv # if uv does not exist locally
uv sync            # install dependencies
uv run pytest      # run all tests
```

## License

APACHE LICENSE 2.0
