Skip to content

Commit

Permalink
Merge pull request #573 from MarkMpn/direct-updates
Browse files Browse the repository at this point in the history
Function autocomplete
  • Loading branch information
MarkMpn authored Nov 5, 2024
2 parents b7eb797 + c1e49d4 commit c61a447
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 c61a447

Please sign in to comment.