{"id":20704145,"url":"https://github.com/solidsnack/rust-postgres-named-parameters","last_synced_at":"2026-04-22T02:33:25.877Z","repository":{"id":66073490,"uuid":"87665236","full_name":"solidsnack/rust-postgres-named-parameters","owner":"solidsnack","description":null,"archived":false,"fork":false,"pushed_at":"2017-06-11T06:08:00.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-25T13:45:54.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/solidsnack.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-08T21:26:51.000Z","updated_at":"2023-12-20T20:18:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"98af1876-ea9b-4a6f-bb24-51fb93a647cc","html_url":"https://github.com/solidsnack/rust-postgres-named-parameters","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solidsnack/rust-postgres-named-parameters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Frust-postgres-named-parameters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Frust-postgres-named-parameters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Frust-postgres-named-parameters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Frust-postgres-named-parameters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidsnack","download_url":"https://codeload.github.com/solidsnack/rust-postgres-named-parameters/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidsnack%2Frust-postgres-named-parameters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32118109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":[],"created_at":"2024-11-17T01:11:11.701Z","updated_at":"2026-04-22T02:33:25.858Z","avatar_url":"https://github.com/solidsnack.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Named Parameters For `postgres` Queries\n\nThis crate provides for named parameters for [`postgres`] queries.\n\n[`postgres`]: https://docs.rs/postgres\n\n```rust\n#[macro_use]\nextern crate postgres_named_parameters;\n\nuse chrono::Duration;\nuse chrono::prelude::UTC;\n\nlet now = UTC.now();\nlet q = query!(\"SELECT * FROM log WHERE t BETWEEN {lo} AND {hi}\",\n               lo = now - Duration.minutes(6),\n               hi = now - Duration.minutes(1));\n\nconn.execute(q.text(), q.parameters());\n```\n\n## Parameters \u0026 Idenitifers\n\n* Use `{...}` for parameters:\n\n```sql\nSELECT * FROM log WHERE t BETWEEN {lo} AND {hi}\n```\n\n* Use `{\u0026...}` for variables that will be treated as identifiers, which is to\n  say, as the names of columns, types or tables:\n\n```sql\nINSERT INTO {\u0026current_partition} VALUES (now(), {tag}, {location})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidsnack%2Frust-postgres-named-parameters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidsnack%2Frust-postgres-named-parameters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidsnack%2Frust-postgres-named-parameters/lists"}