Allow setting readonly mode in bookmarks (#707)

This commit is contained in:
Dan Sosedoff
2024-01-12 21:17:14 -06:00
committed by GitHub
parent e560f07de6
commit 408e23adb3
4 changed files with 40 additions and 16 deletions

View File

@@ -20,6 +20,7 @@ type Bookmark struct {
Database string // Database name
SSLMode string // Connection SSL mode
SSH *shared.SSHInfo // SSH tunnel config
ReadOnly bool // Enable read-only transaction mode
}
// SSHInfoIsEmpty returns true if ssh configuration is not provided
@@ -40,12 +41,13 @@ func (b Bookmark) ConvertToOptions() command.Options {
}
return command.Options{
URL: b.URL,
Host: b.Host,
Port: b.Port,
User: user,
Pass: pass,
DbName: b.Database,
SSLMode: b.SSLMode,
URL: b.URL,
Host: b.Host,
Port: b.Port,
User: user,
Pass: pass,
DbName: b.Database,
SSLMode: b.SSLMode,
ReadOnly: b.ReadOnly,
}
}