Interface ISQLFunction
The system entity for clr sql functions which can be used in IDataset and ISQLWrapper sql
See https://help.lemonedge.com/help/settings/enterprise-tools/sql-functions/intro.html for more information
See https://docs.microsoft.com/en-us/sql/relational-databases/clr-integration-database-objects-user-defined-functions/clr-user-defined-aggregate-invoking-functions?view=sql-server-ver15 for information about sql clr functionsInherited Members
Namespace: LemonEdge.API.Entities.Reporting
Assembly: LemonEdge.API.dll
Syntax
[EntityDefinition(EntityID.SQLFunction, "dbo.LT_SQLFunctions", "SQLFunction", IsStandingDataEntity = false, HelpURL = "help/settings/enterprise-tools/sql-functions/intro.html", LabelColumn = "Name")]
[DefaultEntityIcon(ImageType.DatabaseAdd)]
public interface ISQLFunction : IShareAcrossAccounts, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Properties
CreateSQL
The sql signature for creating this function
Declaration
[EntityProperty(SQLType.NVarChar, 500, false)]
[EntityDescription("The sql signature for creating this function.")]
[Required]
[PropertyValidation("!string.IsNullOrEmpty(MyItem.CreateSQL)", "!MyItem.CreateSQL.ContainsWholeWord(\"go\", StringComparison.InvariantCultureIgnoreCase) && !MyItem.CreateSQL.ContainsWholeWord(\"drop\", StringComparison.InvariantCultureIgnoreCase, new string[] { \"drop table #\" }) && !MyItem.CreateSQL.ContainsWholeWord(\"create\", StringComparison.InvariantCultureIgnoreCase, new string[] { \"create table #\" }) && !MyItem.CreateSQL.ContainsWholeWord(\"exec\", StringComparison.InvariantCultureIgnoreCase)", "Contains invalid sql.")]
string CreateSQL { get; set; }
Property Value
Type | Description |
---|---|
string |
Description
The user friendly description for this clr sql function
Declaration
[EntityProperty(SQLType.NVarChar, 2500, true)]
[EntityDescription("The user friendly description for this clr sql function.")]
string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
Enabled
Indicates if this clr sql function is created and usable in the database.
Declaration
[EntityProperty(SQLType.Bit, false)]
[EntityDescription("Indicates if this clr sql function is created and usable in the database.")]
[Required]
bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
ExternalName
The external name for this sql clr function
Declaration
[EntityProperty(SQLType.NVarChar, 500, false)]
[EntityDescription("The external name for this sql clr function.")]
[Required]
string ExternalName { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
The unique user friendly name of this clr sql function
Declaration
[EntityProperty(SQLType.NVarChar, 500, false)]
[EntityDescription("The unique user friendly name of this clr sql function.")]
[Unique]
[EntityKeyProperty]
[Required]
string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
SQLAssemblyID
Declaration
[EntityProperty(SQLType.UniqueIdentifier, false)]
[EntityKeyProperty]
[EntityRelationship(EntityID.SQLAssembly, "ID", SingleJoinType.One, "SQL Assembly", "Functions", DeleteWithRelationship = true, PartOfParentSet = true, LinkToItemInSet = false, InheritPermissions = true)]
Guid SQLAssemblyID { get; set; }
Property Value
Type | Description |
---|---|
Guid |
Type
The type of this clr sql function
Declaration
[EntityProperty(SQLType.SmallInt, false)]
[EntityDescription("The type of this clr sql function.")]
SQLFunctionType Type { get; set; }
Property Value
Type | Description |
---|---|
SQLFunctionType |