You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
schema="CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)",
36
36
connection_string="sqlite:////tmp/test.db",
37
37
dialect="sqlite",
38
-
semantics=Semantics.BAG, # or Semantics.SET
38
+
semantics="bag", # or Semantics.SET
39
39
)
40
40
print(result.verdict) # Verdict.EQ or Verdict.NEQ
41
41
```
42
42
43
-
### Supported Dialects
43
+
### Coverage Thresholds
44
44
45
-
-`sqlite` — full support
46
-
-`mysql` — supported via DBManager
47
-
-`postgres` — supported via DBManager
45
+
Control how many rows are generated per branch type. Set a threshold to `0` to skip that branch type entirely. Higher values generate more rows but improve coverage.
46
+
47
+
```python
48
+
result = instantiate_db(
49
+
sql="SELECT name FROM users WHERE age > 25",
50
+
schema="CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)",
51
+
connection_string="sqlite:////tmp/test.db",
52
+
dialect="sqlite",
53
+
atom_null=2, # Generate 2 rows where WHERE evaluates to NULL
54
+
atom_false=1, # Generate 1 row where WHERE is FALSE
55
+
project_null=1, # Generate 1 row where SELECT output is NULL
56
+
distinct_duplicate=1, # Generate 1 duplicate row for DISTINCT elimination
57
+
distinct_unique=1, # Generate 1 unique row for DISTINCT
58
+
)
59
+
```
60
+
61
+
| Parameter | Description | Default |
62
+
|-----------|-------------|---------|
63
+
|`atom_null`| Rows where a WHERE/ON predicate evaluates to NULL | 1 |
64
+
|`atom_false`| Rows where a WHERE/ON predicate is FALSE | 1 |
65
+
|`atom_dup`| Rows that trigger duplicate detection | 1 |
66
+
|`project_null`| Rows where a projected column is NULL | 1 |
67
+
|`distinct_duplicate`| Duplicate rows eliminated by DISTINCT | 1 |
68
+
|`distinct_unique`| Unique rows retained by DISTINCT | 1 |
69
+
|`max_iterations`| Max iterations for the symbolic engine | 10 |
0 commit comments