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 1mo ago

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 10% 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

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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