|
@ -226,7 +226,7 @@ impl SqliteLayoutDB { |
|
|
pub fn add_merge_lower_bounds(&mut self, lower_bounds: Vec<MergeLowerBound>) -> Result<()> { |
|
|
pub fn add_merge_lower_bounds(&mut self, lower_bounds: Vec<MergeLowerBound>) -> Result<()> { |
|
|
let transaction = self.connection.transaction()?; |
|
|
let transaction = self.connection.transaction()?; |
|
|
for lower_bound in &lower_bounds { |
|
|
for lower_bound in &lower_bounds { |
|
|
transaction.execute("INSERT INTO merge_lower_bounds (left_layout_id, right_layout_id, axis, price) VALUES (?1, ?2, ?3, ?4) ON CONFLICT(left_layout_id, right_layout_id) DO UPDATE SET price = ?4", |
|
|
transaction.execute("INSERT INTO merge_lower_bounds (left_layout_id, right_layout_id, axis, price) VALUES (?1, ?2, ?3, ?4) ON CONFLICT(left_layout_id, right_layout_id, axis) DO UPDATE SET price = ?4", |
|
|
params![lower_bound.left_layout_id as u32, |
|
|
params![lower_bound.left_layout_id as u32, |
|
|
lower_bound.right_layout_id as u32, |
|
|
lower_bound.right_layout_id as u32, |
|
|
if lower_bound.y_axis {1u32} else {0u32}, |
|
|
if lower_bound.y_axis {1u32} else {0u32}, |
|
|