This project is read-only.

Timestamp support...


We added support for TimeStamp datatype in DapperSQLinq (because that is what we are using).
As you know timestamp values cannot be uppdated or inserted in normal ways, because its generated inside the database.
So we are ignoring this column when updating and inserting into database.
We are not sure that we got all parts we have changed, but perhaps you get the point.


Inside these three sections:
<PatternContent Name="InsertParametersName" ConditionKeyMode="FieldsKeyTypeAll">

<PatternContent Name="InsertParametersValue" ConditionKeyMode="FieldsKeyTypeAll">

<PatternContent Name="PrimaryKeyParameters" ConditionKeyMode="FieldsKeyTypeAll">
We added this:
<Condition Key="TimestampType"></Condition>


Added a section for TimeStampType:
<Condition Key="TimestampType">
/// <summary>
/// [:FieldDescription:]
/// </summary>
[Display(Name = "[:FieldDescription:]")]
public [:FieldDotNetType:] [:FieldName:] { get; set; }


Inside this class:
public static class FieldKeyType
Added this:
public const string TimestampType = "TimestampType";
Please observe the spelling of the Defin(a/i)tions... (please check your spelling) :-)

Thanks again for a really good product...


salar2k wrote Aug 13, 2013 at 8:16 AM

It's not only the patterns that should change. The Generator.cs should change too.

in order to do so change the following things:

*- new type for PatternConditionKeyMode.FieldCondensedType
*- update DotNetSchemaDataInfo.DetermineColumnCondensedType method
*- update ConditionItem_AppliesToColumn in Generator.cs file
*- then in patterns use FieldCondensedType or FieldsCondensedTypeAll to specify the new type. It's conditions would be None, String, Integer, Decimal and Timestamp