{"id":16948839,"url":"https://github.com/jackc/pgmock","last_synced_at":"2025-04-04T20:15:27.193Z","repository":{"id":16456166,"uuid":"79978954","full_name":"jackc/pgmock","owner":"jackc","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-08T07:04:37.000Z","size":51,"stargazers_count":124,"open_issues_count":10,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T13:21:21.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/jackc.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":"2017-01-25T03:15:22.000Z","updated_at":"2025-03-20T21:31:43.000Z","dependencies_parsed_at":"2024-06-18T14:06:34.654Z","dependency_job_id":null,"html_url":"https://github.com/jackc/pgmock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackc%2Fpgmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackc%2Fpgmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackc%2Fpgmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackc%2Fpgmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackc","download_url":"https://codeload.github.com/jackc/pgmock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242681,"owners_count":20907134,"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-10-13T21:52:31.080Z","updated_at":"2025-04-04T20:15:27.174Z","avatar_url":"https://github.com/jackc.png","language":"Go","readme":"# pgmock\n\npgmock provides the ability to mock a PostgreSQL server.\n\nSee pgmock_test.go for example usage.\n\n## pgmockproxy\n\npgmockproxy is a PostgreSQL proxy that logs the messages back and forth between the PostgreSQL client and server. This\ncan aid in building a mocking script by running commands against a real server to observe the results. It can also be\nused to debug applications that speak the PostgreSQL wire protocol without needing to use a tool like Wireshark.\n\nExample usage:\n\n```\n$ pgmockproxy -remote \"/private/tmp/.s.PGSQL.5432\"\nF {\"Type\":\"StartupMessage\",\"ProtocolVersion\":196608,\"Parameters\":{\"application_name\":\"psql\",\"client_encoding\":\"UTF8\",\"database\":\"jack\",\"user\":\"jack\"}}\nB {\"Type\":0,\"Salt\":[0,0,0,0],\"SASLAuthMechanisms\":null,\"SASLData\":null}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"application_name\",\"Value\":\"psql\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"client_encoding\",\"Value\":\"UTF8\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"DateStyle\",\"Value\":\"ISO, MDY\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"integer_datetimes\",\"Value\":\"on\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"IntervalStyle\",\"Value\":\"postgres\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"is_superuser\",\"Value\":\"on\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"server_encoding\",\"Value\":\"UTF8\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"server_version\",\"Value\":\"11.5\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"session_authorization\",\"Value\":\"jack\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"standard_conforming_strings\",\"Value\":\"on\"}\nB {\"Type\":\"ParameterStatus\",\"Name\":\"TimeZone\",\"Value\":\"US/Central\"}\nB {\"Type\":\"BackendKeyData\",\"ProcessID\":31007,\"SecretKey\":1013083042}\nB {\"Type\":\"ReadyForQuery\",\"TxStatus\":\"I\"}\nF {\"Type\":\"Query\",\"String\":\"select generate_series(1,5);\"}\nB {\"Type\":\"RowDescription\",\"Fields\":[{\"Name\":\"generate_series\",\"TableOID\":0,\"TableAttributeNumber\":0,\"DataTypeOID\":23,\"DataTypeSize\":4,\"TypeModifier\":-1,\"Format\":0}]}\nB {\"Type\":\"DataRow\",\"Values\":[{\"text\":\"1\"}]}\nB {\"Type\":\"DataRow\",\"Values\":[{\"text\":\"2\"}]}\nB {\"Type\":\"DataRow\",\"Values\":[{\"text\":\"3\"}]}\nB {\"Type\":\"DataRow\",\"Values\":[{\"text\":\"4\"}]}\nB {\"Type\":\"DataRow\",\"Values\":[{\"text\":\"5\"}]}\nB {\"Type\":\"CommandComplete\",\"CommandTag\":\"SELECT 5\"}\nB {\"Type\":\"ReadyForQuery\",\"TxStatus\":\"I\"}\nF {\"Type\":\"Terminate\"}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackc%2Fpgmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackc%2Fpgmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackc%2Fpgmock/lists"}