Skip to content

Commit e7f84e7

Browse files
authored
fix(aider): use replace to swap out the messages view (#1039)
We need to swap them becasue the wildcard seems to be avaluated at the view creation time. Signed-off-by: Jakub Sztandera <[email protected]>
1 parent e384565 commit e7f84e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)