PHPackages                             gonzalo123/sql-string-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. gonzalo123/sql-string-generator

ActiveLibrary[Database &amp; ORM](/categories/database)

gonzalo123/sql-string-generator
===============================

Write a DSL to generate valid SQL statements for SELECT, INSERT, UPDATE and DELETE

04PHP

Since Nov 1Pushed 13y ago1 watchersCompare

[ Source](https://github.com/gonzalo123/sqlStringGenerator)[ Packagist](https://packagist.org/packages/gonzalo123/sql-string-generator)[ RSS](/packages/gonzalo123-sql-string-generator/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Kata SQL String Generator.

Given table metadata (name, columns/types, etc.), generate a well-formed SQL string. For example: String\[\] columns = { "a", "b" }; assertEquals("select a,b,c from x", sql.select(tableName, columns));

Do this for the usual SQL queries: SELECT, INSERT, UPDATE, DELETE. To simplify the problem, consider only this data types: strings, integers and booleans.

Remember to only do one thing at a time, and try not to think of the solution "ahead of time". Let the methods and objects just grow by themselves, as you write more and more tests.

Don't forget: Try to use TDD to write code. Free Spanish book here. Write unit tests for generated code. Try to apply SOLID Principles.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39072?v=4)[Gonzalo Ayuso](/maintainers/gonzalo123)[@gonzalo123](https://github.com/gonzalo123)

---

Top Contributors

[![gonzalo123](https://avatars.githubusercontent.com/u/39072?v=4)](https://github.com/gonzalo123 "gonzalo123 (4 commits)")

### Embed Badge

![Health badge](/badges/gonzalo123-sql-string-generator/health.svg)

```
[![Health](https://phpackages.com/badges/gonzalo123-sql-string-generator/health.svg)](https://phpackages.com/packages/gonzalo123-sql-string-generator)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
