DEV.co
Open-Source Databases · shadowhand

latitude

Latitude is a lightweight PHP SQL query builder with no external dependencies, designed to help developers construct database queries programmatically. It follows PHP standards (PSR-1, PSR-2, PSR-4) and is distributed under the permissive MIT license.

Source: GitHub — github.com/shadowhand/latitude
633
GitHub stars
52
Forks
PHP
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryshadowhand/latitude
Ownershadowhand
Primary languagePHP
LicenseMIT — OSI-approved
Stars633
Forks52
Open issues10
Latest releaseUnknown
Last updated2026-06-24
Sourcehttps://github.com/shadowhand/latitude

What latitude is

A fluent SQL query builder for PHP that compiles to native SQL without relying on third-party libraries. Supports PSR-1/2/4 compliance and integrates via Composer; last activity recorded June 2026.

Quickstart

Get the latitude source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/shadowhand/latitude.gitcd latitude# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Small to Medium PHP Projects

Ideal for applications needing safe, programmatic SQL construction without the overhead of a full ORM or framework dependency tree.

Microservices and APIs

Lightweight query building for RESTful APIs or microservices where minimal dependencies and fast startup are critical.

Legacy System Integration

Can be integrated into existing PHP codebases with minimal impact, as it introduces no transitive dependencies.

Implementation considerations

  • Verify database dialect support (MySQL, PostgreSQL, SQLite, etc.) aligns with your stack before adoption.
  • No formal versioning or release tags visible; pin to a specific commit or Composer constraint to avoid breaking changes.
  • Zero dependencies is an advantage for security surface but may limit feature parity with larger frameworks.
  • Test query compilation output against your specific database to ensure SQL correctness.
  • Plan for in-house maintenance or community contribution if critical fixes are needed; no SLA available.

When to avoid it — and what to weigh

  • Complex Domain Logic Required — If your application needs sophisticated relationships, lazy loading, or ORM-level abstractions, a full ORM (Doctrine, Eloquent) will be more productive.
  • Active Community Support Expected — With 633 stars and 10 open issues, community activity is modest. If you need rapid issue resolution or frequent updates, larger projects may be safer.
  • Multi-Database Abstraction Layer Needed — Latitude's dialect support and portability features are unknown from the data provided; verify compatibility across your target databases before committing.
  • Team Unfamiliar with SQL — This is a query *builder*, not an abstraction. Teams more comfortable with ORM conventions may find the learning curve steeper than alternatives.

License & commercial use

Licensed under MIT (SPDX: MIT). Permissive open-source license allowing use in personal and commercial projects, with no restrictions on distribution or modification. See LICENSE.md in the repository for full terms.

MIT license explicitly permits commercial use. README states: 'can be used for any personal or commercial project.' No copyleft, patent, or trademark restrictions are evident from the license text. Recommended to review the full LICENSE.md file to confirm no local amendments.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

No known security audit, CVE history, or formal security policy documented. Zero dependencies reduces supply-chain risk. As with any query builder, ensure parameterized queries are used to prevent SQL injection; review the library's API to confirm parameter binding is enforced or well-documented.

Alternatives to consider

Doctrine DBAL

Mature query builder with multi-database support, wider adoption, and active maintenance. Adds dependencies but provides more features and community support.

Eloquent (standalone)

Laravel's query builder; can be used outside Laravel. Broader feature set and strong community, but larger footprint and implicit conventions.

PDO with prepared statements

Native PHP approach, zero dependencies. Suitable if your queries are simple and you prefer explicit control, but more verbose and error-prone than a builder.

Software development agency

Build on latitude with DEV.co software developers

Our team can help you evaluate, integrate, and optimize Latitude for your specific architecture. Let's discuss your database and query patterns.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

latitude FAQ

Is Latitude suitable for production?
The MIT license and recent activity suggest it is; however, verify compatibility with your database and test thoroughly. No formal SLA or production support contract is evident.
Does Latitude support multiple database types?
Not explicitly stated in the provided data. Review the online documentation or source code to confirm support for MySQL, PostgreSQL, SQLite, etc.
Can I use Latitude with Laravel or other frameworks?
Yes. As a standalone library with no framework dependencies, it can be integrated into any PHP project. However, frameworks like Laravel bundle their own query builders; verify it doesn't conflict.
What is the learning curve?
Moderate. Familiarity with SQL is essential. Fluent interface conventions should be quick to grasp; review the documentation and examples for your specific query patterns.

Software development & web development with DEV.co

Need help beyond evaluating latitude? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.

Ready to integrate Latitude into your PHP project?

Our team can help you evaluate, integrate, and optimize Latitude for your specific architecture. Let's discuss your database and query patterns.