Skip to content

Commit

Permalink
Migrate net sqlite to System.Data.SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
javiertuya committed Jan 4, 2024
1 parent 90fa84b commit 31ec646
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion net/TdRules/Java.Sql/SqliteConnectionFactory.N.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ internal class SqliteConnectionFactory
{
public static DbConnection GetDbConnection(string url)
{
return new Microsoft.Data.Sqlite.SqliteConnection(url);
// Microsoft.Data.SQLite solo es soportado hasta v2.0.1
// Versiones superiores causan errores que indican qel DataReader esta cerrado
// al manejar resultsets
// return new Microsoft.Data.Sqlite.SqliteConnection(url);
return new System.Data.SQLite.SQLiteConnection(url);
}
}
}
4 changes: 2 additions & 2 deletions net/TdRules/TdRules.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down Expand Up @@ -43,7 +43,7 @@

<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />

<PackageReference Include="Microsoft.Data.SQLite" Version="2.0.1" />
<PackageReference Include="System.Data.SQLite" Version="1.0.118" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion setup/database.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ tdrules.netcore.tdstorerdb2.sqlite.url=Data Source=../../../../tdrules.db;
tdrules.netcore.tdstorerdb2.sqlite.user=

tdrules.netcore.tdstorerdb2.sqlite.meta.dbms=Database: SQLite - Version: 3.
tdrules.netcore.tdstorerdb2.sqlite.meta.driver=Driver: Microsoft.Data.Sqlite.SqliteConnection - Version: N/A
tdrules.netcore.tdstorerdb2.sqlite.meta.driver=Driver: System.Data.SQLite.SQLiteConnection - Version: N/A
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Metadata for Table: stypes1 Catalog: Schema:
Column: pkauto
DataType: integer DataSubType: CompositeType:
DataType: INTEGER DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: true Key: true Autoincrement: true DefaultValue:
Column: tinteger
DataType: integer DataSubType: CompositeType:
DataType: INTEGER DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: true Key: false Autoincrement: false DefaultValue:
Column: tint4
DataType: int DataSubType: CompositeType:
DataType: INT DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: tint8
Expand Down Expand Up @@ -52,7 +52,7 @@ Column: tbit
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: treal
DataType: real DataSubType: CompositeType:
DataType: REAL DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: tfloat
Expand Down Expand Up @@ -80,7 +80,7 @@ Column: tvarchar
ColSize: 16 DecimalDigits: 0 CharacterLike: true DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: ttext
DataType: text DataSubType: CompositeType:
DataType: TEXT DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: true DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: tdate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Metadata for Table: stypesvp Catalog: Schema:
View SQL: CREATE VIEW stypesvp (p1,p2,p3) as select tinteger,tint4,tcharacter from stypes1
Column: p1
DataType: integer DataSubType: CompositeType:
DataType: INTEGER DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: p2
DataType: int DataSubType: CompositeType:
DataType: INT DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: p3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ union all select tinteger,tint4,tcharacter from stypes1
union all select tinteger,tint4,tcharacter from stypes1
union all select tinteger,tint4,tcharacter from stypes1
Column: p1
DataType: integer DataSubType: CompositeType:
DataType: INTEGER DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: p2
DataType: int DataSubType: CompositeType:
DataType: INT DataSubType: CompositeType:
ColSize: 0 DecimalDigits: 0 CharacterLike: false DateTimeLike: false
NotNull: false Key: false Autoincrement: false DefaultValue:
Column: p3
Expand Down

0 comments on commit 31ec646

Please sign in to comment.