DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Attributes | List of all members
Deveel.Data.Sql.Schemas.SchemaInfo Class Reference

Describes the properties of a schema in a database system. More...

Inheritance diagram for Deveel.Data.Sql.Schemas.SchemaInfo:
Deveel.Data.Sql.IObjectInfo

Public Member Functions

 SchemaInfo (string name, string type)
 Constructs the schema with the given name More...
 
int Compare (string s1, string s2)
 Compares two strngs given using the culture set in the schema. More...
 
int Compare (string s1, string s2, bool ignoreCase)
 Compares two strngs given using the culture set in the schema. More...
 

Properties

DbObjectType IObjectInfo. ObjectType [get]
 
ObjectName IObjectInfo. FullName [get]
 
string Name [get, private set]
 Gets the name of the schema. More...
 
string Type [get, private set]
 Gets the type of the schema that defines the kind of objects it can contains. More...
 
string Culture [get, set]
 Gets the culture that will be applied to string comparisons, when not explicitly defined by types. More...
 
- Properties inherited from Deveel.Data.Sql.IObjectInfo
DbObjectType ObjectType [get]
 
ObjectName FullName [get]
 

Private Attributes

CompareInfo comparer
 

Detailed Description

Describes the properties of a schema in a database system.

A schema is a collection of database objects (for example TABLE, VIEW, TYPE, TRIEGGER, etc.).

It is possible for a schema to specify additional metadata information, such as the culture that will be used by default to collate strings in comparisons.

It is not possible to define more than one schema with the same name in a database.

Definition at line 39 of file SchemaInfo.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Schemas.SchemaInfo.SchemaInfo ( string  name,
string  type 
)
inline

Constructs the schema with the given name

Parameters
nameThe name that identifies the schema.
typeThe type of the schema to create.

Definition at line 47 of file SchemaInfo.cs.

47  {
48  if (String.IsNullOrEmpty(name))
49  throw new ArgumentNullException("name");
50 
51  Name = name;
52  Type = type;
53  }
A long string in the system.
string Type
Gets the type of the schema that defines the kind of objects it can contains.
Definition: SchemaInfo.cs:73
string Name
Gets the name of the schema.
Definition: SchemaInfo.cs:67

Member Function Documentation

int Deveel.Data.Sql.Schemas.SchemaInfo.Compare ( string  s1,
string  s2 
)
inline

Compares two strngs given using the culture set in the schema.

Parameters
s1The first string to compare.
s2The second argument of the comparison.
Returns
Returns an integer value of 1 if the fist string is greather than the second, -1 if the second string is greather than the first one, or 0 if the two strings are equal.
See also
Compare(string, string, bool)

Definition at line 92 of file SchemaInfo.cs.

92  {
93  return Compare(s1, s2, false);
94  }
int Compare(string s1, string s2)
Compares two strngs given using the culture set in the schema.
Definition: SchemaInfo.cs:92
int Deveel.Data.Sql.Schemas.SchemaInfo.Compare ( string  s1,
string  s2,
bool  ignoreCase 
)
inline

Compares two strngs given using the culture set in the schema.

Parameters
s1The first string to compare.
s2The second argument of the comparison.
ignoreCaseIndicates whether to ignore the case of strings or not.

If the Culture metadata was not set in the schema, the two strings will be compared using the invariant culture.

Returns
Returns an integer value of 1 if the fist string is greather than the second, -1 if the second string is greather than the first one, or 0 if the two strings are equal.

Definition at line 111 of file SchemaInfo.cs.

111  {
112  var options = ignoreCase ? CompareOptions.OrdinalIgnoreCase : CompareOptions.Ordinal;
113 
114  if (String.IsNullOrEmpty(Culture))
115  return CultureInfo.InvariantCulture.CompareInfo.Compare(s1, s2, options);
116 
117  if (comparer == null)
118  comparer = new CultureInfo(Culture).CompareInfo;
119 
120  return comparer.Compare(s1, s2, options);
121  }
A long string in the system.
string Culture
Gets the culture that will be applied to string comparisons, when not explicitly defined by types...
Definition: SchemaInfo.cs:79

Member Data Documentation

CompareInfo Deveel.Data.Sql.Schemas.SchemaInfo.comparer
private

Definition at line 40 of file SchemaInfo.cs.

Property Documentation

string Deveel.Data.Sql.Schemas.SchemaInfo.Culture
getset

Gets the culture that will be applied to string comparisons, when not explicitly defined by types.

Definition at line 79 of file SchemaInfo.cs.

ObjectName IObjectInfo. Deveel.Data.Sql.Schemas.SchemaInfo.FullName
getprivate

Definition at line 60 of file SchemaInfo.cs.

string Deveel.Data.Sql.Schemas.SchemaInfo.Name
getprivate set

Gets the name of the schema.

Definition at line 67 of file SchemaInfo.cs.

DbObjectType IObjectInfo. Deveel.Data.Sql.Schemas.SchemaInfo.ObjectType
getprivate

Definition at line 55 of file SchemaInfo.cs.

string Deveel.Data.Sql.Schemas.SchemaInfo.Type
getprivate set

Gets the type of the schema that defines the kind of objects it can contains.

Definition at line 73 of file SchemaInfo.cs.


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