ValidateMemoryLimit checks that a memory_limit string is a valid DuckDB size value.
(v string)
| 94 | |
| 95 | // ValidateMemoryLimit checks that a memory_limit string is a valid DuckDB size value. |
| 96 | func ValidateMemoryLimit(v string) bool { |
| 97 | return validMemoryLimit.MatchString(v) |
| 98 | } |
| 99 | |
| 100 | // ParseMemoryBytes parses a DuckDB memory size string (e.g., "4GB", "512MB", "1.5GB") into bytes. |
| 101 | // Supports both integer and fractional values. Returns 0 if the string is empty, invalid, or "0GB". |
no outgoing calls