From 8ca91e2411413f902eca52249bcdb46d854a48d7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 25 Oct 2024 22:02:44 +0300 Subject: [PATCH] dbutil: document fenced dialect filters --- dbutil/upgradetable.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dbutil/upgradetable.go b/dbutil/upgradetable.go index dbf0143..9bfba20 100644 --- a/dbutil/upgradetable.go +++ b/dbutil/upgradetable.go @@ -131,6 +131,13 @@ func parseFileHeader(file []byte) (from, to, compat int, message string, txn Txn // // -- only: sqlite for next 123 lines // +// To limit a block of code, fenced by another directive: +// +// -- only: sqlite until "end only" +// QUERY; +// ANOTHER QUERY; +// -- end only sqlite +// // If the single-line limit is on the second line of the file, the whole file is limited to that dialect. // // If the filter ends with `(lines commented)`, then ALL lines chosen by the filter will be uncommented.