PHPackages                             go/db - 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. go/db

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

go/db
=====

Database library

2.2.13(8y ago)6624.4k↑113.3%10[18 issues](https://github.com/vasa-c/go-db/issues)[1 PRs](https://github.com/vasa-c/go-db/pulls)MITPHPPHP &gt;=5.3.0

Since Jan 26Pushed 8y ago20 watchersCompare

[ Source](https://github.com/vasa-c/go-db)[ Packagist](https://packagist.org/packages/go/db)[ Docs](https://github.com/vasa-c/go-db)[ RSS](/packages/go-db/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (20)Used By (0)

go\\DB: работа с различными БД из PHP
=====================================

[](#godb-работа-с-различными-бд-из-php)

[![Latest Stable Version](https://camo.githubusercontent.com/eabe83ced6bb6e377a5b56d34486aafb7b6b543a94dd824766dac546e1a41155/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676f2f64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/go/db)[![Minimum PHP Version](https://camo.githubusercontent.com/b3f29eb7882d2bf523390e9982827e9d2d3a4f74266ca923b512e5d02b9e4011/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e332d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/71572d71c31687cba2ba8e4a96854e72fce11342ae0578dcec14473e02bc3113/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f766173612d632f676f2d64622f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vasa-c/go-db)[![Coverage Status](https://camo.githubusercontent.com/e885bbd879eca9dbd9c7e5ea4870b468aa427f921515de3cc0161085e8a351ff/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f766173612d632f676f2d64622f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/vasa-c/go-db?branch=master)[![License](https://camo.githubusercontent.com/c70e7ee73c657a902276d7f0dd59fbf9005701b0a7ca7ac4a7d89f63a0a299be/68747470733a2f2f706f7365722e707567782e6f72672f676f2f64622f6c6963656e7365)](LICENSE)

[![logo](https://camo.githubusercontent.com/c8fedaa5bed5c6188e1daab47b340515528192fa0f5ccb177c1776c530c2ef41/687474703a2f2f696d672d666f746b692e79616e6465782e72752f6765742f353830312f676f2d6e732e302f305f35303061655f65346561313830365f6f7269672e706e67)](https://camo.githubusercontent.com/c8fedaa5bed5c6188e1daab47b340515528192fa0f5ccb177c1776c530c2ef41/687474703a2f2f696d672d666f746b692e79616e6465782e72752f6765742f353830312f676f2d6e732e302f305f35303061655f65346561313830365f6f7269672e706e67)

- Поддерживаемые адаптеры: MySQL, SQLite, PgSQL
- Документация:
- Обсуждение на pyha.ru:
- Версия 1.x:
- Лицензия: MIT ()
- Тестировано под Debian для PHP 5.(3,4,5,6), PHP 7.(0.1.2), HHVM

Установка
---------

[](#установка)

- Composer: `go/db`
- Релизы:
- Репа: :vasa-c/go-db.git

Документация
------------

[](#документация)

- [Идеология и основные принципы](https://github.com/vasa-c/go-db/wiki/intro)
- [Установка и системные требования](https://github.com/vasa-c/go-db/wiki/install)
- [Создание подключения к базе](https://github.com/vasa-c/go-db/wiki/create)
- [Выполнение запроса](https://github.com/vasa-c/go-db/wiki/query)
- [Шаблон запроса: плейсхолдеры](https://github.com/vasa-c/go-db/wiki/placeholders)
- [Именованные плейсхолдеры](https://github.com/vasa-c/go-db/wiki/named)
- [Префикс имён таблиц](https://github.com/vasa-c/go-db/wiki/prefix)
- [Разбор результата](https://github.com/vasa-c/go-db/wiki/fetch)
- [Обработка ошибок](https://github.com/vasa-c/go-db/wiki/Exceptions)
- [Хранилище объектов подключений](https://github.com/vasa-c/go-db/wiki/Storage)
- [Отладочная информация](https://github.com/vasa-c/go-db/wiki/debug)
- [Отложенное подключение и закрытие соединения](https://github.com/vasa-c/go-db/wiki/connect)
- [Клонирование объекта базы](https://github.com/vasa-c/go-db/wiki/clone)
- [Надстройка над таблицами](https://github.com/vasa-c/go-db/wiki/Table)

### Форматы данных

[](#форматы-данных)

- [Формат WHERE](https://github.com/vasa-c/go-db/wiki/where)
- [Формат COLS](https://github.com/vasa-c/go-db/wiki/cols)
- [Формат TABLE](https://github.com/vasa-c/go-db/wiki/table-format)
- [Формат SET](https://github.com/vasa-c/go-db/wiki/set)

### Дополнительно

[](#дополнительно)

- [Unit-тесты](https://github.com/vasa-c/go-db/wiki/tests)
- [Написание адаптеров](https://github.com/vasa-c/go-db/wiki/Adapters)
- [Compat: совместимость со старыми версиями](https://github.com/vasa-c/go-db/wiki/Compat)

### Поддерживаемые адаптеры

[](#поддерживаемые-адаптеры)

- [mysql](https://github.com/vasa-c/go-db/wiki/Adapters_mysql)
- [mysqlold](https://github.com/vasa-c/go-db/wiki/Adapters_mysqlold)
- [sqlite](https://github.com/vasa-c/go-db/wiki/Adapters_sqlite)
- [pgsql](https://github.com/vasa-c/go-db/wiki/Adapters_pgsql)

Отдельное спасибо
-----------------

[](#отдельное-спасибо)

- Dallone aka Алексей Полев, за адаптер PgSQL

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 91.5% 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.

###  Release Activity

Cadence

Every ~80 days

Recently: every ~158 days

Total

19

Last Release

3089d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/137203?v=4)[Go Chiba](/maintainers/go)[@go](https://github.com/go)

---

Top Contributors

[![vasa-c](https://avatars.githubusercontent.com/u/557081?v=4)](https://github.com/vasa-c "vasa-c (268 commits)")[![mkedo](https://avatars.githubusercontent.com/u/954751?v=4)](https://github.com/mkedo "mkedo (12 commits)")[![apolev](https://avatars.githubusercontent.com/u/2518074?v=4)](https://github.com/apolev "apolev (11 commits)")[![SteadyUA](https://avatars.githubusercontent.com/u/24442579?v=4)](https://github.com/SteadyUA "SteadyUA (2 commits)")

---

Tags

mysqlpgsqlphpsqlitedatabasemysqlsqlitepostgresqlmysqliplaceholders

### Embed Badge

![Health badge](/badges/go-db/health.svg)

```
[![Health](https://phpackages.com/badges/go-db/health.svg)](https://phpackages.com/packages/go-db)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k605.0M6.8k](/packages/doctrine-dbal)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86849.1k](/packages/ezsql-ezsql)[jv2222/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

87211.6k2](/packages/jv2222-ezsql)[cycle/database

DBAL, schema introspection, migration and pagination

71777.8k53](/packages/cycle-database)[krugozor/database

PHP class library for simple, convenient, fast and safe work with MySql database, using PHP mysqli extension and imitation of prepared queries.

412.5k](/packages/krugozor-database)

PHPackages © 2026

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