Skip to content

Commit 0227afe

Browse files
committed
change API details
1 parent ee92dca commit 0227afe

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
// limitations under the License.
1414

1515
public struct AliasedExpression: Selectable, SelectableWrapper, Sendable {
16-
public var alias: String
16+
public let alias: String
1717

18-
public var expr: Expression
18+
public let expr: Expression
1919

2020
init(_ expr: Expression, _ alias: String) {
2121
self.alias = alias

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public struct DistanceMeasure: Sendable, Equatable, Hashable {
2929
case dotProduct = "dot_product"
3030
}
3131

32-
public static let euclidean: DistanceMeasure = DistanceMeasure(kind: .euclidean)
32+
public static let euclidean: DistanceMeasure = .init(kind: .euclidean)
3333

34-
public static let cosine: DistanceMeasure = DistanceMeasure(kind: .cosine)
34+
public static let cosine: DistanceMeasure = .init(kind: .cosine)
3535

36-
public static let dotProduct: DistanceMeasure = DistanceMeasure(kind: .dotProduct)
36+
public static let dotProduct: DistanceMeasure = .init(kind: .dotProduct)
3737

3838
init(kind: Kind) {
3939
self.kind = kind

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
public class Ordering: @unchecked Sendable {
17+
public struct Ordering: @unchecked Sendable {
1818
let expr: Expression
1919
let direction: Direction
2020
let bridge: OrderingBridge

Firestore/Swift/Tests/Integration/PipelineApiTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ final class PipelineApiTests: FSTIntegrationTestCase {
234234
_ = db.pipeline().collection("books").sample(count: 10)
235235

236236
// Sample 10 percent of the collection of books
237-
_ = db.pipeline().collection("books").sample(percentage: 10)
237+
_ = db.pipeline().collection("books").sample(percentage: 0.1)
238238
}
239239

240240
func testUnionStage() async throws {

0 commit comments

Comments
 (0)