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

Static Public Member Functions

static SqlBoolean PatternMatch (this ISqlString pattern, string expression, char escapeChar)
 
static SqlString Substring (this ISqlString source, int offset)
 
static SqlString Substring (this ISqlString source, int offset, int count)
 
static SqlNumber IndexOf (this ISqlString pattern, SqlString expression)
 

Static Private Member Functions

static bool IsWildCard (char ch)
 

Private Attributes

const char ZeroOrMoreChars = '%'
 
const char OneChar = '_'
 

Detailed Description

Definition at line 21 of file SqlStringExtensions.cs.

Member Function Documentation

static SqlNumber Deveel.Data.Sql.Objects.SqlStringExtensions.IndexOf ( this ISqlString  pattern,
SqlString  expression 
)
inlinestatic

Definition at line 66 of file SqlStringExtensions.cs.

66  {
67  // TODO: Implement a version of the Boyer-Moore algorithm over a SQL String
68  throw new NotImplementedException();
69  }
static bool Deveel.Data.Sql.Objects.SqlStringExtensions.IsWildCard ( char  ch)
inlinestaticprivate

Definition at line 26 of file SqlStringExtensions.cs.

static SqlBoolean Deveel.Data.Sql.Objects.SqlStringExtensions.PatternMatch ( this ISqlString  pattern,
string  expression,
char  escapeChar 
)
inlinestatic

Definition at line 30 of file SqlStringExtensions.cs.

30  {
31  throw new NotImplementedException();
32  }
static SqlString Deveel.Data.Sql.Objects.SqlStringExtensions.Substring ( this ISqlString  source,
int  offset 
)
inlinestatic

Definition at line 34 of file SqlStringExtensions.cs.

34  {
35  return Substring(source, offset, (int)source.Length - offset);
36  }
static SqlString Substring(this ISqlString source, int offset)
static SqlString Deveel.Data.Sql.Objects.SqlStringExtensions.Substring ( this ISqlString  source,
int  offset,
int  count 
)
inlinestatic

Definition at line 38 of file SqlStringExtensions.cs.

38  {
39  if (source == null || source.IsNull)
40  return SqlString.Null;
41 
42  var en = source.GetEnumerator();
43  var sb = new StringBuilder(count);
44 
45  int index = -1;
46  while (en.MoveNext()) {
47  if (++index < offset)
48  continue;
49 
50  sb.Append(en.Current);
51 
52  if (index == count - 1)
53  break;
54  }
55 
56 #if PCL
57  var s = sb.ToString();
58  return new SqlString(s);
59 #else
60  var chars = new char[count];
61  sb.CopyTo(0, chars, 0, count);
62  return new SqlString(chars);
63 #endif
64  }
Deveel.Data.Sql.Objects.SqlString SqlString
Definition: DataObject.cs:27

Member Data Documentation

const char Deveel.Data.Sql.Objects.SqlStringExtensions.OneChar = '_'
private

Definition at line 24 of file SqlStringExtensions.cs.

const char Deveel.Data.Sql.Objects.SqlStringExtensions.ZeroOrMoreChars = '%'
private

Definition at line 23 of file SqlStringExtensions.cs.


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