I am experimenting ...Dapper... on a pet project. I am using ...SQLite... to run all the tests and MySql for "production". However I am not sure how to best use Dapper to handle database agnostic situation....The particular problem I am having is with MyS...
I am working on a desktop application which uses SQLite to bulk insert tens of thousands of rows into a SQLite database. I would like help optimizing the bulk insert performance. It currently takes up to 50 seconds to insert 60 megs worth of data into the...
I have a nullable double column in my SQLite database....When reading from the database (for columns of type double) I would like to convert nulls into "double.NaN"....Currently dapper sets null values to 0, which I do not want....What are my options?...M...
I am using Mono, SQLite, Dapper & Dapper Extensions. I can read from the database but Insert is not working. I am using Mono Driver for sqlite. ...Error is not very informative, atleast to me. Any help will be much appreciated....Error: ...SQLite error
ne...
I'm using the Dapper micro ORM. I thought it could handle enumerables like this:...string sql = @"SELECT * FROM Events WHERE TimestampTicks <= @TimestampTicks AND TelemetryId = @TelemetryId ORDER BY TimestampTicks DESC LIMIT 1";
var events = _connection.Q...
I created a sample table on SQLite that has an Id column that is auto increment....CREATE TABLE "ESVLIntegration" ("Id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "ProcessId" TEXT NOT NULL , "UserId" INTEGER NOT NULL , "Status" TEXT NOT NULL ,...
I've got a simple table in my SQLite database:...CREATE TABLE ProductCategories
(
Id INTEGER PRIMARY KEY AUTOINCREMENT,
Name NVARCHAR(128) NOT NULL UNIQUE,
ImageUrl NVARCHAR(256),
ParentCategoryId INTEGER,
FOREIGN KEY (ParentCategoryId...
I want to create a thread but only if the subject is unique in that section. Then I want to get the row id of the thread. How do I write it safely? My thoughts were something like...connection.Query<long>(@"insert into thread(section, subject, body)
...
I am using dapper.net and sqlite. When I do this query only the first id is insert, the rest are ignored. How do I bulk insert?...insert or ignore into pair(key, value)
select @key, (select value from list where id in @id_list)
I am checking out v1.25 of Dapper with Sqlite via System.Data.Sqlite. If I run this query:...var rowCount = dbc.Query<int>("SELECT COUNT(*) AS RowCount FROM Data").Single();
...I get the following error: ...System.InvalidCastException: Specified cast is n...
Using SQLite, System.Data.SQLite and Dapper (in a Console Application; later Windows Service; high throughput); why "database is locked" is there anyway?...I even abstracted all calling to SQLite db in this method:...public static void LocalDbScope(Action...
I'm using Dapper to insert and get objects to/from SQLite: one object have a property of type DateTime (and DateTimeOffset) that I have to persist and retrieve with milliseconds precision. I can't find a way to correctly retrieve the value because Dapper ...
I'm attempting to use Dapper to interface to an existing database format that has a table with a duration encoded as ticks in a BIGINT column. How do I tell Dapper to map my POCO's ...TimeSpan...-typed property to ticks when inserting into and reading fr...
The Dapper ...documentation... states you can send off multiple queries at once and iterate over the results using the QueryMultiple method like so:...var sql = @"
select * from foo where id = @paramname
select * from bar where id = @paramname";
conn.Que...
I have an Sql database which contains a date field....I use Dapper to update the database as follows:...const string sql = "UPDATE AdminDb.Users " +
"SET IsLoggedOn = 1, LastLoggedOn = @LastLoggedOn " +
"WHERE Usernam...
i have two tables Table1 and Table2. Table1 have columns ID,stringIDs and Table2 Columns ID,data...i have created a trigger to delete rows based on table1.
it doesn't works if comma Seperated stringIDs
are more than one. it works if stringID...
In my ...c#... application, I would like to use ...SQLite... with ...Dapper... (on ...SqliteConnection...)....The problem with current ...nuget...System.Data.SQLite... version is that ...EntityFramework...-related dependencies are also loaded, but they a...
I have the following code:...Shared Sub ExecSQL(ByVal connection As SQLiteConnection, ByVal commandText As String, Optional ByVal param As Object = Nothing)
If connection Is Nothing Then
Throw New NullReferenceException("Connection required!")...