DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
|
An SQL object handling a single-byte value that represents the concept of boolean true
and false
.
More...
Public Member Functions | |
SqlBoolean (byte value) | |
Constructs a given boolean object with a defined byte value. More... | |
SqlBoolean (bool value) | |
Constructs an object from a runtime boolean object. More... | |
int IComparable. | CompareTo (object obj) |
void ISerializable. | GetData (SerializeData data) |
int | CompareTo (ISqlObject other) |
bool | IsComparableTo (ISqlObject other) |
Indicates if the given ISqlObject can be compared to this SqlBoolean. More... | |
override bool | Equals (object obj) |
bool | Equals (SqlBoolean other) |
SqlBoolean | Not () |
SqlBoolean | Or (SqlBoolean other) |
SqlBoolean | And (SqlBoolean other) |
SqlBoolean | XOr (SqlBoolean other) |
override int | GetHashCode () |
TypeCode IConvertible. | GetTypeCode () |
bool IConvertible. | ToBoolean (IFormatProvider provider) |
char IConvertible. | ToChar (IFormatProvider provider) |
sbyte IConvertible. | ToSByte (IFormatProvider provider) |
byte IConvertible. | ToByte (IFormatProvider provider) |
short IConvertible. | ToInt16 (IFormatProvider provider) |
ushort IConvertible. | ToUInt16 (IFormatProvider provider) |
int IConvertible. | ToInt32 (IFormatProvider provider) |
uint IConvertible. | ToUInt32 (IFormatProvider provider) |
long IConvertible. | ToInt64 (IFormatProvider provider) |
ulong IConvertible. | ToUInt64 (IFormatProvider provider) |
float IConvertible. | ToSingle (IFormatProvider provider) |
double IConvertible. | ToDouble (IFormatProvider provider) |
decimal IConvertible. | ToDecimal (IFormatProvider provider) |
DateTime IConvertible. | ToDateTime (IFormatProvider provider) |
string IConvertible. | ToString (IFormatProvider provider) |
object IConvertible. | ToType (Type conversionType, IFormatProvider provider) |
int | CompareTo (SqlBoolean other) |
override string | ToString () |
Static Public Member Functions | |
static SqlBoolean | operator== (SqlBoolean a, SqlBoolean b) |
Operates an equality check between the two SQL boolean objects. More... | |
static SqlBoolean | operator!= (SqlBoolean a, SqlBoolean b) |
Operates an inequality check between the two SQL booleans More... | |
static SqlBoolean | operator== (SqlBoolean a, ISqlObject b) |
static SqlBoolean | operator!= (SqlBoolean a, ISqlObject b) |
static SqlBoolean | operator& (SqlBoolean a, SqlBoolean b) |
static SqlBoolean | operator| (SqlBoolean a, SqlBoolean b) |
static SqlBoolean | operator^ (SqlBoolean a, SqlBoolean b) |
static SqlBoolean | operator! (SqlBoolean a) |
static implicit | operator bool (SqlBoolean value) |
Implicitly converts the SQL boolean object to a native boolean. More... | |
static implicit | operator SqlBoolean (bool value) |
Implicitly converts a given native boolean to the SQL object equivalent. More... | |
static SqlBoolean | Parse (string s) |
Parses the given string to extract a boolean value equivalent. More... | |
static bool | TryParse (string s, out SqlBoolean value) |
Attempts to parse a given string to an instance of SqlBoolean. More... | |
Static Public Attributes | |
static readonly SqlBoolean | True = new SqlBoolean(1) |
Represents the materialization of a true boolean. More... | |
static readonly SqlBoolean | False = new SqlBoolean(0) |
Represents the materialization of a false boolean. More... | |
static readonly SqlBoolean | Null = new SqlBoolean((byte?)null) |
Defines a null boolean. More... | |
Properties | |
bool | IsNull [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 | |
SqlBoolean (byte?value) | |
SqlBoolean (ObjectData data) | |
Private Attributes | |
readonly byte | value |
An SQL object handling a single-byte value that represents the concept of boolean true
and false
.
On a byte level, this object handles only 0
or 1
, that represents respectively the concepts of false
and true
.
Additionally, a boolean object can be represented as NULL
, when the state cannot be determined.
Definition at line 35 of file SqlBoolean.cs.
|
inline |
Constructs a given boolean object with a defined byte value.
value | The single byte representing the boolean. |
ArgumentOutOfRangeException | If the value specified is not equivalent to 0 or 1 . |
Definition at line 61 of file SqlBoolean.cs.
|
inline |
Constructs an object from a runtime boolean object.
value | The native boolean value that represents the object. |
Definition at line 74 of file SqlBoolean.cs.
|
inlineprivate |
Definition at line 78 of file SqlBoolean.cs.
|
inlineprivate |
Definition at line 83 of file SqlBoolean.cs.
|
inline |
Definition at line 207 of file SqlBoolean.cs.
|
inline |
Definition at line 89 of file SqlBoolean.cs.
|
inline |
Definition at line 102 of file SqlBoolean.cs.
|
inline |
Definition at line 314 of file SqlBoolean.cs.
|
inline |
Definition at line 162 of file SqlBoolean.cs.
|
inline |
Definition at line 173 of file SqlBoolean.cs.
|
inline |
Implements Deveel.Data.Serialization.ISerializable.
Definition at line 96 of file SqlBoolean.cs.
|
inline |
Definition at line 232 of file SqlBoolean.cs.
|
inline |
Definition at line 236 of file SqlBoolean.cs.
|
inline |
Indicates if the given ISqlObject can be compared to this SqlBoolean.
other | The other object to verifiy compatibility. |
Comparable objects are SqlBoolean, SqlNull or SqlNumber with a value equals to SqlNumber.One, SqlNumber.Zero or SqlNumber.Null.
true
if the given object can be compared to this boolean instance, or false
otherwise. Implements Deveel.Data.Sql.Objects.ISqlObject.
Definition at line 149 of file SqlBoolean.cs.
|
inline |
Definition at line 184 of file SqlBoolean.cs.
|
inlinestatic |
Implicitly converts the SQL boolean object to a native boolean.
value | The SQL boolean to convert. |
Definition at line 380 of file SqlBoolean.cs.
|
inlinestatic |
Implicitly converts a given native boolean to the SQL object equivalent.
value | The boolean value to convert. |
Definition at line 395 of file SqlBoolean.cs.
|
inlinestatic |
Definition at line 368 of file SqlBoolean.cs.
|
inlinestatic |
Operates an inequality check between the two SQL booleans
a | The left term of comparison. |
b | The right term of comparison. |
Definition at line 344 of file SqlBoolean.cs.
|
inlinestatic |
Definition at line 352 of file SqlBoolean.cs.
|
inlinestatic |
Definition at line 356 of file SqlBoolean.cs.
|
inlinestatic |
Operates an equality check between the two SQL boolean objects.
a | The left term of comparison. |
b | The right term of comparison. |
Definition at line 334 of file SqlBoolean.cs.
|
inlinestatic |
Definition at line 348 of file SqlBoolean.cs.
|
inlinestatic |
Definition at line 364 of file SqlBoolean.cs.
|
inlinestatic |
Definition at line 360 of file SqlBoolean.cs.
|
inline |
Definition at line 196 of file SqlBoolean.cs.
|
inlinestatic |
Parses the given string to extract a boolean value equivalent.
s | The string to parse. |
ArgumentNullException | If the string argument s is null or empty. |
FormatException | If the given string argument cannot be parsed to a valid SQL boolean. |
Definition at line 414 of file SqlBoolean.cs.
|
inline |
Definition at line 240 of file SqlBoolean.cs.
|
inline |
Definition at line 252 of file SqlBoolean.cs.
|
inline |
Definition at line 244 of file SqlBoolean.cs.
|
inline |
Definition at line 298 of file SqlBoolean.cs.
|
inline |
Definition at line 294 of file SqlBoolean.cs.
|
inline |
Definition at line 290 of file SqlBoolean.cs.
|
inline |
Definition at line 259 of file SqlBoolean.cs.
|
inline |
Definition at line 267 of file SqlBoolean.cs.
|
inline |
Definition at line 278 of file SqlBoolean.cs.
|
inline |
Definition at line 248 of file SqlBoolean.cs.
|
inline |
Definition at line 286 of file SqlBoolean.cs.
|
inline |
Definition at line 302 of file SqlBoolean.cs.
|
inline |
Definition at line 463 of file SqlBoolean.cs.
|
inline |
Definition at line 306 of file SqlBoolean.cs.
|
inline |
Definition at line 263 of file SqlBoolean.cs.
|
inline |
Definition at line 274 of file SqlBoolean.cs.
|
inline |
Definition at line 282 of file SqlBoolean.cs.
|
inlinestatic |
Attempts to parse a given string to an instance of SqlBoolean.
s | The string to parse. |
value | The output SqlBoolean that will be emitted if the given string represents a valid boolean. |
A valid SQL boolean is either a numeric value, expressed by 1
or 0
, or alternatively a string value expressed as true
or false
.
The case of the string is insensitive (as for general SQL syntax rule).
true
if the string passed is a valid SQL boolean and the value was set to a valid SqlBoolean, or false
otherwise. Definition at line 442 of file SqlBoolean.cs.
|
inline |
Definition at line 218 of file SqlBoolean.cs.
|
static |
Represents the materialization of a false
boolean.
Definition at line 46 of file SqlBoolean.cs.
|
static |
Defines a null
boolean.
Definition at line 51 of file SqlBoolean.cs.
|
static |
Represents the materialization of a true
boolean.
Definition at line 41 of file SqlBoolean.cs.
|
private |
Definition at line 36 of file SqlBoolean.cs.
|
get |
Definition at line 131 of file SqlBoolean.cs.