From 0144a7e865acb10c8592ed7bca526acee31d3680 Mon Sep 17 00:00:00 2001 From: Tim Forkmann Date: Mon, 10 Jun 2024 14:42:06 -0400 Subject: [PATCH] Bumping version to 2.0.9 --- RELEASE_NOTES.md | 2 ++ src/AzureTackle/AzureTackle.fs | 31 +++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 765255f..2d24125 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,5 @@ +#### 2.0.9 - 2024-06-10 +* Add overloads for float and decimal #### 2.0.8 - 2024-06-10 * Fix appendOptional #### 2.0.7 - 2024-06-06 diff --git a/src/AzureTackle/AzureTackle.fs b/src/AzureTackle/AzureTackle.fs index 39098a9..c44663d 100644 --- a/src/AzureTackle/AzureTackle.fs +++ b/src/AzureTackle/AzureTackle.fs @@ -650,19 +650,34 @@ type TableEntityExtensions = static member inline Append(entity: TableEntity, key: string, value: obj) = entity.Add(key, value) entity + [] + static member inline Append(entity: TableEntity, key: string, value: float) = + entity.Add(key, value) + entity + + [] + static member inline Append(entity: TableEntity, key: string, value: decimal) = + entity.Add(key, value) + entity - /// Adds an optional property to the entity to allow chaining. - /// If the value is `None`, the property is not added. - /// If the value is `Some`, the property is added. - /// - /// # Parameters - /// - `entity`: The entity to add the property to. - /// - `key`: The key of the property. - /// - `value`: The value of the property. [] static member inline AppendOptional(entity: TableEntity, key: string, value: 'a option) = match value with | Some value -> entity.Add(key, value) | None -> () + entity + [] + static member inline AppendOptional(entity: TableEntity, key: string, value: float option) = + match value with + | Some value -> entity.Add(key, value) + | None -> () + + entity + [] + static member inline AppendOptional(entity: TableEntity, key: string, value: decimal option) = + match value with + | Some value -> entity.Add(key, value) + | None -> () + entity