Skip to content

Commit

Permalink
Bumping version to 2.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Forkmann committed Jun 10, 2024
1 parent 6b7f90a commit 0144a7e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
31 changes: 23 additions & 8 deletions src/AzureTackle/AzureTackle.fs
Original file line number Diff line number Diff line change
Expand Up @@ -650,19 +650,34 @@ type TableEntityExtensions =
static member inline Append(entity: TableEntity, key: string, value: obj) =
entity.Add(key, value)
entity
[<Extension>]
static member inline Append(entity: TableEntity, key: string, value: float) =
entity.Add(key, value)
entity

[<Extension>]
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.
[<Extension>]
static member inline AppendOptional(entity: TableEntity, key: string, value: 'a option) =
match value with
| Some value -> entity.Add(key, value)
| None -> ()

entity
[<Extension>]
static member inline AppendOptional(entity: TableEntity, key: string, value: float option) =
match value with
| Some value -> entity.Add(key, value)
| None -> ()

entity
[<Extension>]
static member inline AppendOptional(entity: TableEntity, key: string, value: decimal option) =
match value with
| Some value -> entity.Add(key, value)
| None -> ()

entity

0 comments on commit 0144a7e

Please sign in to comment.