generated from tpl/purs
Add type specifications to more purspgpp functions
This commit is contained in:
parent
1c770e8f20
commit
d98f1e3174
4
purspgpp
4
purspgpp
@ -62,11 +62,11 @@ my Str:D %types{Int:D} =
|
|||||||
2950 => 'UUID',
|
2950 => 'UUID',
|
||||||
;
|
;
|
||||||
|
|
||||||
sub process-module($conn, Str:D $segment) {
|
sub process-module(libpq::Connection:D $conn, Str:D $segment --> Str:D) {
|
||||||
S:g/'[query|' (.*?) '|]'/&process-query($conn, ~$0)/ given $segment;
|
S:g/'[query|' (.*?) '|]'/&process-query($conn, ~$0)/ given $segment;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub process-query($conn, Str:D $source) {
|
sub process-query(libpq::Connection:D $conn, Str:D $source --> Str:D) {
|
||||||
$conn.prepare('', $source);
|
$conn.prepare('', $source);
|
||||||
my $description = $conn.describe-prepared('');
|
my $description = $conn.describe-prepared('');
|
||||||
my &convert-types = { ($_.map({%types{$_}}), "Unit").flat.join(" × "); };
|
my &convert-types = { ($_.map({%types{$_}}), "Unit").flat.join(" × "); };
|
||||||
|
Loading…
Reference in New Issue
Block a user