Created
March 2, 2013 14:49
-
-
Save drKreso/5071340 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use DBIish; | |
| my $mdriver = 'Pg'; | |
| my $host = 'localhost'; | |
| my $port = 5432; | |
| my $database = 'inframe_dev'; | |
| my $test_user = 'postgres'; | |
| my $test_password = 'blabla'; | |
| my $drh = DBIish.install_driver($mdriver); | |
| my $drh_version = $drh.Version; | |
| say $drh_version; | |
| my $dbh = DBIish.connect($mdriver, :user($test_user), :password($test_password), | |
| :$host, :$port, :$database, | |
| RaiseError => 0, PrintError => 1, AutoCommit => 0 | |
| ); | |
| $dbh.PrintError = True; | |
| $dbh.RaiseError = False; | |
| $dbh.do("SELECT * from korisnici"); | |
| $dbh.disconnect(); | |
| ---------- | |
| ==> No such method 'execute' for invocant of type 'Nil' | |
| in method do at lib/DBDish/Pg.pm6:379 | |
| in block at baza.pl:21 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment