{"id":19326129,"url":"https://github.com/bartko-s/stefano-db","last_synced_at":"2025-07-20T17:37:11.799Z","repository":{"id":8767075,"uuid":"10451516","full_name":"bartko-s/stefano-db","owner":"bartko-s","description":"[DEPRECATED]","archived":false,"fork":false,"pushed_at":"2022-10-01T10:11:31.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T06:18:05.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartko-s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-03T09:38:32.000Z","updated_at":"2022-10-01T10:00:16.000Z","dependencies_parsed_at":"2022-09-08T23:41:26.955Z","dependency_job_id":null,"html_url":"https://github.com/bartko-s/stefano-db","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/bartko-s/stefano-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartko-s","download_url":"https://codeload.github.com/bartko-s/stefano-db/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartko-s%2Fstefano-db/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266166982,"owners_count":23886902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T02:12:33.171Z","updated_at":"2025-07-20T17:37:11.783Z","avatar_url":"https://github.com/bartko-s.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[DEPRECATED] Stefano Db\r\n=======================\r\n\r\nZend DB from [v.2.4.0](https://github.com/zendframework/zend-db/releases/tag/release-2.4.0) support nested transactions. Please use [Zend Db](https://github.com/zendframework/zend-db/) instead of this library. This library is NOT MAINTAINED anymore.\r\n\r\n[![Build Status](https://app.travis-ci.com/bartko-s/stefano-db.svg?branch=master)](https://app.travis-ci.com/bartko-s/stefano-db)\r\n[![Code Coverege](https://coveralls.io/repos/bartko-s/stefano-db/badge.png?branch=master)](https://coveralls.io/r/bartko-s/stefano-db?branch=master)\r\n\r\nInstallation using Composer\r\n--------------------------\r\n1. Run command  ``` composer require stefano/stefano-db ```\r\n\r\nFeatures\r\n------------\r\n- extend Zend Framework 2 Database adapter. For more info see [Zend Db](http://framework.zend.com/manual/2.3/en/index.html#zend-db)\r\n- nested transaction. For more info see [Stefano nested transaction](https://github.com/bartko-s/stefano-nested-transaction/)\r\n- execute defined queries after db connection will be created\r\n\r\n\r\nDb Adapter Configuration\r\n------------------------\r\n\r\n```\r\n//$option for more info see Zend Framework 2 Db documentation\r\n$adapter = new \\StefanoDb\\Adapter\\Adapter($options);\r\n```\r\n\r\nNested transaction API\r\n----------------------\r\n\r\n```\r\n$adapter-\u003ebegin();\r\n$adapter-\u003ecommit();\r\n$adapter-\u003erollback();\r\n```\r\n\r\nUsage with Zend Framework 2 MVC\r\n-------------------------------\r\n\r\n- single DB connection configuration\r\n\r\n```\r\nreturn array(\r\n    //single DB connection\r\n    'db' =\u003e array(\r\n        'driver' =\u003e '',\r\n        'database' =\u003e '',\r\n        'username' =\u003e '',\r\n        'password' =\u003e '',\r\n        'sqls' =\u003e array(\r\n            \"SET time_zone='+0:00'\",\r\n            \".....\"\r\n        ),\r\n    ),\r\n    'service_manager' =\u003e array(\r\n        'factories' =\u003e array(\r\n            'Zend\\Db\\Adapter\\Adapter'\r\n                =\u003e '\\StefanoDb\\Adapter\\Service\\AdapterServiceFactory',\r\n        ),\r\n    ),\r\n);\r\n```\r\n\r\n- multiple DB connection configuration\r\n\r\n```\r\nreturn array(\r\n    'db' =\u003e array(\r\n        'adapters' =\u003e array(\r\n            'Db/Write' =\u003e array(\r\n                'driver' =\u003e '',\r\n                'database' =\u003e '',\r\n                'username' =\u003e '',\r\n                'password' =\u003e '',\r\n                'sqls' =\u003e array(\r\n                    \"SET time_zone='+0:00'\",\r\n                    \".....\"\r\n                ),\r\n            ),\r\n            'Db/Read' =\u003e array(\r\n                'driver' =\u003e '',\r\n                'database' =\u003e '',\r\n                'username' =\u003e '',\r\n                'password' =\u003e '',\r\n                'sqls' =\u003e array(\r\n                    \"SET time_zone='+0:00'\",\r\n                    \".....\"\r\n                ),\r\n            ),\r\n        ),\r\n    ),\r\n    'service_manager' =\u003e array(\r\n        'abstract_factories' =\u003e array(\r\n            '\\StefanoDb\\Adapter\\Service\\AdapterAbstractServiceFactory',\r\n        ),\r\n    ),\r\n);\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartko-s%2Fstefano-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartko-s%2Fstefano-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartko-s%2Fstefano-db/lists"}