Class QuerySource
Represents query source code with pre-processed pragmas
Inheritance
System.Object
QuerySource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
public sealed class QuerySource : INamed
Examples
#pragma
modify=tbl_patient
key=counter,ssn
ignore=doctor_phone,doctor_id
load=
store=
@last_name=lname
@first_name=fname
.doctor_id=This is description for column
select
t1.ssn,
t1.lname as last_name,
t1.fname as first_name,
t1.c_doctor,
t2.phone as doctor_phone,
t2.NPI as doctor_id
from
tbl_patient t1
left outer join tbl_doctor t2 on t1.c_doctor = t2.counter
where
t1.lname like ?LN
Constructors
QuerySource(String, String)
Declaration
public QuerySource(string name, string source)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
source |
|
Fields
COLUMN_ALIAS_PREFIX
Declaration
public const string COLUMN_ALIAS_PREFIX = "@"
Field Value
Type |
Description |
System.String |
|
COLUMN_DESCRIPTION_PREFIX
Declaration
public const string COLUMN_DESCRIPTION_PREFIX = "."
Field Value
Type |
Description |
System.String |
|
COLUMN_IGNORE_SECTION
Declaration
public const string COLUMN_IGNORE_SECTION = "ignore"
Field Value
Type |
Description |
System.String |
|
COLUMN_INVISIBLE_SECTION
Declaration
public const string COLUMN_INVISIBLE_SECTION = "invisible"
Field Value
Type |
Description |
System.String |
|
COLUMN_KEY_SECTION
Declaration
public const string COLUMN_KEY_SECTION = "key"
Field Value
Type |
Description |
System.String |
|
COLUMN_LOAD_SECTION
Declaration
public const string COLUMN_LOAD_SECTION = "load"
Field Value
Type |
Description |
System.String |
|
COLUMN_REQUIRED_SECTION
Declaration
public const string COLUMN_REQUIRED_SECTION = "required"
Field Value
Type |
Description |
System.String |
|
COLUMN_STORE_SECTION
Declaration
public const string COLUMN_STORE_SECTION = "store"
Field Value
Type |
Description |
System.String |
|
PRAGMA
Declaration
public const string PRAGMA = "#pragma"
Field Value
Type |
Description |
System.String |
|
TABLE_MODIFY_SECTION
Declaration
public const string TABLE_MODIFY_SECTION = "modify"
Field Value
Type |
Description |
System.String |
|
Properties
ColumnDefs
Returns column definitions defined by #pragma
Declaration
public IRegistry<QuerySource.ColumnDef> ColumnDefs { get; }
Property Value
HasPragma
Returns true when #pragma was defined in source
Declaration
public bool HasPragma { get; }
Property Value
Type |
Description |
System.Boolean |
|
ModifyTarget
Returns modification target (table name to insert/update/delete against) if query is not read-only
Declaration
public string ModifyTarget { get; }
Property Value
Type |
Description |
System.String |
|
Name
Rerurns name of query source
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
OriginalSource
Returns original source of query including pragma text (if any)
Declaration
public string OriginalSource { get; }
Property Value
Type |
Description |
System.String |
|
ReadOnly
Returns true when pragma does not specify any modification target (table name to insert/update/delete against)
Declaration
public bool ReadOnly { get; }
Property Value
Type |
Description |
System.Boolean |
|
StatementSource
Returns source of query excluding pragma text (if any was present in the original)
Declaration
public string StatementSource { get; }
Property Value
Type |
Description |
System.String |
|
Implements
Extension Methods