roto-rooter 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,6 +43,15 @@ rr --check drizzle
43
43
 
44
44
  # Drizzle checking with explicit schema path
45
45
  rr --check drizzle --drizzle-schema src/db/schema.ts
46
+
47
+ # Extract SQL queries from Drizzle ORM code
48
+ rr sql --drizzle
49
+
50
+ # Extract queries from a specific file
51
+ rr sql --drizzle app/routes/users.tsx
52
+
53
+ # SQL output as JSON
54
+ rr sql --drizzle --format json
46
55
  ```
47
56
 
48
57
  ## Checks
@@ -74,6 +83,19 @@ rr --check drizzle --drizzle-schema src/db/schema.ts
74
83
  - Type mismatches (e.g., string from `formData.get()` to integer column)
75
84
  - Enum columns receiving unvalidated external input
76
85
 
86
+ ## SQL Query Extraction
87
+
88
+ The `rr sql` command extracts database queries from ORM code and generates equivalent SQL statements.
89
+
90
+ ```bash
91
+ rr sql --drizzle # extract all SQL queries
92
+ rr sql --drizzle app/routes/users.tsx # extract from specific file
93
+ rr sql --drizzle --format json # JSON output
94
+ rr sql --drizzle --drizzle-schema db/schema.ts # explicit schema path
95
+ ```
96
+
97
+ Supports SELECT, INSERT, UPDATE, and DELETE patterns with parameterized queries and column type inference from the schema.
98
+
77
99
  ## Programmatic API
78
100
 
79
101
  ```typescript