@@ -99,18 +99,18 @@ func GetSQLiteLibrary() string {
99
99
return sqliteLibrary
100
100
}
101
101
102
- // buildPragmaString builds the string of pragmas that should be appended to the filename
103
- // when connecting to a SQLite database. This is needed to set pragmas reliably since
104
- // pragmas must be set upon initially connecting to the database. The difficulty in
105
- // setting pragmas is that each SQLite library (mattn vs modernc) has a slighly different
106
- // format for setting pragmas. This takes the list of pragmas in SQLite query format (
107
- // PRAGMA busy_timeout = 5000) and translates them to the correct format for the SQLite
108
- // library in use.
109
- func buildPragmaString ( pragmas [] string ) (filenamePragmaString string ) {
102
+ // SQLitePragmasAsString builds the string of pragmas that should be appended to the
103
+ // filename when connecting to a SQLite database. This is needed to set pragmas reliably
104
+ // since pragmas must be set upon initially connecting to the database. The difficulty
105
+ // in setting pragmas is that each SQLite library (mattn vs modernc) has a slighly
106
+ // different format for setting pragmas. This takes the list of pragmas in SQLite query
107
+ // format ( PRAGMA busy_timeout = 5000) and translates them to the correct format for
108
+ // the SQLite library in use.
109
+ func ( cfg * Config ) SQLitePragmasAsString ( ) (filenamePragmaString string ) {
110
110
v := url.Values {}
111
111
112
- for _ , p := range pragmas {
113
- //Sanitize, make replace/stripping of "PRAGMA" keyword easier.
112
+ for _ , p := range cfg . SQLitePragmas {
113
+ //Sanitize, to make replace/stripping of "PRAGMA" keyword easier.
114
114
p = strings .ToLower (p )
115
115
116
116
//Strip out the PRAGMA keyword.
@@ -144,7 +144,7 @@ func buildPragmaString(pragmas []string) (filenamePragmaString string) {
144
144
//add
145
145
v .Add (key , value )
146
146
default :
147
- //this can never happen since we hardcode libraries.
147
+ //this can never happen since we hardcode the supported sqlite libraries.
148
148
}
149
149
}
150
150
0 commit comments