Skip to content

Commit 452875f

Browse files
committed
make internal impl of Order public
1 parent 5bc46e3 commit 452875f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Firestore/Swift/Source/SwiftAPI/Pipeline/Expressions/Expression.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,14 +826,14 @@ public protocol Expression: Sendable {
826826

827827
/// Creates an expression that checks if a string (from `self`) contains a specified substring
828828
/// from an expression (case-sensitive).
829-
/// Assumes `self` evaluates to a string, and `expr` evaluates to a string.
829+
/// Assumes `self` evaluates to a string, and `expression` evaluates to a string.
830830
///
831831
/// ```swift
832832
/// // Check if the "message" field contains the value of the "keyword" field.
833833
/// Field("message").stringContains(Field("keyword"))
834834
/// ```
835835
///
836-
/// - Parameter expr: An `Expression` (evaluating to a string) representing the substring to
836+
/// - Parameter expression: An `Expression` (evaluating to a string) representing the substring to
837837
/// search for.
838838
/// - Returns: A new `BooleanExpr` representing the "str_contains" comparison.
839839
func stringContains(_ expression: Expression) -> BooleanExpression

Firestore/Swift/Source/SwiftAPI/Pipeline/Expressions/FunctionExpressions/ConditionalExpression.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ConditionalExpression: FunctionExpression, @unchecked Sendable {
3838
/// Creates a new `ConditionalExpression`.
3939
///
4040
/// - Parameters:
41-
/// - expr: The `BooleanExpression` to evaluate.
41+
/// - expression: The `BooleanExpression` to evaluate.
4242
/// - thenExpression: The `Expression` to evaluate if the boolean expression is `true`.
4343
/// - elseExpression: The `Expression` to evaluate if the boolean expression is `false`.
4444
public init(_ expr: BooleanExpression,

Firestore/Swift/Source/SwiftAPI/Pipeline/Ordering.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
*/
1616

1717
public struct Ordering: @unchecked Sendable {
18-
let expr: Expression
19-
let direction: Direction
18+
public let expression: Expression
19+
public let direction: Direction
2020
let bridge: OrderingBridge
2121

2222
init(expression: Expression, direction: Direction) {
23-
expr = expression
23+
self.expression = expression
2424
self.direction = direction
2525
bridge = OrderingBridge(expr: expression.toBridge(), direction: direction.rawValue)
2626
}
2727
}
2828

29-
struct Direction: Sendable, Equatable, Hashable {
29+
public struct Direction: Sendable, Equatable, Hashable {
3030
let kind: Kind
31-
let rawValue: String
31+
public let rawValue: String
3232

3333
enum Kind: String {
3434
case ascending

Firestore/Swift/Source/SwiftAPI/Pipeline/Pipeline.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ public struct Pipeline: @unchecked Sendable {
453453
/// Fully overwrites document fields with those from a nested map identified by an `Expr`.
454454
///
455455
/// "Promotes" a map value (dictionary) from a field to become the new root document.
456-
/// Each key-value pair from the map specified by `expr` becomes a field-value pair
456+
/// Each key-value pair from the map specified by `expression` becomes a field-value pair
457457
/// in the output document, discarding original document fields.
458458
///
459459
/// ```swift
@@ -468,7 +468,7 @@ public struct Pipeline: @unchecked Sendable {
468468
/// // Output document would be: { "name": "Alex", "age": 30 }
469469
/// ```
470470
///
471-
/// - Parameter expr: The `Expr` (typically a `Field`) that resolves to the nested map.
471+
/// - Parameter expression: The `Expr` (typically a `Field`) that resolves to the nested map.
472472
/// - Returns: A new `Pipeline` object with this stage appended.
473473
public func replace(with expr: Expression) -> Pipeline {
474474
return Pipeline(stages: stages + [ReplaceWith(expr: expr)], db: db)

0 commit comments

Comments
 (0)