Strip quotes and any schema prefix so `"public"."user"` and `"user"` match.
(raw: string)
| 49 | |
| 50 | /** Strip quotes and any schema prefix so `"public"."user"` and `"user"` match. */ |
| 51 | function bareName(raw: string): string { |
| 52 | const unquoted = raw.replace(/"/g, '') |
| 53 | const parts = unquoted.split('.') |
| 54 | return (parts[parts.length - 1] ?? unquoted).toLowerCase() |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Split SQL into statements with their 1-based start line, respecting line |