-
Notifications
You must be signed in to change notification settings - Fork 20
API Reference
#API Reference
Represents a column in a table.
Property | Description |
---|---|
Name | Gets the name. |
DataTypes | Gets the data types. R |
IsIdentity | Gets or sets a value indicating whether this instance is an identity column. Returns: true if this instance is an identity column; otherwise, false . |
IsNullable | Gets or sets a value indicating whether this instance is nullable. Returns: true if this instance is nullable; otherwise, false . |
Precision | Gets or sets the precision. |
Scale | Gets or sets the scale. |
Length | Gets or sets the length. |
Represents a table in the model.
Property | Description |
---|---|
Name | Gets the name of the table. |
Columns | Gets the columns. |
Represents a column in a SELECT statement in a stored procedure.
Property | Description |
---|---|
Name | Gets the name or alias. |
DataTypes | Gets the data types. |
Helps map a data type to similar datatypes in different environments.
Converts the specified source data type into the specified destination data type.
Name | Description |
---|---|
sourceDataType: | The source data type. For example bigint . |
sourceFormat: | The format of the the sourceDataType parameter. |
destinationFormat: | The format to convert the sourceDataType parameter to. |
Returns: The converted data type. |
Gets a single data type dictionary with values for each TypeFormat by finding the specified entry in the list of data type dictionaries.
Name | Description |
---|---|
lookupFormat: | The TypeFormat of the lookupValue parameter. |
lookupValue: | The value to identify the dictionary to return. |
Returns: The first data type dictionary that contains the specified TypeFormat and value. |
Enum of the different types of datatypes available.
Name | Description |
---|---|
TypeFormat.SqlServerDbType | The SQL server database type. Ex: "bigint" |
TypeFormat.DotNetFrameworkType | The dot net framework type. Ex: "Int64?" |
TypeFormat.SqlDbTypeEnum | The SqlDbTypeEnum type. Ex: "BigInt" |
TypeFormat.SqlDataReaderSqlType | The SQL data reader SQL type. Ex: "GetSqlInt64" |
TypeFormat.DbTypeEnum | The database type enum. Ex: "Int64" |
TypeFormat.SqlDataReaderDbType | The SQL data reader database type. Ex: "GetInt64" |
Represents a parameter of a stored procedure.
Property | Description |
---|---|
Name | Gets the name. Returns: The name. |
DataTypes | Gets the data types for this parameter. Returns: The data types. |
IsOutput | Gets a value indicating whether this instance is an output parameter. Returns: true if this instance is an output parameter; otherwise, false . |
Represents a stored procedures
Property | Description |
---|---|
Name | Gets the name used for methods. Returns: The name. |
RawName | Gets the raw name of the stored procedure. Returns: The stored procedure name verbatim. |
Prefix | Gets the prefix. Returns: The prefix. |
Parameters | Gets the parameters. Returns: The parameters. |
Selects | Gets the selects. Returns: The selects. |
Creates a model from the specified sql files.
Initializes a new instance of the class.
Name | Description |
---|---|
sqlPaths: | The paths to the *.sql files. |
Creates a new TSqlModel, loads all *.sql files specified in the SqlPaths property into the new model, and then parses the model.
System.InvalidOperationException: No path to *.sql files exists in SqlPaths properties.
Creates a new TSqlModel, loads each specified sql statement into the new model, and then parses the model
Name | Description |
---|---|
sqlStatements: | One or more sql statements to load, such as CREATE TABLE or CREATE PROCEDURE statements. |
Property | Description |
---|---|
ProcedurePrefix | Gets or sets the prefix to strip off the procedure name when generating the method name. Returns: The procedure prefix. |
SqlPaths | List of directories where *.sql exist that should be added to the model. Returns: The SQL paths. |
Procedures | Objects representing the meta data parsed from stored procedures in the model. Returns: The procedures. |
Tables | Objects representing the meta data parsed from the tables in the model. Returns: The tables. |
Represents a SELECT statement in a stored procedure.
Property | Description |
---|---|
Columns | Gets the columns. Returns: The columns. |
IsTopOne | Gets a value indicating whether this instance uses a TOP 1 clause. Returns: true if this instance uses a TOP 1 clause; otherwise, false . |
TableAliases | Gets the table aliases. |
Helper class to handle some of the more complex code generation.
Scrubs the outputNamespace parameter to ensure it is not null.
Name | Description |
---|---|
outputNameSpace: | The outputNameSpace T4 parameter. |
Returns: The value of outputNameSpace if not null. |
System.ArgumentNullException: outputNamespace cannot be null.
Scrubs the connectionStringVariableName parameter to ensure it is not null.
Name | Description |
---|---|
connectionStringVariableName: | The connectionStringVariableName T4 parameter. |
Returns: The value of connectionStringVariableName if not null. |
System.ArgumentNullException: connectionStringVariableName cannot be null.
Gets the DTO return objects that represent a row of each result set of each procedure.
Name | Description |
---|---|
proc: | The procedure to generate the DTO from. |
indent: | The number of tabs to indent the generated code. |
Returns: The generated DTO objects. |
Gets the type of object the procedure's function will return.
Name | Description |
---|---|
proc: | The procedure to get the return type for. |
Returns: The generated return type. |
Gets the variable declaration statement for the return value.
Name | Description |
---|---|
proc: | The procedure to get the return variable declaration statement. |
Returns: The generated declaration statement. |
Gets the Xml comment to place in the <returns> element.
Name | Description |
---|---|
proc: | The procedure to get the return variable declaration statement. |
Returns: The Xml comment |
Gets the parameter list for the method.
Name | Description |
---|---|
proc: | The procedure to get the parameter list for. |
Returns: The generated parameter list. |
Gets the generated SqlParameter objects with assigned values.
Name | Description |
---|---|
proc: | The procedure to get the generated SqlParameters for. |
indent: | The number of tabs to indent the generated code. |
Returns: The generated SqlParameters |
Gets the generated statement that executes the stored procedure and loads the results into the return variable.
Name | Description |
---|---|
proc: | The procedure to get the generated execute statement for. |
indent: | The number of tabs to indent the generated code. |
Returns: The generated code. |