SaveToDB Framework Functions
Function | Description |
---|---|
xls.get_escaped_parameter_name | This function returns an escaped parameter name. |
xls.get_friendly_column_name | This function returns a column friendly name. |
xls.get_procedure_underlying_table | This function returns the best underlying table of a procedure. |
xls.get_translated_string | This function returns a translated string. |
xls.get_unescaped_parameter_name | This function returns an unescaped parameter name. |
xls.get_view_underlying_table | This function returns the best underlying table of a view. |
xls.get_escaped_parameter_name
This function returns an escaped parameter name.
Parameter | DataType | Comment |
---|---|---|
Result | nvarchar(255) | Escaped parameter name |
@name | nvarchar(128) | Column name |
The function converts special characters using the _xHHHH_ format, where HHHH is the hexadecimal character code.
For example, it converts a single quote to _x0027_.
You may use such parameter names in the procedures and handlers that get values from the Excel table columns.
The SaveToDB add-in uses the same conversion function to link columns and parameters.
xls.get_friendly_column_name
This function returns a column friendly name.
Parameter | DataType | Comment |
---|---|---|
Result | nvarchar(255) | Friendly column name |
@name | nvarchar(128) | Column name |
It returns the quoted column name if it is required. Otherwise, it returns the name as is.
xls.get_procedure_underlying_table
This function returns the best underlying table of a procedure.
Parameter | DataType | Comment |
---|---|---|
Result | nvarchar(255) | Name of the underlying table |
@schema | nvarchar(128) | Procedure schema |
@name | nvarchar(128) | Procedure name |
The code generation procedures use this function to find the underlying table of the procedure used to generate INSERT, UPDATE, and DELETE operations.
The result can be wrong. In this case, specify the underlying table manually.
xls.get_translated_string
This function returns a translated string.
Parameter | DataType | Comment |
---|---|---|
Result | nvarchar(128) | The value from the xls.translations table |
@string | nvarchar(128) | String to translate |
@data_language | varchar(10) | Target language |
The function uses the xls.translations table to translate strings.
xls.get_unescaped_parameter_name
This function returns an unescaped parameter name.
Parameter | DataType | Comment |
---|---|---|
Result | nvarchar(128) | Unescaped column name |
@name | nvarchar(255) | Escaped parameter name |
The function converts escaped parameter names with the _xHHHH_ format into the regular column names.
For example, it converts the _x0027_ value to a single quote.
xls.get_view_underlying_table
This function returns the best underlying table of a view.
Parameter | DataType | Comment |
---|---|---|
Result | nvarchar(255) | Name of the underlying table |
@schema | nvarchar(128) | View schema |
@name | nvarchar(128) | View name |
The code generation procedures use this function to find the underlying table of the view used to generate INSERT, UPDATE, and DELETE operations.
The result can be wrong. In this case, specify the underlying table manually.