C# Class UserDefinedFunctions, J-SQL

Afficher le fichier Open project: jgcoding/J-SQL Class Usage Examples

Méthodes publiques

Свойство Type Description
jsUnixDate Regex
rxIncludedKey Regex
rxIsUUID Regex
rxJsonAll Regex
rxJsonAll_old Regex
rxJsonIndexDocument Regex
rxJsonMapIndex Regex
rxJsonMergeIndex Regex
rxJsonReduceIndex Regex
rxKey Regex
rxKeyInUrl Regex
rxParseArrayOfObjects Regex
rxSimpleNumericArray Regex
rxSimpleStringArray Regex
rxUrl Regex
rxUrlAncestry Regex
sc StringComparison

Méthodes publiques

Méthode Description
FormatColumnForJson ( String colName, String sdt, String alias, Boolean nullable ) : String
FormatColumnInput ( String colName, String sdt ) : String
JsonEscape ( String unescaped ) : String
JsonFormat ( SqlDataReader dr, Int32 colno ) : String

Converts an individual SqlDataReader row referenced by its column index integer into JSON

NewID ( List orows, List irows ) : Int32

returns the last ObjectID from the inner collection

SqlErrorMessage ( SqlException sqlex ) : String
StringifiedRows ( object row, SqlGuid &ItemID, SqlString &Json ) : void

Converts a result set returned from SQL Server into JSON formatted array of objects and values

StringifySqlColumn ( String colName, String sdt ) : String
TemplateJsonUrl ( String url ) : String

Each Group item represents a named capture group defined in the pattern. This function can be used to parse and re-assemble each url into a template used in indexing by replacing each Within each group the actual values captured by the pattern are collected. "Url" is the complete address of an Item in a parsed collection of JSON elements. "Node" represents each object or array within the hierarchy of the URL. "NodeKey" represents UUID for each object or array providing ownership and identifiable differences within a collection of the same. "itemKey" is the key in the key/value pair of any Json element.

Private Methods

Méthode Description
ConcatFormatColumns ( SqlString objName, SqlString cols, SqlString alias, SqlBoolean nullable ) : SqlString
FromJsUnixTime ( String jsunixdate ) : DateTime
FromUnixTime ( Double udt ) : DateTime
ParseJson ( JsonRow eroot, Int32 newID ) : List

Returns a list of strongly-typed row objects

ParseJson_experimental ( JsonRow eroot, Int32 newID ) : List

An experimental, work-in-progress effort to return a list of strongly-typed row objects more efficiently than the original ParseJson

ParsedRows ( Object row, Int32 &ParentID, Int32 &ObjectID, String &Node, String &itemKey, String &itemValue, String &itemType ) : void

The strongly typed row result object from a ToJsonTable call

SqlDecrypt ( string json, int strength ) : string
SqlEncrypt ( string json, int strength ) : byte[]
SqlStringifyRow ( String objName, String pKeyName, SqlGuid pKeyValue, String cols, String where, String misc ) : IEnumerable
SqlStringifyRow2 ( SqlGuid docid, SqlString query ) : IEnumerable
SqlStringifySet ( String objName, String criteria, String cols ) : SqlString
StringifyColumn ( String key, String value, String dt ) : String
ToJavaScriptDate ( DateTime dt ) : String
ToJsonTable ( String json ) : IEnumerable
ToUnixTime ( DateTime dt ) : Double
blockSqlInjection ( String query ) : String

Examines the columns to be included in the operation for key words utilized in SQL injection attacks.

blockSqlInjection ( String objName, String cols ) : String

Examines a fully qualified SQL object and the columns to be included in the operation for key words utilized in SQL injection attacks.

buildQueryString ( String objName, String criteria, String cols ) : StringBuilder

construct the core query header

rxContains ( String json, String value ) : Boolean
sqlErrorMessage ( SqlException sqlex ) : String

construct and manage sql server error messages

Method Details

FormatColumnForJson() public static méthode

