{"id":30211330,"url":"https://github.com/mons/anyevent-dbd-pg","last_synced_at":"2025-08-13T20:36:11.281Z","repository":{"id":1204781,"uuid":"1114533","full_name":"Mons/AnyEvent-DBD-Pg","owner":"Mons","description":"AnyEvent interface to DBD::Pg's async interface","archived":false,"fork":false,"pushed_at":"2012-02-08T10:50:10.000Z","size":264,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-10T20:33:06.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/AnyEvent-DBD-Pg","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mons.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-26T12:53:38.000Z","updated_at":"2014-09-08T21:35:24.000Z","dependencies_parsed_at":"2022-08-16T12:35:16.001Z","dependency_job_id":null,"html_url":"https://github.com/Mons/AnyEvent-DBD-Pg","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/Mons/AnyEvent-DBD-Pg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FAnyEvent-DBD-Pg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FAnyEvent-DBD-Pg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FAnyEvent-DBD-Pg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FAnyEvent-DBD-Pg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mons","download_url":"https://codeload.github.com/Mons/AnyEvent-DBD-Pg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2FAnyEvent-DBD-Pg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305902,"owners_count":24562115,"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-08-13T02:00:09.904Z","response_time":66,"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":"2025-08-13T20:34:34.500Z","updated_at":"2025-08-13T20:36:11.242Z","avatar_url":"https://github.com/Mons.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    AnyEvent::DBD::Pg - AnyEvent interface to DBD::Pg's async interface\n\nSYNOPSIS\n        use AnyEvent::DBD::Pg;\n\n        my $adb = AnyEvent::DBD::Pg-\u003enew('dbi:Pg:dbname=test', user =\u003e 'pass', {\n            pg_enable_utf8 =\u003e 1,\n            pg_server_prepare =\u003e 0,\n            quote_char =\u003e '\"',\n            name_sep =\u003e \".\",\n        }, debug =\u003e 1);\n\n        $adb-\u003equeue_size( 4 );\n        $adb-\u003edebug( 1 );\n\n        $adb-\u003econnect;\n\n        $adb-\u003eselectcol_arrayref(\"select pg_sleep( 0.1 ), 1\", { Columns =\u003e [ 1 ] }, sub {\n            my $rc = shift or return warn;\n            my $res = shift;\n            warn \"Got \u003c$adb-\u003e{qd}\u003e = $rc / @{$res}\";\n            $adb-\u003eselectrow_hashref(\"select data,* from tx limit 2\", {}, sub {\n                my $rc = shift or return warn;\n                warn \"Got $adb-\u003e{qd} = $rc [@_]\";\n            });\n        });\n\n        $adb-\u003eexecute(\"update tx set data = data;\",sub {\n            my $rc = shift or return warn;\n            warn \"Got exec: $rc\";\n            #my $st = shift;\n            #$st-\u003efinish;\n        });\n\n        $adb-\u003eexecute(\"select from 1\",sub {\n            shift or return warn;\n            warn \"Got $adb-\u003e{qd} = @_\";\n        });\n\n        $adb-\u003eselectrow_array(\"select pg_sleep( 0.1 ), 2\", {}, sub {\n            shift or return warn;\n            warn \"Got $adb-\u003e{qd} = [@_]\";\n            $adb-\u003eselectrow_hashref(\"select * from tx limit 1\", {}, sub {\n                warn \"Got $adb-\u003e{qd} = [@_]\";\n                $adb-\u003eexecute(\"select * from tx\", sub {\n                    my $rc = shift or return warn;\n                    my $st = shift;\n                    while(my $row = $st-\u003efetchrow_hashref) { warn \"$row-\u003e{id}\"; }\n                    $st-\u003efinish;\n                    exit;\n                });\n            });\n        });\n        AE::cv-\u003erecv;\n\nMETHODS\n    connect()\n        Establish connection to database\n\n    selectrow_array( $query, [\\%args], $cb-\u003e( $rc, ... ))\n        Execute PG_ASYNC prepare, than push result of \"fetchrow_array\" into\n        callback\n\n    selectrow_arrayref( $query, [\\%args], $cb-\u003e( $rc, \\@row ))\n        Execute PG_ASYNC prepare, than push result of \"fetchrow_arrayref\"\n        into callback\n\n    selectrow_hashref( $query, [\\%args], $cb-\u003e( $rc, \\%row ))\n        Execute PG_ASYNC prepare, than push result of \"fetchrow_hashref\"\n        into callback\n\n    selectall_arrayref( $query, [\\%args], $cb-\u003e( $rc, \\@rows ))\n        Execute PG_ASYNC prepare, than push result of \"fetchall_arrayref\"\n        into callback\n\n    selectall_hashref( $query, [\\%args], $cb-\u003e( $rc, \\@rows ))\n        Execute PG_ASYNC prepare, than push result of \"fetchall_hashref\"\n        into callback\n\n    selectcol_arrayref( $query, { Columns =\u003e [...], ... }, $cb-\u003e( $rc,\n    \\@rows ))\n        Execute PG_ASYNC prepare, than push result of\n        \"fetchall_hashref($args{Columns})\" into callback\n\n    execute( $query, [\\%args], $cb-\u003e( $rc, $sth ))\n        Execute PG_ASYNC prepare, than invoke callback, pushing resulting\n        sth to it.\n\n        Please, note: result already passed as first argument\n\nAUTHOR\n    Mons Anderson, \"\u003cmons@cpan.org\u003e\"\n\nLICENSE AND COPYRIGHT\n    Copyright 2010 Mons Anderson.\n\n    This program is free software; you can redistribute it and/or modify it\n    under the terms of either: the GNU General Public License as published\n    by the Free Software Foundation; or the Artistic License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Fanyevent-dbd-pg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmons%2Fanyevent-dbd-pg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Fanyevent-dbd-pg/lists"}