-
-
Save ology/03d6442fd86ff69f481d1a2c959b5200 to your computer and use it in GitHub Desktop.
Mojo::SQLite warning on insert, but it happens anyway?
This file contains 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
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} |
This file contains 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
my $id_from_db = $self->_sqlite->insert( | |
$self->model, | |
{ | |
id => $id, | |
json => { json => \%args }, | |
}, | |
{ on_conflict => [ id => { id => \'"excluded"."id"' } ] } | |
)->last_insert_id; |
This file contains 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
[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