File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
SQLite.CodeFirst/Internal/Utility Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,20 @@ internal static class ConnectionStringParser
1717
1818 public static string GetDataSource ( string connectionString )
1919 {
20- // Check if the datasource token exists and return Null if it doesn't.
21- // This will allow connection strings with FullUri to work.
20+ // If the datasource token does not exists this is a FullUri connection string.
2221 IDictionary < string , string > strings = ParseConnectionString ( connectionString ) ;
2322 if ( strings . ContainsKey ( DataSourceToken ) )
2423 {
2524 var path = ExpandDataDirectory ( ParseConnectionString ( connectionString ) [ DataSourceToken ] ) ;
2625 // remove quotation mark if exists
27- path = path . Trim ( '"' ) ;
28- return path ;
26+ return path . Trim ( '"' ) ;
27+ }
28+ // TODO: Implement FullUri parsing.
29+ if ( connectionString . Contains ( ":memory:" ) )
30+ {
31+ return ":memory:" ;
2932 }
30- return null ;
33+ throw new NotSupportedException ( "FullUri format is currently only supported for :memory:." ) ;
3134 }
3235
3336 [ SuppressMessage ( "Microsoft.Globalization" , "CA1308:NormalizeStringsToUppercase" , Justification = "ToUppercase makes no sense." ) ]
You can’t perform that action at this time.
0 commit comments