Skip to content

Commit

Permalink
Enable support for SQlite databases with ts5 enabled (#999)
Browse files Browse the repository at this point in the history
fixes #983
  • Loading branch information
ErikEJ authored Oct 27, 2024
1 parent cca358e commit b1d43a5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/API/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

[assembly:ComVisible(false)]
[assembly: AssemblyVersion("3.5.2.15")]
[assembly: AssemblyFileVersion("3.5.2.98")]
[assembly: AssemblyInformationalVersion("3.5.2.98")]
[assembly: AssemblyFileVersion("3.5.2.99")]
[assembly: AssemblyInformationalVersion("3.5.2.99")]
13 changes: 11 additions & 2 deletions src/API/SQLiteScripting/Repositories/SQLiteRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

namespace ErikEJ.SQLiteScripting
{
//SSMS extnsion uses sqlite-netFx46-static-binary-bundle-Win32-2013-1.0.116.0.zip still, all others use NuGet package

//SSMS extension uses sqlite-netFx46-static-binary-bundle-Win32-2013-1.0.116.0.zip still, all others use NuGet package
public class SQLiteRepository : IRepository
{
private SQLiteConnection _cn;
Expand All @@ -23,7 +23,16 @@ public class SQLiteRepository : IRepository
public SQLiteRepository(string connectionString)
{
_cn = new SQLiteConnection(connectionString);

_cn.Open();

var dllFullFileName = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "x64", "SQLite.Interop.dll");
if (File.Exists(dllFullFileName))
{
_cn.EnableExtensions(true);
_cn.LoadExtension(dllFullFileName, "sqlite3_fts5_init");
}

_cmd = new SQLiteCommand();
_cmd.Connection = _cn;
}
Expand Down
Binary file modified src/GUI/lib/ISqlCeScripting.dll
Binary file not shown.
Binary file modified src/GUI/lib/SQLiteScripting.dll
Binary file not shown.
Binary file modified src/GUI/lib/SqlCeScripting.dll
Binary file not shown.
Binary file modified src/GUI/lib/SqlCeScripting40.dll
Binary file not shown.

0 comments on commit b1d43a5

Please sign in to comment.