public static FormatColumnForJson ( String colName, String sdt, String alias, Boolean nullable ) : String
colName String
sdt String
alias String
nullable Boolean
Résultat String

FormatColumnInput() public static méthode

public static FormatColumnInput ( String colName, String sdt ) : String
colName String
sdt String
Résultat String

JsonEscape() public static méthode

public static JsonEscape ( String unescaped ) : String
unescaped String
Résultat String

JsonFormat() public static méthode

Converts an individual SqlDataReader row referenced by its column index integer into JSON
public static JsonFormat ( SqlDataReader dr, Int32 colno ) : String
dr SqlDataReader SqlDataReader - the row returned from the SQL select operation
colno Int32 The column index used to look up the column meta-data
Résultat String

NewID() public static méthode

returns the last ObjectID from the inner collection
public static NewID ( List orows, List irows ) : Int32
orows List The collection of outer rows
irows List The collection of inner rows
Résultat Int32

SqlErrorMessage() public static méthode

public static SqlErrorMessage ( SqlException sqlex ) : String
sqlex SqlException
Résultat String

StringifiedRows() public static méthode

Converts a result set returned from SQL Server into JSON formatted array of objects and values
public static StringifiedRows ( object row, SqlGuid &ItemID, SqlString &Json ) : void
row object A SQL row return from any SQL Set-based operation
ItemID SqlGuid The unique identifier for the row. The row key.
Json SqlString The output result as a JSON formatted string
Résultat void

StringifySqlColumn() public static méthode

public static StringifySqlColumn ( String colName, String sdt ) : String
colName String
sdt String
Résultat String

TemplateJsonUrl() public static méthode

Each Group item represents a named capture group defined in the pattern. This function can be used to parse and re-assemble each url into a template used in indexing by replacing each Within each group the actual values captured by the pattern are collected. "Url" is the complete address of an Item in a parsed collection of JSON elements. "Node" represents each object or array within the hierarchy of the URL. "NodeKey" represents UUID for each object or array providing ownership and identifiable differences within a collection of the same. "itemKey" is the key in the key/value pair of any Json element.
public static TemplateJsonUrl ( String url ) : String
url String JsonUrl for a parsed Json element
Résultat String

Property Details

jsUnixDate public_oe static_oe property

public static Regex jsUnixDate
Résultat Regex

rxIncludedKey public_oe static_oe property

public static Regex rxIncludedKey
Résultat Regex

rxIsUUID public_oe static_oe property

public static Regex rxIsUUID
Résultat Regex

rxJsonAll public_oe static_oe property

public static Regex rxJsonAll
Résultat Regex

rxJsonAll_old public_oe static_oe property

public static Regex rxJsonAll_old
Résultat Regex

rxJsonIndexDocument public_oe static_oe property

public static Regex rxJsonIndexDocument
Résultat Regex

rxJsonMapIndex public_oe static_oe property

public static Regex rxJsonMapIndex
Résultat Regex

rxJsonMergeIndex public_oe static_oe property

public static Regex rxJsonMergeIndex
Résultat Regex

rxJsonReduceIndex public_oe static_oe property

public static Regex rxJsonReduceIndex
Résultat Regex

rxKey public_oe static_oe property

public static Regex rxKey
Résultat Regex

rxKeyInUrl public_oe static_oe property

public static Regex rxKeyInUrl
Résultat Regex

rxParseArrayOfObjects public_oe static_oe property

public static Regex rxParseArrayOfObjects
Résultat Regex

rxSimpleNumericArray public_oe static_oe property

public static Regex rxSimpleNumericArray
Résultat Regex

rxSimpleStringArray public_oe static_oe property

public static Regex rxSimpleStringArray
Résultat Regex

rxUrl public_oe static_oe property

public static Regex rxUrl
Résultat Regex

rxUrlAncestry public_oe static_oe property

public static Regex rxUrlAncestry
Résultat Regex

sc public_oe static_oe property

public static StringComparison sc
Résultat StringComparison