1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2025-11-29 23:08:18 +02:00

Add support for storing queries

This commit is contained in:
Hubert depesz Lubaczewski
2020-07-27 15:16:43 +02:00
parent cbe239d9da
commit 55be9d33bf
7 changed files with 91 additions and 10 deletions

View File

@@ -215,12 +215,12 @@ sub update_plan {
sub save_with_random_name {
my $self = shift;
my ( $title, $content, $is_public, $is_anon, $username, $optimization_for ) = @_;
my ( $title, $content, $is_public, $is_anon, $username, $optimization_for, $query ) = @_;
my @row = $self->dbh->selectrow_array(
'SELECT id, delete_key FROM register_plan(?, ?, ?, ?, ?, ?)',
'SELECT id, delete_key FROM register_plan(?, ?, ?, ?, ?, ?, ?)',
undef,
$title, $content, $is_public, $is_anon, $username, $optimization_for,
$title, $content, $is_public, $is_anon, $username, $optimization_for, $query
);
# return id and delete_key