sscop Namespace Reference

The schema used for all SS-Cop objects. More...


Data Structures

struct  AnalysisResult
 The table that stores the results each object analysed. More...
struct  ReservedKeyword
 The table of SQL Server reserved keywords. More...

Functions

void Analyse (sysname @schemaName, sysname @tableNameRule, sysname @columnNameRule, sysname @procedureNameRule, sysname @functionNameRule, sysname @parameterNameRule)
 Performs an analysis of the objects in the specified schema.
void AnalyseColumnNames (int @schemaId, sysname @ruleFunction)
 Analyses the names of columns from all tables in the specified schema.
void AnalyseFunctionNames (int @schemaId, sysname @ruleFunction)
 Analyses the names of user-defined functions in the specified schema.
void AnalyseIdentifier (sysname @identifier, sysname @rule, sysname @object, varchar @reason)
 Checks the identifier against the specified rule.
void AnalyseParameterNames (int @schemaId, sysname @ruleFunction)
 Analyses the names of parameters from all stored procedures in the specified schema.
void AnalyseProcedureNames (int @schemaId, sysname @ruleFunction)
 Analyses the names of stored procedures in the specified schema.
void AnalyseTableNames (int @schemaId, sysname @ruleFunction)
 Analyses the names of tables in the specified schema.
void AnalysisResult_Clear ()
 Clears the table of analysis results.
bit HasSpaces (sysname @identifier)
 Queries if the identifier has spaces in it.
bit IsCamelCase (sysname @identifier)
 Queries if the identifier conforms to the camelCase convention.
bit IsLowerCase (sysname @identifier)
 Queries if the identifier only has lower case letters.
bit IsPascalCase (sysname @identifier)
 Queries if the identifier conforms to the PascalCase convention.
bit IsReservedKeyword (sysname @identifier)
 Queries if the identifier is one of the SQL Server reserved keywords.
bit IsUpperCase (sysname @identifier)
 Queries if the identifier only has upper case letters.


Detailed Description

The schema used for all SS-Cop objects.

SS-Cop uses its own schema so that its objects will not conflict with your application.


Function Documentation

void sscop::Analyse ( sysname @  schemaName,
sysname @  tableNameRule,
sysname @  columnNameRule,
sysname @  procedureNameRule,
sysname @  functionNameRule,
sysname @  parameterNameRule 
)

Performs an analysis of the objects in the specified schema.

Parameters:
schemaName  The schema to analyse.
tableNameRule  The function for validating table names.
columnNameRule  The function for validating column names.
procedureNameRule  The function for validating procedure names.
functionNameRule  The function for validating function names.
parameterNameRule  The function for validating parameter names.

void sscop::AnalyseColumnNames ( int @  schemaId,
sysname @  ruleFunction 
)

Analyses the names of columns from all tables in the specified schema.

Parameters:
schemaId  The schema to analyse.
ruleFunction  The function for validating column names.

void sscop::AnalyseFunctionNames ( int @  schemaId,
sysname @  ruleFunction 
)

Analyses the names of user-defined functions in the specified schema.

Parameters:
schemaId  The schema to analyse.
ruleFunction  The function for validating function names.

void sscop::AnalyseIdentifier ( sysname @  identifier,
sysname @  rule,
sysname @  object,
varchar @  reason 
)

Checks the identifier against the specified rule.

Parameters:
identifier  The identifier to be checked.
rule  The function to invoke for the rule.
object  The full name of the object being checked.
reason  The reason to use when the check fails.

void sscop::AnalyseParameterNames ( int @  schemaId,
sysname @  ruleFunction 
)

Analyses the names of parameters from all stored procedures in the specified schema.

NB: Parameter names contain an addtional leading '@' character so we strip that here to allow the comparison functions to be identifier-type agnostic.

Parameters:
schemaId  The schema to analyse.
ruleFunction  The function for validating parameter names.

void sscop::AnalyseProcedureNames ( int @  schemaId,
sysname @  ruleFunction 
)

Analyses the names of stored procedures in the specified schema.

Parameters:
schemaId  The schema to analyse.
ruleFunction  The function for validating procedure names.

void sscop::AnalyseTableNames ( int @  schemaId,
sysname @  ruleFunction 
)

Analyses the names of tables in the specified schema.

Parameters:
schemaId  The schema to analyse.
ruleFunction  The function for validating table names.

void sscop::AnalysisResult_Clear (  ) 

Clears the table of analysis results.

bit sscop::HasSpaces ( sysname @  identifier  ) 

Queries if the identifier has spaces in it.

Parameters:
identifier  The identifier to validate.

bit sscop::IsCamelCase ( sysname @  identifier  ) 

Queries if the identifier conforms to the camelCase convention.

Parameters:
identifier  The identifier to validate.

bit sscop::IsLowerCase ( sysname @  identifier  ) 

Queries if the identifier only has lower case letters.

The identifier can also contain digits and underscores as word separators.

Parameters:
identifier  The identifier to validate.

bit sscop::IsPascalCase ( sysname @  identifier  ) 

Queries if the identifier conforms to the PascalCase convention.

Parameters:
identifier  The identifier to validate.

bit sscop::IsReservedKeyword ( sysname @  identifier  ) 

Queries if the identifier is one of the SQL Server reserved keywords.

Parameters:
identifier  The identifier to validate.

bit sscop::IsUpperCase ( sysname @  identifier  ) 

Queries if the identifier only has upper case letters.

The identifier can also contain digits and underscores as word separators.

Parameters:
identifier  The identifier to validate.


Generated on Thu Dec 8 18:57:50 2011 for SS-Cop by  doxygen 1.5.2