{"id":13478740,"url":"https://github.com/jwilm/rust-postgres-cursor","last_synced_at":"2025-07-29T10:36:49.484Z","repository":{"id":22273781,"uuid":"93596609","full_name":"jwilm/rust-postgres-cursor","owner":"jwilm","description":"A Cursor type for use with rust-postgres","archived":false,"fork":false,"pushed_at":"2023-05-31T05:34:04.000Z","size":12,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-22T14:40:12.113Z","etag":null,"topics":["cursor","postgresql","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/jwilm.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}},"created_at":"2017-06-07T05:38:39.000Z","updated_at":"2025-05-28T06:06:29.000Z","dependencies_parsed_at":"2024-01-16T06:19:33.570Z","dependency_job_id":"84796a3a-7957-462f-bc8f-ca6068c97b40","html_url":"https://github.com/jwilm/rust-postgres-cursor","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.11111111111111116","last_synced_commit":"8db8ca0096391a33232926beb23972af130c830b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jwilm/rust-postgres-cursor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilm%2Frust-postgres-cursor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilm%2Frust-postgres-cursor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilm%2Frust-postgres-cursor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilm%2Frust-postgres-cursor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwilm","download_url":"https://codeload.github.com/jwilm/rust-postgres-cursor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwilm%2Frust-postgres-cursor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267671628,"owners_count":24125382,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cursor","postgresql","rust"],"created_at":"2024-07-31T16:02:01.989Z","updated_at":"2025-07-29T10:36:49.435Z","avatar_url":"https://github.com/jwilm.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"rust-postgres-cursor\n====================\n\nA cursor type for use with PostgreSQL.\n\n## Example\n\n```rust\nextern crate postgres;\nextern crate postgres_cursor;\n\nuse postgres::{Client, NoTls};\nuse postgres_cursor::Cursor;\n\n// First, establish a connection with postgres\nlet mut client = Client::connect(\"postgres://jwilm@127.0.0.1/foo\", NoTls)\n    .expect(\"connect\");\n\n// Build the cursor\nlet mut cursor = Cursor::build(\u0026mut client)\n    // Batch size determines rows returned in each FETCH call\n    .batch_size(10)\n    // Query is the statement to build a cursor for\n    .query(\"SELECT id FROM products\")\n    // Finalize turns this builder into a cursor\n    .finalize()\n    .expect(\"cursor creation succeeded\");\n\n// Iterate over batches of rows\nfor result in \u0026mut cursor {\n    // Each item returned from the iterator is a Result\u003cVec\u003cRow\u003e, postgres::Error\u003e.\n    // This is because each call to `next()` makes a query\n    // to the database.\n    let rows = result.unwrap();\n\n    // After handling errors, rows returned in this iteration\n    // can be iterated over.\n    for row in \u0026rows {\n        println!(\"{:?}\", row);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwilm%2Frust-postgres-cursor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwilm%2Frust-postgres-cursor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwilm%2Frust-postgres-cursor/lists"}