-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
cc @bricelam |
rc, | ||
NativeMethods.sqlite3_errmsg(db)); | ||
} | ||
else if (SqliteVersion.Current >= "3.7.15") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful, the string "3.10" is less than "3.7". You may want to use the Version
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SqliteVersion (had) an implicit string conversion operator...too magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, too... C++
We should try to put all the switching based on version into its own component. I don't like it scattered throughout the code. |
{ | ||
public readonly static Version Current = new Version(NativeMethods.sqlite3_libversion()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Tis a silly class. I like the idea of putting a public static SQLITE_VERSION
field on NativeMethods
that gets initialized in the static constructor. SqliteConnection.ServerVersion
should be updated to use it. Then again, does the value even need to be cached?
4f846d4
to
15994be
Compare
return Strings.FormatSqliteNativeErrorStringMissing(rc); | ||
} | ||
|
||
internal static bool SqliteClose(IntPtr handle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the class is internal
, these might as well be public
.
|
15994be
to
f5bd589
Compare
Fallback to older sqlite3 calls when using older versions of sqlite3. Fallback to sqlite3_close when sqlite3_close_v2 is not available, e.g. older versions of OSX. Workaround for missing sqlite3_errstr in versions < 3.7.15 Add OSX to test matrix.
f5bd589
to
2ab86d4
Compare
SQLite 3.7.9 is the default library version on Travis Linux agents.
3.7.13 is the default version on aspnet-docker (Fix aspnet/aspnet-docker#85) and Travis OSX agents.
Fallback to older sqlite3 calls when using older versions of sqlite3.
sqlite3_close and sqlite3_errstr do not exist < 3.7.15
sqlite3_db_filename does not exist < 3.7.10
Add internal utilities for working with different sqlite versions and testing.
Add OSX and Mono alpha to test matrix.