예제 #1
0
 /// <summary>
 ///     Returns a Time parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Time(TimeSpan?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.TimeNull);
     }
     return(SQLiteDbParameterValue.TimeFactory(value));
 }
예제 #2
0
 /// <summary>
 ///     Returns a String parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue String(string value)
 {
     if (value == null)
     {
         return(SQLiteDbParameterValue.StringNull);
     }
     return(SQLiteDbParameterValue.StringFactory(value));
 }
예제 #3
0
 /// <summary>
 ///     Returns a StringFixedLength parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue StringFixedLength(string value)
 {
     if (value == null)
     {
         return(SQLiteDbParameterValue.StringFixedLengthNull);
     }
     return(SQLiteDbParameterValue.StringFixedLengthFactory(value));
 }
예제 #4
0
 /// <summary>
 ///     Returns a SByte parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue SByte(sbyte?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.SByteNull);
     }
     return(SQLiteDbParameterValue.SByteFactory(value.Value));
 }
예제 #5
0
 /// <summary>
 ///     Returns a Single parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Single(float?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.SingleNull);
     }
     return(SQLiteDbParameterValue.SingleFactory(value.Value));
 }
예제 #6
0
 /// <summary>
 ///     Returns a Int32 parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Int32(int?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.Int32Null);
     }
     return(SQLiteDbParameterValue.Int32Factory(value.Value));
 }
예제 #7
0
 /// <summary>
 ///     Returns a Int64 parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Int64(long?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.Int64Null);
     }
     return(SQLiteDbParameterValue.Int64Factory(value.Value));
 }
예제 #8
0
 /// <summary>
 ///     Returns a Guid parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Guid(Guid?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.GuidNull);
     }
     return(SQLiteDbParameterValue.GuidFactory(value.Value));
 }
예제 #9
0
 /// <summary>
 ///     Returns a Int16 parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Int16(short?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.Int16Null);
     }
     return(SQLiteDbParameterValue.Int16Factory(value.Value));
 }
예제 #10
0
 /// <summary>
 ///     Returns a Double parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Double(double?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.DoubleNull);
     }
     return(SQLiteDbParameterValue.DoubleFactory(value.Value));
 }
예제 #11
0
 /// <summary>
 ///     Returns a Decimal parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue Decimal(decimal?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.DecimalNull);
     }
     return(SQLiteDbParameterValue.DecimalFactory(value.Value));
 }
예제 #12
0
 /// <summary>
 ///     Returns a DateTimeOffset parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue DateTimeOffset(DateTimeOffset?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.DateTimeOffsetNull);
     }
     return(SQLiteDbParameterValue.DateTimeOffsetFactory(value.Value));
 }
예제 #13
0
 /// <summary>
 ///     Returns a DateTime2 parameter value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <returns>A <see cref="IDbParameterValue" />.</returns>
 public IDbParameterValue DateTime2(DateTime?value)
 {
     if (!value.HasValue)
     {
         return(SQLiteDbParameterValue.DateTime2Null);
     }
     return(SQLiteDbParameterValue.DateTime2Factory(value.Value));
 }
예제 #14
0
 private bool Equals(SQLiteDbParameterValue other)
 {
     return
         (_dbType.Equals(other._dbType) &&
          Equals(_value, other._value));
 }