public static string GetJetColtyp(EsentColtyp coltyp) { switch (coltyp) { case EsentColtyp.Byte: return("JET_coltyp.UnsignedByte"); case EsentColtyp.Boolean: return("JET_coltyp.Bit"); case EsentColtyp.SignedInt16: return("JET_coltyp.Short"); case EsentColtyp.UnsignedInt16: return("VistaColtyp.UnsignedShort"); case EsentColtyp.SignedInt32: return("JET_coltyp.Long"); case EsentColtyp.UnsignedInt32: return("VistaColtyp.UnsignedLong"); case EsentColtyp.SignedInt64: return("JET_coltyp.Currency"); case EsentColtyp.UnsignedInt64: return("Windows10Coltyp.UnsignedLongLong"); case EsentColtyp.Float: return("JET_coltyp.IEEESingle"); case EsentColtyp.Double: return("JET_coltyp.IEEEDouble"); case EsentColtyp.DateTime: return("JET_coltyp.DateTime"); case EsentColtyp.Binary: return("JET_coltyp.Binary"); case EsentColtyp.Text: return("JET_coltyp.Text"); case EsentColtyp.LongBinary: return("JET_coltyp.LongBinary"); case EsentColtyp.LongText: return("JET_coltyp.LongText"); case EsentColtyp.Guid: return("VistaColtyp.GUID"); default: throw new ArgumentException($"Unknown coltyp {coltyp}"); } }
public static string GetNetType(EsentColtyp coltyp, bool nullable) { switch (coltyp) { case EsentColtyp.Byte: return(nullable ? "byte?" : "byte"); case EsentColtyp.Boolean: return(nullable ? "bool?" : "bool"); case EsentColtyp.SignedInt16: return(nullable ? "short?" : "short"); case EsentColtyp.UnsignedInt16: return(nullable ? "ushort?" : "ushort"); case EsentColtyp.SignedInt32: return(nullable ? "int?" : "int"); case EsentColtyp.UnsignedInt32: return(nullable ? "uint?" : "uint"); case EsentColtyp.SignedInt64: return(nullable ? "long?" : "long"); case EsentColtyp.UnsignedInt64: return(nullable ? "ulong?" : "ulong"); case EsentColtyp.Float: return(nullable ? "float?" : "float"); case EsentColtyp.Double: return(nullable ? "double?" : "double"); case EsentColtyp.DateTime: return(nullable ? "DateTime?" : "DateTime"); case EsentColtyp.LongBinary: case EsentColtyp.Binary: return("byte[]"); case EsentColtyp.LongText: case EsentColtyp.Text: return("string"); case EsentColtyp.Guid: return(nullable ? "Guid?" : "Guid"); default: throw new ArgumentException($"Unknown coltyp {coltyp}"); } }
public static string GetColumnValueType(EsentColtyp coltyp) { switch (coltyp) { case EsentColtyp.Byte: return("ByteColumnValue"); case EsentColtyp.Boolean: return("BoolColumnValue"); case EsentColtyp.SignedInt16: return("Int16ColumnValue"); case EsentColtyp.UnsignedInt16: return("UInt16ColumnValue"); case EsentColtyp.SignedInt32: return("Int32ColumnValue"); case EsentColtyp.UnsignedInt32: return("UInt32ColumnValue"); case EsentColtyp.SignedInt64: return("Int64ColumnValue"); case EsentColtyp.UnsignedInt64: return("UInt64ColumnValue"); case EsentColtyp.Float: return("FloatColumnValue"); case EsentColtyp.Double: return("DoubleColumnValue"); case EsentColtyp.DateTime: return("DateTimeColumnValue"); case EsentColtyp.Binary: case EsentColtyp.LongBinary: return("BytesColumnValue"); case EsentColtyp.Text: case EsentColtyp.LongText: return("StringColumnValue"); case EsentColtyp.Guid: return("GuidColumnValue"); default: throw new ArgumentException($"Unknown coltyp {coltyp}"); } }
public static string GetRetrieveFuncName(EsentColtyp coltyp) { switch (coltyp) { case EsentColtyp.Byte: return("Api.RetrieveColumnAsByte"); case EsentColtyp.Boolean: return("Api.RetrieveColumnAsBoolean"); case EsentColtyp.SignedInt16: return("Api.RetrieveColumnAsInt16"); case EsentColtyp.UnsignedInt16: return("Api.RetrieveColumnAsUInt16"); case EsentColtyp.SignedInt32: return("Api.RetrieveColumnAsInt32"); case EsentColtyp.UnsignedInt32: return("Api.RetrieveColumnAsUInt32"); case EsentColtyp.SignedInt64: return("Api.RetrieveColumnAsInt64"); case EsentColtyp.UnsignedInt64: return("Api.RetrieveColumnAsUInt64"); case EsentColtyp.Float: return("Api.RetrieveColumnAsFloat"); case EsentColtyp.Double: return("Api.RetrieveColumnAsDouble"); case EsentColtyp.DateTime: return("Api.RetrieveColumnAsDateTime"); case EsentColtyp.Binary: case EsentColtyp.LongBinary: return("Api.RetrieveColumn"); case EsentColtyp.Text: case EsentColtyp.LongText: return("Api.RetrieveColumnAsString"); case EsentColtyp.Guid: return("Api.RetrieveColumnAsGuid"); default: throw new ArgumentException($"Unknown coltyp {coltyp}"); } }