aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/sqlite3.go b/sqlite3.go
index d1ff406..552a2ab 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -2007,6 +2007,13 @@ func (s *SQLiteStmt) execSync(args []namedValue) (driver.Result, error) {
return &SQLiteResult{id: int64(rowid), changes: int64(changes)}, nil
}
+// Readonly reports if this statement is considered readonly by SQLite.
+//
+// See: https://sqlite.org/c3ref/stmt_readonly.html
+func (s *SQLiteStmt) Readonly() bool {
+ return C.sqlite3_stmt_readonly(s.s) == 1
+}
+
// Close the rows.
func (rc *SQLiteRows) Close() error {
rc.s.mu.Lock()