{"id":25826760,"url":"https://github.com/watchdg/node-clickhouse-buffer","last_synced_at":"2026-05-06T16:35:35.881Z","repository":{"id":41098571,"uuid":"479242983","full_name":"WatchDG/node-clickhouse-buffer","owner":"WatchDG","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-23T14:05:26.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T00:41:06.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WatchDG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-08T04:25:07.000Z","updated_at":"2022-05-08T14:19:12.000Z","dependencies_parsed_at":"2024-11-11T11:38:17.044Z","dependency_job_id":null,"html_url":"https://github.com/WatchDG/node-clickhouse-buffer","commit_stats":{"total_commits":62,"total_committers":1,"mean_commits":62.0,"dds":0.0,"last_synced_commit":"c69878b33107eed7b4c2acd87ee8e14435e21a73"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WatchDG%2Fnode-clickhouse-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WatchDG%2Fnode-clickhouse-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WatchDG%2Fnode-clickhouse-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WatchDG%2Fnode-clickhouse-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WatchDG","download_url":"https://codeload.github.com/WatchDG/node-clickhouse-buffer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241176617,"owners_count":19922732,"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":"2025-02-28T15:44:48.721Z","updated_at":"2025-11-23T23:05:25.385Z","avatar_url":"https://github.com/WatchDG.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clickhouse-buffer\n\n## Install\n\n```shell\nyarn add clickhouse-buffer\n# or\nnpm install clickhouse-buffer\n```\n\n## How to use\n\n```typescript\nimport {ClickhouseBuffer, DEFAULT_DATABASE} from \"clickhouse-buffer\";\n\n(async () =\u003e {\n    const database = DEFAULT_DATABASE;\n    const table = 'events';\n\n    const directoryPath = await ClickhouseBuffer.prepareDirectoryPath('buffer', database, table, 0o777);\n\n    const clickhouseBuffer = new ClickhouseBuffer({\n        directoryPath,\n        database,\n        table\n    });\n\n    await clickhouseBuffer.clickhouseClient.query(`CREATE TABLE IF NOT EXISTS ${database}.${table} (id UInt16) ENGINE = MergeTree() ORDER BY id`);\n\n    await clickhouseBuffer.loadFilesToDatabase();\n\n    for (let i = 0; i \u003c= 9; i++) {\n        clickhouseBuffer.push([i]);\n    }\n\n    setTimeout(() =\u003e {\n        for (let i = 10; i \u003c= 19; i++) {\n            clickhouseBuffer.push([i]);\n        }\n    }, 5000)\n\n    setTimeout(() =\u003e {\n        clickhouseBuffer.release();\n    }, 15000);\n})();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatchdg%2Fnode-clickhouse-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatchdg%2Fnode-clickhouse-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatchdg%2Fnode-clickhouse-buffer/lists"}