{"id":15077775,"url":"https://github.com/stereoflo/dbal-clickhouse","last_synced_at":"2026-01-02T20:52:42.806Z","repository":{"id":57059708,"uuid":"434643310","full_name":"StereoFlo/dbal-clickhouse","owner":"StereoFlo","description":"doctrine dbal layer for clickhouse. ","archived":false,"fork":false,"pushed_at":"2021-12-09T18:49:07.000Z","size":478,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T02:14:08.053Z","etag":null,"topics":["clickhouse","dbal","symfony"],"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/StereoFlo.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":"2021-12-03T15:26:05.000Z","updated_at":"2021-12-09T18:49:10.000Z","dependencies_parsed_at":"2022-08-24T07:40:06.664Z","dependency_job_id":null,"html_url":"https://github.com/StereoFlo/dbal-clickhouse","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoFlo%2Fdbal-clickhouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoFlo%2Fdbal-clickhouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoFlo%2Fdbal-clickhouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StereoFlo%2Fdbal-clickhouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StereoFlo","download_url":"https://codeload.github.com/StereoFlo/dbal-clickhouse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885890,"owners_count":20363644,"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":["clickhouse","dbal","symfony"],"created_at":"2024-09-25T04:32:10.843Z","updated_at":"2026-01-02T20:52:42.764Z","avatar_url":"https://github.com/StereoFlo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Installation\n\n```\ncomposer require stereoflo/dbal-clickhouse\n```\n\n## Initialization\n### Symfony\nconfigure...\n```.dotenv\n# .env\nCLICKHOUSE_HOST=127.0.0.1\nCLICKHOUSE_PORT=8123\nCLICKHOUSE_USER=default\nCLICKHOUSE_PASSWORD=\n```\n\n```yml\n# config/packages/doctrine.yaml\ndoctrine:\n    dbal:\n        dbname:   default\n        host:     '%env(resolve:CLICKHOUSE_HOST)%'\n        port:     '%env(resolve:CLICKHOUSE_PORT)%'\n        user:     '%env(resolve:CLICKHOUSE_USER)%'\n        password: '%env(resolve:CLICKHOUSE_PASSWORD)%'\n        driver_class: DBALClickHouse\\Driver\n        wrapper_class: DBALClickHouse\\Connection\n        options:\n            enable_http_compression: 1\n            max_execution_time: 60\n\n```\n...and get from the service container\n```php\n    private Connection $connection;\n\n    public function __construct(Connection $connection)\n    {\n        $this-\u003econnection = $connection;\n    }\n\n    /**\n     * @return array\u003carray\u003cstring, string\u003e\u003e\n     */\n    public function getByUserId(int $userId): array\n    {\n        $result = $this-\u003econnection\n            -\u003ecreateQueryBuilder()\n            -\u003eselect('user.user_id')\n            -\u003efrom('users', 'user')\n            -\u003ewhere('user.user_id = :user_id')\n            -\u003esetParameter('user_id', $userId)\n            -\u003eexecuteQuery();\n\n        return $result-\u003efetchAllAssociative();\n``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereoflo%2Fdbal-clickhouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstereoflo%2Fdbal-clickhouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstereoflo%2Fdbal-clickhouse/lists"}