Skip to content

Commit ba2c485

Browse files
committed
Added Timespan
1 parent 6083ae4 commit ba2c485

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nuget/Sqlite_net.SourceGenerator/SQLiteFastColumnSetterGenerator.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,12 @@ static void GeneratePropertySetter(StringBuilder sb, PropertyInfo property)
299299
sb.AppendLine($" typedObj.{property.PropertyName} = new DateTime(SQLite3.ColumnInt64(stmt, index));");
300300
break;
301301

302-
case "Guid":
302+
case "TimeSpan":
303+
case "System.TimeSpan":
304+
sb.AppendLine ($" typedObj.{property.PropertyName} = new TimeSpan(SQLite3.ColumnInt64(stmt, index));");
305+
break;
306+
307+
case "Guid":
303308
case "System.Guid":
304309
sb.AppendLine($" var text = SQLite3.ColumnString(stmt, index);");
305310
sb.AppendLine($" typedObj.{property.PropertyName} = new Guid(text);");

0 commit comments

Comments
 (0)