From fcabc18bbc1e2471c2b8e5a92c1181f0944f2ab5 Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Sat, 28 Jun 2025 17:23:39 -0300 Subject: [PATCH] add description to property --- simulator/generation/property.rs | 56 +++++++++++++++++--------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/simulator/generation/property.rs b/simulator/generation/property.rs index 221280054..b15e55da5 100644 --- a/simulator/generation/property.rs +++ b/simulator/generation/property.rs @@ -99,38 +99,40 @@ pub(crate) enum Property { predicate: Predicate, queries: Vec, }, - // Drop-Select is a property in which selecting from a dropped table - // should result in an error. - // The execution of the property is as follows - // DROP TABLE - // I_0 - // I_1 - // ... - // I_n - // SELECT * FROM WHERE -> Error - // The interactions in the middle has the following constraints; - // - There will be no errors in the middle interactions. - // - The table `t` will not be created, no table will be renamed to `t`. + /// Drop-Select is a property in which selecting from a dropped table + /// should result in an error. + /// The execution of the property is as follows + /// DROP TABLE + /// I_0 + /// I_1 + /// ... + /// I_n + /// SELECT * FROM WHERE -> Error + /// The interactions in the middle has the following constraints; + /// - There will be no errors in the middle interactions. + /// - The table `t` will not be created, no table will be renamed to `t`. DropSelect { table: String, queries: Vec, select: Select, }, - // Select-Select-Optimizer is a property in which we test the optimizer by - // running two equivalent select queries, one with `SELECT from ` - // and the other with `SELECT * from WHERE `. As highlighted by - // Rigger et al. in Non-Optimizing Reference Engine Construction(NoREC), SQLite - // tends to optimize `where` statements while keeping the result column expressions - // unoptimized. This property is used to test the optimizer. The property is successful - // if the two queries return the same number of rows. - SelectSelectOptimizer { - table: String, - predicate: Predicate, - }, - FsyncNoWait { - query: Query, - tables: Vec, - }, + /// Select-Select-Optimizer is a property in which we test the optimizer by + /// running two equivalent select queries, one with `SELECT from ` + /// and the other with `SELECT * from WHERE `. As highlighted by + /// Rigger et al. in Non-Optimizing Reference Engine Construction(NoREC), SQLite + /// tends to optimize `where` statements while keeping the result column expressions + /// unoptimized. This property is used to test the optimizer. The property is successful + /// if the two queries return the same number of rows. + SelectSelectOptimizer { table: String, predicate: Predicate }, + /// FsyncNoWait is a property which tests if we do not loose any data after not waiting for fsync. + /// + /// # Interactions + /// - Executes the `query` without waiting for fsync + /// - Drop all connections and Reopen the database + /// - Execute the `query` again + /// - Query tables to assert that the values were inserted + /// + FsyncNoWait { query: Query, tables: Vec }, } impl Property {