I have a SQLite table
createtablecars (
id integerprimary key,
name text,
data text);
Where data is a large clob and do not want to read it in every query. I have a class
publicclassCar{[Key]publiclongId{get;set;}publicstringName{get;set;}}And read a Car by the Dapper.Contrib query
It generates the SQL query
select*from cars where Id = @id
It's is not optimal, since the data column (large) is fetched too, and never used. I would expect the query
selectt.id, t.namefrom cars t where Id = @id
I.e specify the columns in the select clause. The GetAll() method should has to be changed, too. (IMHO no ORM should use select * in it's core functions.)
Note: the [Computed] columns has to be omitted, too. With [Computed] the Dapper.ContribGet query reads the column, but Update, Insert wont change the [Computed] column.
I have a SQLite table
Where
datais a large clob and do not want to read it in every query. I have a classAnd read a
Carby the Dapper.Contrib queryIt generates the SQL query
It's is not optimal, since the
datacolumn (large) is fetched too, and never used. I would expect the queryI.e specify the columns in the
selectclause. TheGetAll()method should has to be changed, too. (IMHO no ORM should useselect *in it's core functions.)Note: the
[Computed]columns has to be omitted, too. With[Computed]theDapper.ContribGetquery reads the column, but Update, Insert wont change the[Computed]column.