Skip to content

Instantly share code, notes, and snippets.

@ology
Created June 27, 2023 06:44
Show Gist options
  • Save ology/03d6442fd86ff69f481d1a2c959b5200 to your computer and use it in GitHub Desktop.
Save ology/03d6442fd86ff69f481d1a2c959b5200 to your computer and use it in GitHub Desktop.
Mojo::SQLite warning on insert, but it happens anyway?
sqlite> .schema
CREATE TABLE moog_matriarch (id integer primary key autoincrement, json text not null);
CREATE TABLE sqlite_sequence(name,seq);
sqlite> select * from moog_matriarch;
1|{"bottom":20,"control":"knob","group":"filter","is_default":0,"parameter":"cutoff","top":20000,"unit":"Hz","value":200}
my $id_from_db = $self->_sqlite->insert(
$self->model,
{
id => $id,
json => { json => \%args },
},
{ on_conflict => [ id => { id => \'"excluded"."id"' } ] }
)->last_insert_id;
[SQL::Abstract::_expand_insert_value] Warning: HASH ref as bind value in insert is not supported at /home/gene/perl5/perlbrew/perls/perl-5.32.1/lib/site_perl/5.32.1/Mojo/SQLite/Database.pm line 22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment