mirror of
https://github.com/Syfaro/fuzzysearch.git
synced 2024-12-24 14:25:35 +00:00
Insert as cube.
This commit is contained in:
parent
6273f3d0b3
commit
10dc909114
@ -73,7 +73,7 @@ fn insert_submission(
|
||||
let hash = sub.hash.clone();
|
||||
let url = sub.content.url();
|
||||
|
||||
client.execute("INSERT INTO submission (id, artist_id, url, filename, hash, rating, posted_at, description, c) VALUES ($1, $2, $3, $4, decode($5, 'base64'), $6, $7, $8, ARRAY[get_byte(decode($5, 'base64'), 0), get_byte(decode($5, 'base64'), 1), get_byte(decode($5, 'base64'), 2), get_byte(decode($5, 'base64'), 3), get_byte(decode($5, 'base64'), 4), get_byte(decode($5, 'base64'), 5), get_byte(decode($5, 'base64'), 6), get_byte(decode($5, 'base64'), 7)]::smallint[])", &[
|
||||
client.execute("INSERT INTO submission (id, artist_id, url, filename, hash, rating, posted_at, description, c) VALUES ($1, $2, $3, $4, decode($5, 'base64'), $6, $7, $8, CUBE(ARRAY[get_byte(decode($5, 'base64'), 0), get_byte(decode($5, 'base64'), 1), get_byte(decode($5, 'base64'), 2), get_byte(decode($5, 'base64'), 3), get_byte(decode($5, 'base64'), 4), get_byte(decode($5, 'base64'), 5), get_byte(decode($5, 'base64'), 6), get_byte(decode($5, 'base64'), 7)]::smallint[]))", &[
|
||||
&sub.id, &artist_id, &url, &sub.filename, &hash, &sub.rating.serialize(), &sub.posted_at, &sub.description,
|
||||
])?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user