mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
17 lines
333 B
Go
17 lines
333 B
Go
package sqlite3
|
|
|
|
// Return true if stmt is an empty SQL statement.
|
|
// This is used as an optimization.
|
|
// It's OK to always return false here.
|
|
func emptyStatement(stmt string) bool {
|
|
for _, b := range []byte(stmt) {
|
|
switch b {
|
|
case ' ', '\n', '\r', '\t', '\v', '\f':
|
|
case ';':
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|