DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.Sql.Objects.SqlDayToSecond Struct Reference
Inheritance diagram for Deveel.Data.Sql.Objects.SqlDayToSecond:
Deveel.Data.Sql.Objects.ISqlObject

Public Member Functions

 SqlDayToSecond (int hours, int minutes, int seconds)
 
 SqlDayToSecond (int days, int hours, int minutes, int seconds)
 
 SqlDayToSecond (int days, int hours, int minutes, int seconds, int milliseconds)
 
int IComparable. CompareTo (object obj)
 
int IComparable< ISqlObject >. CompareTo (ISqlObject other)
 
bool ISqlObject. IsComparableTo (ISqlObject other)
 Checks if the current object is comparable with the given one. More...
 
int CompareTo (SqlDayToSecond other)
 
SqlDayToSecond Add (SqlDayToSecond interval)
 
SqlDayToSecond Subtract (SqlDayToSecond interval)
 
byte[] ToByArray ()
 
bool Equals (SqlDayToSecond other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Static Public Member Functions

static SqlDayToSecond operator+ (SqlDayToSecond a, SqlDayToSecond b)
 
static SqlDayToSecond operator- (SqlDayToSecond a, SqlDayToSecond b)
 
static bool operator== (SqlDayToSecond a, SqlDayToSecond b)
 
static bool operator!= (SqlDayToSecond a, SqlDayToSecond b)
 

Static Public Attributes

static readonly SqlDayToSecond Null = new SqlDayToSecond(true)
 
static readonly SqlDayToSecond Zero = new SqlDayToSecond(0, 0, 0, 0, 0)
 

Properties

bool IsNull [get]
 
double TotalMilliseconds [get]
 
int Days [get]
 
int Hours [get]
 
int Minutes [get]
 
int Seconds [get]
 
int Milliseconds [get]
 
- Properties inherited from Deveel.Data.Sql.Objects.ISqlObject
bool IsNull [get]
 Gets a boolean value indicating if the object is NULL. More...
 

Private Member Functions

 SqlDayToSecond (bool isNull)
 
void AssertNotNull ()
 

Private Attributes

readonly TimeSpan value
 

Detailed Description

Definition at line 20 of file SqlDayToSecond.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Objects.SqlDayToSecond.SqlDayToSecond ( bool  isNull)
inlineprivate

Definition at line 26 of file SqlDayToSecond.cs.

26  {
27  value = null;
28  }
Deveel.Data.Sql.Objects.SqlDayToSecond.SqlDayToSecond ( int  hours,
int  minutes,
int  seconds 
)
inline

Definition at line 30 of file SqlDayToSecond.cs.

31  : this(0, hours, minutes, seconds) {
32  }
Deveel.Data.Sql.Objects.SqlDayToSecond.SqlDayToSecond ( int  days,
int  hours,
int  minutes,
int  seconds 
)
inline

Definition at line 34 of file SqlDayToSecond.cs.

35  : this(days, hours, minutes, seconds, 0) {
36  }
Deveel.Data.Sql.Objects.SqlDayToSecond.SqlDayToSecond ( int  days,
int  hours,
int  minutes,
int  seconds,
int  milliseconds 
)
inline

Definition at line 38 of file SqlDayToSecond.cs.

38  {
39  value = new TimeSpan(days, hours, minutes, seconds, milliseconds);
40  }

Member Function Documentation

SqlDayToSecond Deveel.Data.Sql.Objects.SqlDayToSecond.Add ( SqlDayToSecond  interval)
inline

Definition at line 116 of file SqlDayToSecond.cs.

116  {
117  if (IsNull)
118  return interval;
119  if (interval.IsNull)
120  return this;
121 
122  var ts = new TimeSpan(interval.Days, interval.Hours, interval.Minutes, interval.Seconds, interval.Milliseconds);
123  var result = value.Value.Add(ts);
124  return new SqlDayToSecond(result.Days, result.Hours, result.Minutes, result.Seconds, result.Milliseconds);
125  }
void Deveel.Data.Sql.Objects.SqlDayToSecond.AssertNotNull ( )
inlineprivate

Definition at line 54 of file SqlDayToSecond.cs.

54  {
55  if (value == null)
56  throw new NullReferenceException();
57  }
int IComparable. Deveel.Data.Sql.Objects.SqlDayToSecond.CompareTo ( object  obj)
inline

Definition at line 42 of file SqlDayToSecond.cs.

42  {
43  return CompareTo((SqlDayToSecond) obj);
44  }
int IComparable. CompareTo(object obj)
int IComparable<ISqlObject>. Deveel.Data.Sql.Objects.SqlDayToSecond.CompareTo ( ISqlObject  other)
inline

Definition at line 46 of file SqlDayToSecond.cs.

46  {
47  return CompareTo((SqlDayToSecond) other);
48  }
int IComparable. CompareTo(object obj)
int Deveel.Data.Sql.Objects.SqlDayToSecond.CompareTo ( SqlDayToSecond  other)
inline

Definition at line 105 of file SqlDayToSecond.cs.

105  {
106  if (IsNull && other.IsNull)
107  return 0;
108  if (!IsNull && other.IsNull)
109  return -1;
110  if (IsNull && !other.IsNull)
111  return 1;
112 
113  return value.Value.CompareTo(other.value.Value);
114  }
bool Deveel.Data.Sql.Objects.SqlDayToSecond.Equals ( SqlDayToSecond  other)
inline

Definition at line 142 of file SqlDayToSecond.cs.

142  {
143  if (IsNull && other.IsNull)
144  return true;
145 
146  return value.Equals(other.value);
147  }
override bool Deveel.Data.Sql.Objects.SqlDayToSecond.Equals ( object  obj)
inline

Definition at line 149 of file SqlDayToSecond.cs.

149  {
150  return Equals((SqlDayToSecond) obj);
151  }
bool Equals(SqlDayToSecond other)
override int Deveel.Data.Sql.Objects.SqlDayToSecond.GetHashCode ( )
inline

Definition at line 153 of file SqlDayToSecond.cs.

153  {
154  return value == null ? 0 : value.Value.GetHashCode();
155  }
bool ISqlObject. Deveel.Data.Sql.Objects.SqlDayToSecond.IsComparableTo ( ISqlObject  other)
inline

Checks if the current object is comparable with the given one.

Parameters
otherThe other ISqlObject to compare.
Returns
Returns true if the current object is comparable with the given one, false otherwise.

Implements Deveel.Data.Sql.Objects.ISqlObject.

Definition at line 101 of file SqlDayToSecond.cs.

101  {
102  return other is SqlDayToSecond;
103  }
static bool Deveel.Data.Sql.Objects.SqlDayToSecond.operator!= ( SqlDayToSecond  a,
SqlDayToSecond  b 
)
inlinestatic

Definition at line 169 of file SqlDayToSecond.cs.

169  {
170  return !(a == b);
171  }
static SqlDayToSecond Deveel.Data.Sql.Objects.SqlDayToSecond.operator+ ( SqlDayToSecond  a,
SqlDayToSecond  b 
)
inlinestatic

Definition at line 157 of file SqlDayToSecond.cs.

157  {
158  return a.Add(b);
159  }
static SqlDayToSecond Deveel.Data.Sql.Objects.SqlDayToSecond.operator- ( SqlDayToSecond  a,
SqlDayToSecond  b 
)
inlinestatic

Definition at line 161 of file SqlDayToSecond.cs.

161  {
162  return a.Subtract(b);
163  }
static bool Deveel.Data.Sql.Objects.SqlDayToSecond.operator== ( SqlDayToSecond  a,
SqlDayToSecond  b 
)
inlinestatic

Definition at line 165 of file SqlDayToSecond.cs.

165  {
166  return a.Equals(b);
167  }
SqlDayToSecond Deveel.Data.Sql.Objects.SqlDayToSecond.Subtract ( SqlDayToSecond  interval)
inline

Definition at line 127 of file SqlDayToSecond.cs.

127  {
128  if (IsNull)
129  return interval;
130  if (interval.IsNull)
131  return this;
132 
133  var ts = new TimeSpan(interval.Days, interval.Hours, interval.Minutes, interval.Seconds, interval.Milliseconds);
134  var result = value.Value.Subtract(ts);
135  return new SqlDayToSecond(result.Days, result.Hours, result.Minutes, result.Seconds, result.Milliseconds);
136  }
byte [] Deveel.Data.Sql.Objects.SqlDayToSecond.ToByArray ( )
inline

Definition at line 138 of file SqlDayToSecond.cs.

138  {
139  throw new NotImplementedException();
140  }

Member Data Documentation

readonly SqlDayToSecond Deveel.Data.Sql.Objects.SqlDayToSecond.Null = new SqlDayToSecond(true)
static

Definition at line 23 of file SqlDayToSecond.cs.

readonly TimeSpan Deveel.Data.Sql.Objects.SqlDayToSecond.value
private

Definition at line 21 of file SqlDayToSecond.cs.

readonly SqlDayToSecond Deveel.Data.Sql.Objects.SqlDayToSecond.Zero = new SqlDayToSecond(0, 0, 0, 0, 0)
static

Definition at line 24 of file SqlDayToSecond.cs.

Property Documentation

int Deveel.Data.Sql.Objects.SqlDayToSecond.Days
get

Definition at line 66 of file SqlDayToSecond.cs.

int Deveel.Data.Sql.Objects.SqlDayToSecond.Hours
get

Definition at line 73 of file SqlDayToSecond.cs.

bool Deveel.Data.Sql.Objects.SqlDayToSecond.IsNull
get

Definition at line 50 of file SqlDayToSecond.cs.

int Deveel.Data.Sql.Objects.SqlDayToSecond.Milliseconds
get

Definition at line 94 of file SqlDayToSecond.cs.

int Deveel.Data.Sql.Objects.SqlDayToSecond.Minutes
get

Definition at line 80 of file SqlDayToSecond.cs.

int Deveel.Data.Sql.Objects.SqlDayToSecond.Seconds
get

Definition at line 87 of file SqlDayToSecond.cs.

double Deveel.Data.Sql.Objects.SqlDayToSecond.TotalMilliseconds
get

Definition at line 59 of file SqlDayToSecond.cs.


The documentation for this struct was generated from the following file: