Skip to content

Commit 112d435

Browse files
committed
fix(aider): use replace to swap out the messages view
We need to swap them becasue the wildcard seems to be avaluated at the view creation time. Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
1 parent e384565 commit 112d435

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

observer/observer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (o *Observer) createOrReplaceMessagesView(ctx context.Context, includeParqu
215215
if includeParquet {
216216
includeParquetFiles = fmt.Sprintf("UNION ALL SELECT * FROM '%s'", filepath.Join(o.rotatePath, "*.parquet"))
217217
}
218-
createView := fmt.Sprintf(`CREATE VIEW IF NOT EXISTS messages AS SELECT * FROM latest_messages %s`, includeParquetFiles)
218+
createView := fmt.Sprintf(`CREATE OR REPLACE VIEW messages AS SELECT * FROM latest_messages %s`, includeParquetFiles)
219219
_, err := o.db.ExecContext(ctx, createView)
220220
return err
221221

0 commit comments

Comments
 (0)