Skip to content

Commit

Permalink
Added autocomplete information for DATETRUNC and CREATEELASTICLOOKUP …
Browse files Browse the repository at this point in the history
…functions
  • Loading branch information
MarkMpn committed Nov 5, 2024
1 parent 2952873 commit 5aa3f1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ public abstract class SqlFunctions
[Description("Creates a lookup value to reference a record")]
public abstract EntityReference createlookup(string logicalName, Guid id);

[Description("Creates a lookup value to reference a record in an elastic table")]
public abstract EntityReference createelasticlookup(string logicalName, Guid id, string partitionId);

[Description("Finds the difference between two date values")]
public abstract int datediff(string datepart, DateTime startdate, DateTime enddate);

[Description("Adds a number value to a date value")]
public abstract DateTime dateadd(string datepart, int number, DateTime date);

[Description("Truncates a date value")]
public abstract DateTime datetrunc(string datepart, DateTime date);

[Description("Extracts a scalar value from a JSON string")]
public abstract string json_value(string json, string path);

Expand Down
6 changes: 6 additions & 0 deletions MarkMpn.Sql4Cds.XTB/FunctionMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ public abstract class SqlFunctions
[Description("Creates a lookup value to reference a record")]
public abstract EntityReference createlookup(string logicalName, Guid id);

[Description("Creates a lookup value to reference a record in an elastic table")]
public abstract EntityReference createelasticlookup(string logicalName, Guid id, string partitionId);

[Description("Finds the difference between two date values")]
public abstract int datediff(string datepart, DateTime startdate, DateTime enddate);

[Description("Adds a number value to a date value")]
public abstract DateTime dateadd(string datepart, int number, DateTime date);

[Description("Truncates a date value")]
public abstract DateTime datetrunc(string datepart, DateTime date);

[Description("Extracts a scalar value from a JSON string")]
public abstract string json_value(string json, string path);

Expand Down

0 comments on commit 5aa3f1a

Please sign in to comment.