View on GitHub

latitude

A SQL query builder with zero dependencies

Supported Engines

Basic Engine

The default engine is Latitude\QueryBuilder\Engine\BasicEngine. This engine does not escape identifiers or provide any additional features.

Note: It is not recommended to use this engine in production.

Common Engine

The standard SQL-92 engine is Latitude\QueryBuilder\Engine\CommonEngine. This engine escapes all identifiers using double quotes. No other additional features are provided.

This engine is recommended for most databases without a more specific engine, such as SQLite.

MySQL Engine

The MySQL engine is Latitude\QueryBuilder\Engine\MySqlEngine. This engine escapes all identifiers using backticks.

Postgres Engine

The MySQL engine is Latitude\QueryBuilder\Engine\PostgresEngine. This engine extends the CommonEngine to provide additional features:

SQL Server Engine

The MySQL engine is Latitude\QueryBuilder\Engine\SqlServerEngine. This engine escapes all identifiers using brackets. It also escapes brackets used in LIKE expressions, preventing the usage of character ranges.

Note: This engine relies on features found in SQL Server 2012 and above.